Re: [BUG] gropdf, tbl: Completely broken table (was: Ping^1: Chapters of the manual (was: Bug#1018737: ...))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

At 2022-12-17T14:19:55+0100, Alejandro Colomar wrote:
> Another bug report (but not about the script; this seems to be about
> tbl(1) interaction with gropdf(1), I guess):
> 
> <http://chuzzlewit.co.uk/LinuxManBook.pdf#pdf%3Abm11813>

The suffixes(7) page, which I've managed to never see in 25 years as a
GNU/Linux user!  Ah, well.

Dude, I'm friggin' _trying_ to get groff ready for 1.23.0.rc2 and you
nerd-snipe me with this huge list of things that hasn't been updated in
twenty years and has all kinds of fiddly little things wrong with it--
this of course constitutes an OCD emergency for me!

https://xkcd.com/356/

> Running all the linters I know doesn't trigger any warnings on the
> page source:

That tbl(1) source isn't invalid but it is pretty weird.

I tend to agree that there is a gropdf(1) bug here, as grops(1) handles
the same input fine.  But Deri is the real expert and I will let him
speak to that.

I'm attaching a patch that does three things:

1. Removes the hack to shut up warnings from grotty(1).  This was indeed
   a bug, it's been around forever (possibly since ~1990), and it is
   fixed in groff Git.  Expect that in 1.23.0.  man-db man(1) conceals
   these diagnostic messages anyway.

   https://savannah.gnu.org/bugs/index.php?63449

2. Stops using leading spaces in table entries.  This is a kind of weird
   thing to do.  The likely reason is that the table author(s) had a ton
   of entries that started with dots (the *roff control character) and
   didn't know to prefix them with the *roff dummy character (`\&`) to
   keep them from being interpreted as requests or macro calls.  The
   tbl(1) page in groff 1.23.0 explicitly documents this use (the old
   one seems to have expected the reader to have access to CSTR #49 by
   Lesk).

    Rows of table entries can be interleaved with groff control lines;
    these do not count as table data.  On such lines the default control
    character (.) must be used (and not changed); the no‐break control
    character is not recognized.  To start the first table entry in a
    row with a dot, precede it with the token \&.

3. I added the dummy character even on "continuation" lines where a
   description overran.  This does no damage since the tab character
   remains there as an entry separator and the dummy character by itself
   is harmless as a marker of an empty table entry.  I even recommend
   this in the GNU tbl 1.23.0 man page; it's much nicer for people whose
   text editors don't visibly highlight tabs.

A _more_ idiomatic thing to do would be to use a spanning table
entry `\^` for rows where the description get continued, but that makes
no practical difference for a simple table layout like this one.

More idiomatic still, and well worth considering for the future, is
setting _all_ of these descriptions in text blocks.  This table looks to
me like it was laid out for an 80-column terminal with the excessively
long descriptions manually broken.  This looks suboptimal when typeset
and will look ridiculous on a wide terminal.

Also, use of a text block enables the employment of man(7) macros
instead of font selection escape sequences to change the typeface, and,
importantly for the near Linux man-pages future, use of the new `MR`
macro to cross reference the many pages referred to in these
descriptions.

I didn't pursue further revision along either of these lines because the
as I look at these the entries, the intensity of my urge to do a
top-to-bottom revision fixing the many infelicities and a few outright
errors increases exponentially with time.  There is even at least one
unescaped hyphen!  🤯

Regrettably, if a moderately experienced GNU/Linux user has gone 25
years without seeing this page, likely many others will go 25 more
without seeing it.  A good intro(1) page would cross reference it,
aiding the novice.

Unofficial patch attached.

Regards,
Branden
--- suffixes.7	2022-12-17 09:41:14.444969997 -0600
+++ suffixes.7.new	2022-12-17 09:41:06.261023174 -0600
@@ -13,9 +13,6 @@
 .\" Modified Thu Nov 16 23:28:25 2000 by David A. Wheeler
 .\"    <dwheeler@xxxxxxxxxxxx>
 .\"
-.\" "nroff" ("man") (or "tbl") needs a long page to avoid warnings
-.\" from "grotty" (at imagined page breaks).  Bug in grotty?
-.if n .pl 1000v
 .TH SUFFIXES 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 suffixes \- list of file suffixes
@@ -36,222 +33,222 @@
 _ | _
 lI |  l .
 Suffix	File type
- ,v	files for RCS (Revision Control System)
- -	backup file
- .C	C++ source code, equivalent to \fI.cc\fP
- .F	Fortran source with \fBcpp\fP(1) directives
-	or file compressed using freeze
- .S	assembler source with \fBcpp\fP(1) directives
- .Y	file compressed using yabba
- .Z	file compressed using \fBcompress\fP(1)
- .[0\-9]+gf	TeX generic font files
- .[0\-9]+pk	TeX packed font files
- .[1\-9]	manual page for the corresponding section
- .[1\-9][a-z]	manual page for section plus subsection
- .a	static object code library
- .ad	X application default resource file
- .ada	Ada source (may be body, spec, or combination)
- .adb	Ada body source
- .ads	Ada spec source
- .afm	PostScript font metrics
- .al	Perl autoload file
- .am	\fBautomake\fP(1) input file
- .arc	\fBarc\fP(1) archive
- .arj	\fBarj\fP(1) archive
- .asc	PGP ASCII-armored data
- .asm	(GNU) assembler source file
- .au	Audio sound file
- .aux	LaTeX auxiliary file
- .avi	(msvideo) movie
- .awk	AWK language program
- .b	LILO boot loader image
- .bak	backup file
- .bash	\fBbash\fP(1) shell script
- .bb	basic block list data produced by
-	gcc \-ftest\-coverage
- .bbg	basic block graph data produced by
-	gcc \-ftest\-coverage
- .bbl	BibTeX output
- .bdf	X font file
- .bib	TeX bibliographic database, BibTeX input
- .bm	bitmap source
- .bmp	bitmap
- .bz2	file compressed using \fBbzip2\fP(1)
- .c	C source
- .cat	message catalog files
- .cc	C++ source
- .cf	configuration file
- .cfg	configuration file
- .cgi	WWW content generating script or program
- .cls	LaTeX Class definition
- .class	Java compiled byte-code
- .conf	configuration file
- .config	configuration file
- .cpp	equivalent to \fI.cc\fR
- .csh	\fBcsh\fP(1) shell script
- .cxx	equivalent to \fI.cc\fR
- .dat	data file
- .deb	Debian software package
- .def	Modula-2 source for definition modules
- .def	other definition files
- .desc	initial part of mail message unpacked with
-	\fBmunpack\fP(1)
- .diff	file differences (\fBdiff\fP(1) command output)
- .dir	dbm data base directory file
- .doc	documentation file
- .dsc	Debian Source Control (source package)
- .dtx	LaTeX package source file
- .dvi	TeX's device independent output
- .el	Emacs-Lisp source
- .elc	compiled Emacs-Lisp source
- .eps	encapsulated PostScript
- .exp	Expect source code
- .f	Fortran source
- .f77	Fortran 77 source
- .f90	Fortran 90 source
- .fas	precompiled Common-Lisp
- .fi	Fortran include files
- .fig	FIG image file (used by \fBxfig\fP(1))
- .fmt	TeX format file
- .gif	Compuserve Graphics Image File format
- .gmo	GNU format message catalog
- .gsf	Ghostscript fonts
- .gz	file compressed using \fBgzip\fP(1)
- .h	C or C++ header files
- .help	help file
- .hf	equivalent to \fI.help\fP
- .hlp	equivalent to \fI.help\fP
- .htm	poor man's \fI.html\fP
- .html	HTML document used with the World Wide Web
- .hqx	7-bit encoded Macintosh file
- .i	C source after preprocessing
- .icon	bitmap source
- .idx	reference or datum-index file for hypertext
-	or database system
- .image	bitmap source
- .in	configuration template, especially for GNU Autoconf
- .info	files for the Emacs info browser
- .info-[0\-9]+	split info files
- .ins	LaTeX package install file for docstrip
- .itcl	itcl source code;
-	itcl ([incr Tcl]) is an OO extension of tcl
- .java	a Java source file
- .jpeg	Joint Photographic Experts Group format
- .jpg	poor man's \fI.jpeg\fP
- .kmap	\fBlyx\fP(1) keymap
- .l	equivalent to \fI.lex\fP or \fI.lisp\fP
- .lex	\fBlex\fP(1) or \fBflex\fP(1) files
- .lha	lharc archive
- .lib	Common-Lisp library
- .lisp	Lisp source
- .ln	files for use with \fBlint\fP(1)
- .log	log file, in particular produced by TeX
- .lsm	Linux Software Map entry
- .lsp	Common-Lisp source
- .lzh	lharc archive
- .m	Objective-C source code
- .m4	\fBm4\fP(1) source
- .mac	macro files for various programs
- .man	manual page (usually source rather than formatted)
- .map	map files for various programs
- .me	Nroff source using the me macro package
- .mf	Metafont (font generator for TeX) source
- .mgp	MagicPoint file
- .mm	sources for \fBgroff\fP(1) in mm - format
- .mo	Message catalog binary file
- .mod	Modula-2 source for implementation modules
- .mov	(quicktime) movie
- .mp	Metapost source
- .mp2	MPEG Layer 2 (audio) file
- .mp3	MPEG Layer 3 (audio) file
- .mpeg	movie file
- .o	object file
- .old	old or backup file
- .orig	backup (original) version of a file, from \fBpatch\fP(1)
- .out	output file, often executable program (a.out)
- .p	Pascal source
- .pag	dbm data base data file
- .patch	file differences for \fBpatch\fP(1)
- .pbm	portable bitmap format
- .pcf	X11 font files
- .pdf	Adobe Portable Data Format
-	(use Acrobat/\fBacroread\fP or \fBxpdf\fP)
- .perl	Perl source (see .ph, .pl, and .pm)
- .pfa	PostScript font definition files, ASCII format
- .pfb	PostScript font definition files, binary format
- .pgm	portable greymap format
- .pgp	PGP binary data
- .ph	Perl header file
- .php	PHP program file
- .php3	PHP3 program file
- .pid	File to store daemon PID (e.g., crond.pid)
- .pl	TeX property list file or Perl library file
- .pm	Perl module
- .png	Portable Network Graphics file
- .po	Message catalog source
- .pod	\fBperldoc\fP(1) file
- .ppm	portable pixmap format
- .pr	bitmap source
- .ps	PostScript file
- .py	Python source
- .pyc	compiled python
- .qt	quicktime movie
- .r	RATFOR source (obsolete)
- .rej	patches that \fBpatch\fP(1) couldn't apply
- .rpm	RPM software package
- .rtf	Rich Text Format file
- .rules	rules for something
- .s	assembler source
- .sa	stub libraries for a.out shared libraries
- .sc	\fBsc\fP(1) spreadsheet commands
- .scm	Scheme source code
- .sed	sed source file
- .sgml	SGML source file
- .sh	\fBsh\fP(1) scripts
- .shar	archive created by the \fBshar\fP(1) utility
- .so	Shared library or dynamically loadable object
- .sql	SQL source
- .sqml	SQML schema or query program
- .sty	LaTeX style files
- .sym	Modula-2 compiled definition modules
- .tar	archive created by the \fBtar\fP(1) utility
- .tar.Z	tar(1) archive compressed with \fBcompress\fP(1)
- .tar.bz2	tar(1) archive compressed with \fBbzip2\fP(1)
- .tar.gz	tar(1) archive compressed with \fBgzip\fP(1)
- .taz	tar(1) archive compressed with \fBcompress\fP(1)
- .tcl	tcl source code
- .tex	TeX or LaTeX source
- .texi	equivalent to \fI.texinfo\fP
- .texinfo	Texinfo documentation source
- .text	text file
- .tfm	TeX font metric file
- .tgz	tar archive compressed with \fBgzip\fP(1)
- .tif	poor man's \fI.tiff\fP
- .tiff	Tagged Image File Format
- .tk	tcl/tk script
- .tmp	temporary file
- .tmpl	template files
- .txt	equivalent to \fI.text\fP
- .uu	equivalent to \fI.uue\fP
- .uue	binary file encoded with \fBuuencode\fP(1)
- .vf	TeX virtual font file
- .vpl	TeX virtual property list file
- .w	Silvio Levi's CWEB
- .wav	wave sound file
- .web	Donald Knuth's WEB
- .wml	Source file for Web Meta Language
- .xbm	X11 bitmap source
- .xcf	GIMP graphic
- .xml	eXtended Markup Language file
- .xpm	X11 pixmap source
- .xs	Perl xsub file produced by h2xs
- .xsl	XSL stylesheet
- .y	\fByacc\fP(1) or \fBbison\fP(1) (parser generator) files
- .z	File compressed using \fBpack\fP(1) (or an old \fBgzip\fP(1))
- .zip	\fBzip\fP(1) archive
- .zoo	\fBzoo\fP(1) archive
- \(ti	Emacs or \fBpatch\fP(1) backup file
- rc	startup (`run control') file, e.g., \fI.newsrc\fP
+\&,v	files for RCS (Revision Control System)
+\&-	backup file
+\&.C	C++ source code, equivalent to \fI.cc\fP
+\&.F	Fortran source with \fBcpp\fP(1) directives
+\&	or file compressed using freeze
+\&.S	assembler source with \fBcpp\fP(1) directives
+\&.Y	file compressed using yabba
+\&.Z	file compressed using \fBcompress\fP(1)
+\&.[0\-9]+gf	TeX generic font files
+\&.[0\-9]+pk	TeX packed font files
+\&.[1\-9]	manual page for the corresponding section
+\&.[1\-9][a-z]	manual page for section plus subsection
+\&.a	static object code library
+\&.ad	X application default resource file
+\&.ada	Ada source (may be body, spec, or combination)
+\&.adb	Ada body source
+\&.ads	Ada spec source
+\&.afm	PostScript font metrics
+\&.al	Perl autoload file
+\&.am	\fBautomake\fP(1) input file
+\&.arc	\fBarc\fP(1) archive
+\&.arj	\fBarj\fP(1) archive
+\&.asc	PGP ASCII-armored data
+\&.asm	(GNU) assembler source file
+\&.au	Audio sound file
+\&.aux	LaTeX auxiliary file
+\&.avi	(msvideo) movie
+\&.awk	AWK language program
+\&.b	LILO boot loader image
+\&.bak	backup file
+\&.bash	\fBbash\fP(1) shell script
+\&.bb	basic block list data produced by
+\&	gcc \-ftest\-coverage
+\&.bbg	basic block graph data produced by
+\&	gcc \-ftest\-coverage
+\&.bbl	BibTeX output
+\&.bdf	X font file
+\&.bib	TeX bibliographic database, BibTeX input
+\&.bm	bitmap source
+\&.bmp	bitmap
+\&.bz2	file compressed using \fBbzip2\fP(1)
+\&.c	C source
+\&.cat	message catalog files
+\&.cc	C++ source
+\&.cf	configuration file
+\&.cfg	configuration file
+\&.cgi	WWW content generating script or program
+\&.cls	LaTeX Class definition
+\&.class	Java compiled byte-code
+\&.conf	configuration file
+\&.config	configuration file
+\&.cpp	equivalent to \fI.cc\fR
+\&.csh	\fBcsh\fP(1) shell script
+\&.cxx	equivalent to \fI.cc\fR
+\&.dat	data file
+\&.deb	Debian software package
+\&.def	Modula-2 source for definition modules
+\&.def	other definition files
+\&.desc	initial part of mail message unpacked with
+\&	\fBmunpack\fP(1)
+\&.diff	file differences (\fBdiff\fP(1) command output)
+\&.dir	dbm data base directory file
+\&.doc	documentation file
+\&.dsc	Debian Source Control (source package)
+\&.dtx	LaTeX package source file
+\&.dvi	TeX's device independent output
+\&.el	Emacs-Lisp source
+\&.elc	compiled Emacs-Lisp source
+\&.eps	encapsulated PostScript
+\&.exp	Expect source code
+\&.f	Fortran source
+\&.f77	Fortran 77 source
+\&.f90	Fortran 90 source
+\&.fas	precompiled Common-Lisp
+\&.fi	Fortran include files
+\&.fig	FIG image file (used by \fBxfig\fP(1))
+\&.fmt	TeX format file
+\&.gif	Compuserve Graphics Image File format
+\&.gmo	GNU format message catalog
+\&.gsf	Ghostscript fonts
+\&.gz	file compressed using \fBgzip\fP(1)
+\&.h	C or C++ header files
+\&.help	help file
+\&.hf	equivalent to \fI.help\fP
+\&.hlp	equivalent to \fI.help\fP
+\&.htm	poor man's \fI.html\fP
+\&.html	HTML document used with the World Wide Web
+\&.hqx	7-bit encoded Macintosh file
+\&.i	C source after preprocessing
+\&.icon	bitmap source
+\&.idx	reference or datum-index file for hypertext
+\&	or database system
+\&.image	bitmap source
+\&.in	configuration template, especially for GNU Autoconf
+\&.info	files for the Emacs info browser
+\&.info-[0\-9]+	split info files
+\&.ins	LaTeX package install file for docstrip
+\&.itcl	itcl source code;
+\&	itcl ([incr Tcl]) is an OO extension of tcl
+\&.java	a Java source file
+\&.jpeg	Joint Photographic Experts Group format
+\&.jpg	poor man's \fI.jpeg\fP
+\&.kmap	\fBlyx\fP(1) keymap
+\&.l	equivalent to \fI.lex\fP or \fI.lisp\fP
+\&.lex	\fBlex\fP(1) or \fBflex\fP(1) files
+\&.lha	lharc archive
+\&.lib	Common-Lisp library
+\&.lisp	Lisp source
+\&.ln	files for use with \fBlint\fP(1)
+\&.log	log file, in particular produced by TeX
+\&.lsm	Linux Software Map entry
+\&.lsp	Common-Lisp source
+\&.lzh	lharc archive
+\&.m	Objective-C source code
+\&.m4	\fBm4\fP(1) source
+\&.mac	macro files for various programs
+\&.man	manual page (usually source rather than formatted)
+\&.map	map files for various programs
+\&.me	Nroff source using the me macro package
+\&.mf	Metafont (font generator for TeX) source
+\&.mgp	MagicPoint file
+\&.mm	sources for \fBgroff\fP(1) in mm - format
+\&.mo	Message catalog binary file
+\&.mod	Modula-2 source for implementation modules
+\&.mov	(quicktime) movie
+\&.mp	Metapost source
+\&.mp2	MPEG Layer 2 (audio) file
+\&.mp3	MPEG Layer 3 (audio) file
+\&.mpeg	movie file
+\&.o	object file
+\&.old	old or backup file
+\&.orig	backup (original) version of a file, from \fBpatch\fP(1)
+\&.out	output file, often executable program (a.out)
+\&.p	Pascal source
+\&.pag	dbm data base data file
+\&.patch	file differences for \fBpatch\fP(1)
+\&.pbm	portable bitmap format
+\&.pcf	X11 font files
+\&.pdf	Adobe Portable Data Format
+\&	(use Acrobat/\fBacroread\fP or \fBxpdf\fP)
+\&.perl	Perl source (see .ph, .pl, and .pm)
+\&.pfa	PostScript font definition files, ASCII format
+\&.pfb	PostScript font definition files, binary format
+\&.pgm	portable greymap format
+\&.pgp	PGP binary data
+\&.ph	Perl header file
+\&.php	PHP program file
+\&.php3	PHP3 program file
+\&.pid	File to store daemon PID (e.g., crond.pid)
+\&.pl	TeX property list file or Perl library file
+\&.pm	Perl module
+\&.png	Portable Network Graphics file
+\&.po	Message catalog source
+\&.pod	\fBperldoc\fP(1) file
+\&.ppm	portable pixmap format
+\&.pr	bitmap source
+\&.ps	PostScript file
+\&.py	Python source
+\&.pyc	compiled python
+\&.qt	quicktime movie
+\&.r	RATFOR source (obsolete)
+\&.rej	patches that \fBpatch\fP(1) couldn't apply
+\&.rpm	RPM software package
+\&.rtf	Rich Text Format file
+\&.rules	rules for something
+\&.s	assembler source
+\&.sa	stub libraries for a.out shared libraries
+\&.sc	\fBsc\fP(1) spreadsheet commands
+\&.scm	Scheme source code
+\&.sed	sed source file
+\&.sgml	SGML source file
+\&.sh	\fBsh\fP(1) scripts
+\&.shar	archive created by the \fBshar\fP(1) utility
+\&.so	Shared library or dynamically loadable object
+\&.sql	SQL source
+\&.sqml	SQML schema or query program
+\&.sty	LaTeX style files
+\&.sym	Modula-2 compiled definition modules
+\&.tar	archive created by the \fBtar\fP(1) utility
+\&.tar.Z	tar(1) archive compressed with \fBcompress\fP(1)
+\&.tar.bz2	tar(1) archive compressed with \fBbzip2\fP(1)
+\&.tar.gz	tar(1) archive compressed with \fBgzip\fP(1)
+\&.taz	tar(1) archive compressed with \fBcompress\fP(1)
+\&.tcl	tcl source code
+\&.tex	TeX or LaTeX source
+\&.texi	equivalent to \fI.texinfo\fP
+\&.texinfo	Texinfo documentation source
+\&.text	text file
+\&.tfm	TeX font metric file
+\&.tgz	tar archive compressed with \fBgzip\fP(1)
+\&.tif	poor man's \fI.tiff\fP
+\&.tiff	Tagged Image File Format
+\&.tk	tcl/tk script
+\&.tmp	temporary file
+\&.tmpl	template files
+\&.txt	equivalent to \fI.text\fP
+\&.uu	equivalent to \fI.uue\fP
+\&.uue	binary file encoded with \fBuuencode\fP(1)
+\&.vf	TeX virtual font file
+\&.vpl	TeX virtual property list file
+\&.w	Silvio Levi's CWEB
+\&.wav	wave sound file
+\&.web	Donald Knuth's WEB
+\&.wml	Source file for Web Meta Language
+\&.xbm	X11 bitmap source
+\&.xcf	GIMP graphic
+\&.xml	eXtended Markup Language file
+\&.xpm	X11 pixmap source
+\&.xs	Perl xsub file produced by h2xs
+\&.xsl	XSL stylesheet
+\&.y	\fByacc\fP(1) or \fBbison\fP(1) (parser generator) files
+\&.z	File compressed using \fBpack\fP(1) (or an old \fBgzip\fP(1))
+\&.zip	\fBzip\fP(1) archive
+\&.zoo	\fBzoo\fP(1) archive
+\&\(ti	Emacs or \fBpatch\fP(1) backup file
+\&rc	startup (`run control') file, e.g., \fI.newsrc\fP
 .TE
 .SH STANDARDS
 General UNIX conventions.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux