Re: Groff hdtbl tables disappear near the footer

2023-12-16 Thread Bjarni Ingi Gislason
  There are bugs in "page-a.ms".  The last one is for a trailing
space.

  Found by using the options "-ww -b -z" (except the trailing
space) and patched HDTBL macros.

--- page-a.ms   2023-12-16 17:42:06.0 +
+++ page-a.new.ms   2023-12-16 18:06:58.0 +
@@ -3,7 +3,7 @@
 ..
 \Z'\
 \h'-1i'\v'10.52i'\
-\X'ps: import floral-border.eps 0 0 595 842 594000'
+\X'ps: import floral-border.eps 0 0 595 842 594000''
 .so macros.ms
 \#.fam source
 .sp -.5c
@@ -21,10 +21,10 @@
 \Z'\v'0.5m'\D'P 0 -1.7m \n[bwd]u 0 0 1.7m -\n[bwd]u 0'\v'-0.5m''\
 \X'ps: exec 1 setgray'\0with Open Source Software\0
 \Z'\
-
+'
 \#.PSPIC -C page-symbol.eps 2i
 .LP
-\*[DGREY]\f[B]Duis ac purus elementum, posuere metus nec, porttitor mauris 
aliquam scelerisque lacus ultrice.\f[R] Sollicitudin libero a, iaculis augue. 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam condimentum 
luctus urna vel sodales. Etiam leo justo, lacinia id vehicula eu, facilisis sit 
amet nunc. 
+\*[DGREY]\f[B]Duis ac purus elementum, posuere metus nec, porttitor mauris 
aliquam scelerisque lacus ultrice.\f[R] Sollicitudin libero a, iaculis augue. 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam condimentum 
luctus urna vel sodales. Etiam leo justo, lacinia id vehicula eu, facilisis sit 
amet nunc.
 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam condimentum 
luctus urna vel sodales. Etiam leo justo, lacinia id vehicula eu, facilisis sit 
amet nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam 
condimentum luctus urna vel sodales.
 .br
 .po .93i



Re: Groff hdtbl tables disappear near the footer

2023-12-13 Thread Bjarni Ingi Gislason
On Wed, Dec 13, 2023 at 02:59:15AM +0100, Tadziu Hoffmann wrote:
> 
> 
> > Here is another example where, when the table doesn't fit on the page,
> > it vanishes and is not carried over to the following page.
> 
> As far as I can tell, hdtbl does not start a new page by itself
> when a table does not fit, but invoking t*hm will output any
> held tables.  The way you have set this up to be called from
> pg@top will print the table, but you have to explicitly request
> a new page with .bp at the end, or provide more running text
> (not inside TBL/ETB) so that ms will eventually start a new page.
> 
  The reason are bugs in the hdtbl macros as shown in the bug
