Up to [cvsweb.bsd.lv] / mandoc
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: HEAD
Revision 1.47 / (download) - annotate - [select for diffs], Sun Jan 5 18:14:39 2025 UTC (6 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.46: +1 -2 lines
Diff to previous 1.46 (unified)
In the tbl(7) layout parser, use the roff(7) numerical expression parser to support arithmetic operations in column width modifiers. Documentation authors ought to focus on semantic markup and avoid trying to manipulate presentational details. Consequently, using tbl(7) is discouraged in the first place, using column width modifiers even more so, and complicating them by performing arithmetics yet more so. However, the madhouse called DocBook relies on this feature. For example, DocBook XSL version 1.79.2 generates man(7)+tbl(7) code that abuses arithmetics in column width modifiers to format things as simple and mundane as numbered lists, resulting in atrocious layout that is very hard to read. Last year, tb@ reported git-reset(1) as an example of an affected manual page. Properly parsing the width in the tbl(7) parser allows removal of some incomplete ad-hoc parsing from the tbl(7) formatter, where it didn't really belong.