]> git.cameronkatri.com Git - mandoc.git/commit
Partial support for the \n[an-margin] number register.
authorIngo Schwarze <schwarze@openbsd.org>
Tue, 13 Jun 2017 19:34:40 +0000 (19:34 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Tue, 13 Jun 2017 19:34:40 +0000 (19:34 +0000)
commit3352a8e9bd0f6a0666c5dcb84ccdb5536471d280
tree7e1a05bb64c2b95a6e4932ee9443151fd48ff660
parenta03895d16836ec105b7b21d6333f6b137f1d349e
Partial support for the \n[an-margin] number register.

Manuals autogenerated from reStructuredText are reckless enough
to peek at this non-portable, implementation-dependent, highly
groff-specific internal register - for no good reason, because the
man(7) language natively provides in a much simpler way what they
are trying to emulate here with much fragility.

A full implementation would be very hard because it would require
access to output-device-specific formatting data at the roff(7)
preprocessor stage, which mandoc doesn't support at all.
So hardcode a few magic numbers as reStructuredText expects them
for terminal output.  For other output modes (like HTML), code using
this register is utterly broken anyway.
man_macro.c
regress/man/RS/Makefile
regress/man/RS/an-margin.in [new file with mode: 0644]
regress/man/RS/an-margin.out_ascii [new file with mode: 0644]