Partial support for the \n[an-margin] number register.
authorschwarze <schwarze@openbsd.org>
Tue, 13 Jun 2017 19:33:24 +0000 (19:33 +0000)
committerschwarze <schwarze@openbsd.org>
Tue, 13 Jun 2017 19:33:24 +0000 (19:33 +0000)
commited5ade8a10aff55a52ecae41bf4ca6e808d010e4
treedbe83867ace0b5f18e54000160bea69f15325b12
parent659e968ee685873d1ba8a955d021c90d4cfc0156
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.
regress/usr.bin/mandoc/man/RS/Makefile
regress/usr.bin/mandoc/man/RS/an-margin.in [new file with mode: 0644]
regress/usr.bin/mandoc/man/RS/an-margin.out_ascii [new file with mode: 0644]
usr.bin/mandoc/man_macro.c