ticket #64772 (comment #9, 2013-11-07), named "[hdtbl] consider
deprecating", in the attached file "hdtbl.tmac.diff"
(https://savannah.gnu.org/bugs/?group=groff).

  Also look a bug ticket #64967 grops.1.man..."HDTBL"

> However, I think that in this particular case the problem is
> not having the page length correctly set.  Can you try using
> .pl 29.7c somewhere near the top?
> 
> 

  The page format does not fix the bugs in the hdtbl macros.

  Simpler is to change the page size on the command line by adding

-dpaper=a4 -P-pa4

  define "paper" for the formatter, add option "-pa4" for the
output device.

  The default paper size should be defined in "tmac/troffrc"
before "papersize.tmac" is sourced, for example with

.  do if !d paper .do ds paper A4\" use $(PAGE) to configure



Re: Groff hdtbl tables disappear near the footer

2023-12-06 Thread Bjarni Ingi Gislason
  I get a somewhat different result as the paragraph "Company
Four" is entirely on the first page.  That is without any change
to the provided files.

  There are also these warning, but the do not seem to interfere
with the output.

  The pdf-file with "Page size = letter" is in the attachment.

groff -b -ww -z ...

troff: backtrace: 'hdtbl-issue-macros.ms':113: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':19
troff:hdtbl-issue.ms:19: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':115: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':19
troff:hdtbl-issue.ms:19: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':117: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':19
troff:hdtbl-issue.ms:19: warning: numeric expression missing
troff: backtrace: 'hdtbl-issue-macros.ms':113: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':28
troff:hdtbl-issue.ms:28: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':115: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':28
troff:hdtbl-issue.ms:28: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':117: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':28
troff:hdtbl-issue.ms:28: warning: numeric expression missing
troff: backtrace: 'hdtbl-issue-macros.ms':113: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':37
troff:hdtbl-issue.ms:37: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':115: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':37
troff:hdtbl-issue.ms:37: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':117: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':37
troff:hdtbl-issue.ms:37: warning: numeric expression missing
troff: backtrace: 'hdtbl-issue-macros.ms':113: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':46
troff:hdtbl-issue.ms:46: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':115: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':46
troff:hdtbl-issue.ms:46: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':117: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':46
troff:hdtbl-issue.ms:46: warning: numeric expression missing
troff: backtrace: 'hdtbl-issue-macros.ms':113: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':55
troff:hdtbl-issue.ms:55: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':115: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':55
troff:hdtbl-issue.ms:55: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':117: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':55
troff:hdtbl-issue.ms:55: warning: numeric expression missing
troff: backtrace: 'hdtbl-issue-macros.ms':113: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':64
troff:hdtbl-issue.ms:64: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':115: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':64
troff:hdtbl-issue.ms:64: warning: missing closing delimiter in output 
comparison operator (got a newline)
troff: backtrace: 'hdtbl-issue-macros.ms':117: macro 'WORKBL'
troff: backtrace: file 'hdtbl-issue.ms':64
troff:hdtbl-issue.ms:64: warning: numeric expression missing


hdtbl-issue.latest.pdf
Description: Adobe PDF document


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



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

> 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

Re: Groff hdtbl tables disappear near the footer

2023-12-04 Thread G. Branden Robinson
[Mike CCed just to be sure he gets this]

Hi Mike,

At 2023-12-04T18:43:15+, Mike wrote:
> I am new to groff. I am more a designer than a coder, so my
> understanding here may be lacking.

No worries.  This list is definitely not just for programmers.

> I created a CV template using groff + ms macros + tbl + hdtbl. To be
> fair, it worked wonderfully. I was able to replicate what I had
> previously done with LaTeX. Including adding hdtbl table entries with
> macros.

I'm glad to hear it!

> There is just one issue. I cannot get my head around why the tables
> created by hdtbl vanish as they approach the footer.
> 
> If I place 6 tables in a row, tables one two and three will show on
> the first page, then tables 4,5 and 6 are gone. the following content
> is seen on the next page but not the tables (they appear to have been
> swallowed).
> 
> I noticed, however, that a page break after the 3rd table causes the
> next 3 to appear on the following page. One caveat, sometimes when
> content moves, one of the middle tables (3 or 4) vanishes again, while
> the last few flow onto the next page.
> 
> Perhaps this is by design and I am just naive to it, but I would love
> to know the cause and what I could do for reliable results.

I'm not aware of this being a "known problem" of hdtbl or something you
would be expected to anticipate.

This will require some troubleshooting on our part, I think.  hdtbl is
not exactly actively maintained; it's a "contrib" component that groff
bundles for convenience, but its author has not been seen on this
mailing list in years.

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?

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.

Regards,
Branden


signature.asc
Description: PGP signature


Groff hdtbl tables disappear near the footer

2023-12-04 Thread Mike
Hello,

I am new to groff. I am more a designer than a coder, so my
understanding here may be lacking.

I created a CV template using groff + ms macros + tbl + hdtbl. To be
fair, it worked wonderfully. I was able to replicate what I had
previously done with LaTeX. Including adding hdtbl table entries with
macros.

There is just one issue. I cannot get my head around why the tables
created by hdtbl vanish as they approach the footer.

If I place 6 tables in a row, tables one two and three will show on the
first page, then tables 4,5 and 6 are gone. the following content is
seen on the next page but not the tables (they appear to have been
swallowed).

I noticed, however, that a page break after the 3rd table causes the
next 3 to appear on the following page. One caveat, sometimes when
content moves, one of the middle tables (3 or 4) vanishes again, while
the last few flow onto the next page.

Perhaps this is by design and I am just naive to it, but I would love
to know the cause and what I could do for reliable results.

Kind regards,

Mike