On Friday, 5 June 2026 18:41:33 BST T.  Kurt Bond wrote:
> Given the source file bad.ms:
> ========== bad-hdtbl.ms
> ======================================================= .LP
> Groff 1.24.1 has a problem with the hdtbl macro package.
> .br
> .TBL cols=3
> . TR .TD 1*1 ".TD rowspan=2" 1+2*2 .TD 1*3
> . TR .TD 2*1 .TD 2*3
> .ETB
> .br
> .LP
> Did it work?
> ========== End of bad-hdtbl.ms
> ================================================
> 
> groff 1.24.1 does not work, failing with the following error:
> 
> $ groff -Tpdf -ms -mhdtbl bad-hdtbl.ms >bad-hdtbl.ms.pdf
> hdtbl.tmac: cannot load package; macro 'TH' is already defined
> s.tmac:bad-hdtbl.ms:5: error: sorry, .TR not implemented
> 
> groff 1.23.0 works fine, no error and produces a working PDF file:
> 
> $ /usr/local/sw/versions/groff/1.23.0/bin/groff -Tpdf -ms -mhdtbl
> bad-hdtbl.ms >bad-hdtbl.ms.pdf
> 
> groff 1.24.1 fails trying to load -mhdtbl before -ms:
> 
> $ groff -Tpdf -mhdtbl -ms bad-hdtbl.ms >bad-hdtbl.ms.pdf
> s.tmac:bad-hdtbl.ms:5: error: sorry, .TR not implemented
> hdtbl.tmac:bad-hdtbl.ms:7: Each table (.TBL) should contain at least one
> table row (.TR)! hdtbl.tmac:bad-hdtbl.ms:7: There is only 1 column
>  in the 0th row but 3 are expected.
> 
> groff 1.23.0 also fails trying to load -mhdtbl before -ms:
> $ /usr/local/sw/versions/groff/1.23.0/bin/groff -Tpdf -mhdtbl -ms
> bad-hdtbl.ms >bad-hdtbl.ms.pdf s.tmac:bad-hdtbl.ms:5: error: sorry, .TR not
> implemented
> bad-hdtbl.ms:7: Each table (.TBL) should contain at least one table row
> (.TR)! bad-hdtbl.ms:7: There is only 1 column in the 0th row but 3 are
> expected.

In response to:-

https://savannah.gnu.org/bugs/?67418

which Morten describes as "probably a fringe issue", a change was made to 
hdtbl.tmac which prevented it being used with the ms macro package - you can 
revert by commenting out lines 50-63 of current hdtbl.tmac.

The issue reported by Morten is an instance of not being able to use tbl(1) 
tables and hdtbls in the same document, so the "fix" may seem excessive. You 
can definitely use hdtbl with ms (-ms -mhdtbl (not vice-versa)) so long as you 
do not use tbl(1) tables as well.

Cheers

Deri 




  • ... T . Kurt Bond
    • ... Deri via discussion of the GNU roff typesetting system and related software

Reply via email to