Re: Using .[ and .] in a macro

2023-12-05 Thread Thomas Dupond via

Le 2023-12-03 à 07:47, hbezemer--- via a écrit :

Dear all,I would like to create a macro along the lines of:.de CITE.[\\$2\\$1.]\\$3..Which would 
result in:.CITE   The problem that arises is that refer sees the definition of the macro asa 
citation (of course).Is there an elegant way to get this to work?Kind regards,Hans



Hi,

It sounds like you should not be able to do what you want since refer 
process the file before groff and thus your .CITE macro will not be 
defined when the file goes through refer.


Regards,
--
Thomas





Re: Long Heading lines using mom

2023-12-05 Thread Heinz-Jürgen Oertel
Hello Peter,

thanks again for your valuable help.

Am Freitag, 1. Dezember 2023, 22:38:06 CET schrieb Peter Schaffter:
>  [...]
> > I'm sure I did update om.tmac.  Can I see the used mom version
> > somewhere in the output text?
> 
> At the command line, 
> 
>   echo | pdfmom -dVERSION=1
> 
> will return the mom version number.

this gave me the solution. I did update mom in /usr/local/share/groff instead 
of /usr/share/groff

Now, I'm happy again.

Greetings
Heinz





Re: Groff hdtbl tables disappear near the footer

2023-12-05 Thread Mike

> Can you prepare a pair of exhibits for us to test?  One that doesn't
> show the problem, and one with as minimal a change as you can make to
> cause it to happen?


Yes. I am attaching 3 documents:

   - A stripped down section of the CV template (hdtbl-issue.ms).
   - A macro file demonstrating the issue (hdtbl-issue-macros.ms).
   - A macro file demonstrating a temporary fix (hdtbl-issue-macros-
   working.ms).
   

The command I have been using to compile:
   
   groff -ms -m hdtbl hdtbl-issue.ms > hdtbl-issue.ps && ps2pdf hdtbl-
   issue.ps hdtbl-issue.pdf

Environment: Manjaro Linux

The "working" macro file has only one change. Line 72 contains .ne 1.5i

> Studying the differences between the two and the macros and requests
> they do or don't call will likely help us to pinpoint the issue.

That would be amazing! Thank you for looking into this.

Kind regards,

Mike
.so hdtbl-issue-macros.ms
.fam T
.nr PS 10p
.nr VS 15p
.ds t*bgc white\" background color
.ds t*fgc textcolor\" foreground color
.ds t*bc linecolor\"  border color
.nr t*cpd 0.02n\"  cell padding
.br
.sp -.4c
.heading "Professional Experience"
.WORK \
"2018 - 2023" \
"Job Title" \
"Company One" \
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem."
.WORKBL \
"Achievement one" \
"Achievement two"

.WORK \
"2014 - 2018" \
"Job Title" \
"Company Two" \
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam."
.WORKBL \
"Achievement one" \
"Achievement two"

.WORK \
"2010 - 2014" \
"Job Title" \
"Company Three" \
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam."
.WORKBL \
"Achievement one" \
"Achievement two"

.WORK \
"2010 - 2014" \
"Job Title" \
"Company Four" \
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam."
.WORKBL \
"Achievement one" \
"Achievement two"

.WORK \
"2010 - 2014" \
"Job Title" \
"Company Five" \
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam."
.WORKBL \
"Achievement one" \
"Achievement two"

