summaryrefslogtreecommitdiffstats
path: root/tmac/tmac.antimes
Commit message (Collapse)AuthorAgeFilesLines
* tmac/tmac.an*: work around formatter bugG. Branden Robinson2025-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...when rendering some man pages, such as those of ncurses. I did not manage (nor seriously attempt) to identify the root cause of this bug. ncurses's use of `SH` and `SS` man(7) macros is unremarkable.[1] I cannot account for why the less(1) man page renders fine and ncurses pages like insstr(3) do not. But render badly they do, emitting *roff logic as formatted output. ``` $ 9 nroff -man $(man -w insstr) | grep -F .ss | cat -v "'''if^GNAME^GSYNOPSIS^G .ss 18 NAME "'''if^GSYNOPSIS^GSYNOPSIS^G .ss 18 SYNOPSIS "'''if^GDESCRIPTION^GSYNOPSIS^G .ss 18 DESCRIPTION "'''if^GRETURN^GSYNOPSIS^G .ss 18 RETURN VALUE "'''if^GNOTES^GSYNOPSIS^G .ss 18 NOTES "'''if^GEXTENSIONS^GSYNOPSIS^G .ss 18 EXTENSIONS "'''if^GPORTABILITY^GSYNOPSIS^G .ss 18 PORTABILITY "'''if^GHISTORY^GSYNOPSIS^G .ss 18 HISTORY "'''if^GSEE^GSYNOPSIS^G .ss 18 SEE ALSO ``` With this patch: ``` $ 9 nroff -man $(man -w insstr) | grep -F .ss | cat -v | grep . || echo NO OUTPUT NO OUTPUT ``` I do observe that the problem seems to correspond to the only use in the package of the old-fashioned `'''` commenting convention _within a macro definition_. I have a notion of how GNU troff works, but little about AT&T troff. That said, if I were to try to get to the bottom of this problem, I'd look into if and how the no-break command character is handled differently in copy mode. I see nothing in CSTR #54 to suggest that the command characters have different meanings in copy mode and its complement.[2] My solution is to use idiomatic comment syntax inside macro definitions. [1] https://github.com/ThomasDickey/ncurses-snapshots/blob/d5dc8a4a7c15474652d73dee37d905c8205f6ab4/man/curs_insstr.3x#L47 [2] unnamed in AT&T documentation but which I term "interpretation mode" in groff
* tmac/tmac.an*: support `lq`, `rq` stringsG. Branden Robinson2025-10-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | The `lq` and `rq` strings are not a groffism, but _almost_ universally portable to man(7) renderers. They originate in 4BSD (1980).[1] They entered Unix System V with SVR4 (1988 or 1989).[2] mandoc(1) has supported them since its inception.[3] * tmac/tmac.an: * tmac/tmac.antimes: Do it. Use U+201C and U+201D if the output device is "utf", otherwise define them as `` and ''. Don't define them as `"` because that breaks when interpolating the strings in macro arguments.[4] [1] https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/lib/tmac/tmac.an.new [2] https://github.com/ryanwoodsmall/oldsysv/blob/e68293af91e2dc39f5f29c20d7e429f9e0cabc75/sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/an#L46 [3] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/predefs.in?rev=1.1&content-type=text/x-cvsweb-markup [4] https://www.gnu.org/software/groff/manual/groff.html.node/Calling-Macros.html "For the (neutral) double quote, you have recourse to an obscure syntactical feature of AT&T troff. ..."
* Many small edits.rsc2005-01-131-1/+3
|
* More files!rsc2004-05-151-0/+509