.WORK \
"2010 - 2014" \
"Job Title" \
"Company Six" \
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam."
.WORKBL \
"Achievement one" \
"Achievement two"
.de BL
.IP \(bu 2
..
.ds ACCENT "\X'ps: exec .1 .3 .6 setrgbcolor'
.ds GREY "\X'ps: exec .7 .7 .7 setrgbcolor'
.ds DGREY "\X'ps: exec .3 .3 .3 setrgbcolor'
.ds RED "\X'ps: exec 1 0 0 setrgbcolor'
.ds BLUE "\X'ps: exec 0 0 1 setrgbcolor'
.ds BLACK "\X'ps: exec 0 0 0 setrgbcolor'
.ds WHITE "\X'ps: exec 1 1 1 setrgbcolor'
.defcolor textcolor rgb #353535
.defcolor linecolor rgb #a1a1a1
.de smallcaps
.nr .sc.ps (\\n[.s]*75/100)
.nr .cap.PS \\n[.s]
.char a \s[\\n[.sc.ps]]A\s[\\n[.cap.PS]]
.char b \s[\\n[.sc.ps]]B\s[\\n[.cap.PS]]
.char c \s[\\n[.sc.ps]]C\s[\\n[.cap.PS]]
.char d \s[\\n[.sc.ps]]D\s[\\n[.cap.PS]]
.char e \s[\\n[.sc.ps]]E\s[\\n[.cap.PS]]
.char f \s[\\n[.sc.ps]]F\s[\\n[.cap.PS]]
.char g \s[\\n[.sc.ps]]G\s[\\n[.cap.PS]]
.char h \s[\\n[.sc.ps]]H\s[\\n[.cap.PS]]
.char i \s[\\n[.sc.ps]]I\s[\\n[.cap.PS]]
.char j \s[\\n[.sc.ps]]J\s[\\n[.cap.PS]]
.char k \s[\\n[.sc.ps]]K\s[\\n[.cap.PS]]
.char l \s[\\n[.sc.ps]]L\s[\\n[.cap.PS]]
.char m \s[\\n[.sc.ps]]M\s[\\n[.cap.PS]]
.char n \s[\\n[.sc.ps]]N\s[\\n[.cap.PS]]
.char o \s[\\n[.sc.ps]]O\s[\\n[.cap.PS]]
.char p \s[\\n[.sc.ps]]P\s[\\n[.cap.PS]]
.char q \s[\\n[.sc.ps]]Q\s[\\n[.cap.PS]]
.char r \s[\\n[.sc.ps]]R\s[\\n[.cap.PS]]
.char s \s[\\n[.sc.ps]]S\s[\\n[.cap.PS]]
.char t \s[\\n[.sc.ps]]T\s[\\n[.cap.PS]]
.char u \s[\\n[.sc.ps]]U\s[\\n[.cap.PS]]
.char v \s[\\n[.sc.ps]]V\s[\\n[.cap.PS]]
.char w \s[\\n[.sc.ps]]W\s[\\n[.cap.PS]]
.char x \s[\\n[.sc.ps]]X\s[\\n[.cap.PS]]
.char y \s[\\n[.sc.ps]]Y\s[\\n[.cap.PS]]
.char z \s[\\n[.sc.ps]]Z\s[\\n[.cap.PS]]
..
.de /smallcaps
.rchar a b c d e f g h i j k l m n o p q r s t u v w x y z
..
.de BL
.sp .1c
.ti .5c
\[bu]\ \ \ 
..
.de heading
.rs
.nf
.ps 12
.sp 1c
\*[ACCENT]
.smallcaps
.B "\\$1"
./smallcaps
\m[textcolor]\
.sp -.2c
\*[GREY]\l'\n(.lu*100u/100u'\*[DGREY]
.ps 10
.fi
..
.de SC
.smallcaps
.B "\\$1"
./smallcaps
..
.de WORK
\#.ne 1.5i
.TBL cols=2 vl=s hl= border=0 width='18% 82%' fsz='1.0 1.2'
.TR 
.TD hal=r
\\$1\ 
.TD
.smallcaps
.B "\  \\$2"
./smallcaps
.TR

Re: Groff hdtbl tables disappear near the footer

2023-12-05 Thread Deri
On Tuesday, 5 December 2023 16:57:26 GMT Mike wrote:
> > Can you prepare a pair of exhibits for us to test?  One that doesn't
> > show the problem, and one with as minimal a change as you can make to
> > cause it to happen?
> 
> Yes. I am attaching 3 documents:
> 
>- A stripped down section of the CV template (hdtbl-issue.ms).
>- A macro file demonstrating the issue (hdtbl-issue-macros.ms).
>- A macro file demonstrating a temporary fix (hdtbl-issue-macros-
>working.ms).
> 
> 
> The command I have been using to compile:
> 
>groff -ms -m hdtbl hdtbl-issue.ms > hdtbl-issue.ps && ps2pdf hdtbl-
>issue.ps hdtbl-issue.pdf
> 
> Environment: Manjaro Linux
> 
> The "working" macro file has only one change. Line 72 contains .ne 1.5i
> 
> > Studying the differences between the two and the macros and requests
> > they do or don't call will likely help us to pinpoint the issue.
> 
> That would be amazing! Thank you for looking into this.
> 
> Kind regards,
> 
> Mike

Hi Mike,

Seems to work if you add:-

.am pg@top
. t*hm
..

Somewhere near the top of hdtbl-issue.ms. The man page says:-

   A  table  which  does not fit on a partially filled page is printed 
automatically on
   the top of the next page if you append the little utility macro  t*hm  
to  the  page
   header macro of your document’s main macro package.  For example, say

  .am pg@top
  .  t*hm
  ..

   if you use the ms macro package.

Cheers 

Deri






Re: Groff hdtbl tables disappear near the footer

2023-12-05 Thread Mike
> Seems to work if you add:-
> 
> .am pg@top
> . t*hm
> ..

That appears to have worked. Thank you for pointing that out.

Very much appreciated!

Kind regards,

Mike