Age | Commit message (Collapse) | Author |
|
and ignore .sp after .PP. This fixes vertical spacing
for blank lines after .PP and for .sp after .PP.
|
|
of the first list in a section, not before every item of the first list.
|
|
There are still lots of ugly line breaks, to be fixed later.
|
|
body of the item, mdoc(7) breaks the line, whereas the .TP used to
translate this to man(7) does not. Thus, insert an explicit roff(7)
line break in this place.
To be able to correctly count the characters, do not pass font escapes
an the like through print_word().
|
|
In -mdoc -Tman, improve the framework to control vertical spacing.
Use both to support .Bl -compact (surprisingly hard to get right).
|
|
was a non-text node. Fix this by rewriting post_nm() to always set
the meta name to UNKNOWN when the name is missing or unusable.
While here, make MANDOCERR_NONAME an ERROR, as it usually renders
the page content unintelligible.
Bug reported by Maxim <Belooussov at gmail dot com>, thanks.
|
|
* .Fn with exactly one argument
* .Bl -hang without a -width
Now all 3776 base manuals build without crashing.
|
|
All mdoc(7) macros are now supported by -Tman.
|
|
|
|
In the end, this turned out to be surprisingly simple;
of course, getting identical output will be quite hard,
so there is no way to quickly set up unit tests.
|
|
while here, do some minor outflags cleanup
|
|
* do not add an excessive blank line before the block
* in literal mode, start a new line after the tag
getting this to work requires some general (print_man_node) fixes:
* in literal mode, break the output line at the end of each
input line, not just after those input lines ending in text
* but don't break it when there was no output on the line
* and adjust the margins after the .HP tag
these general fixes require an adjustment to -Tascii .TP rendering:
* set up NOBREAK mode before the body, not after the head
finally, based on all this, implement -Tman .Bl -hang in terms of .HP
|
|
When the width of a tag in .Bl -hang was exactly one character
shorter than the maximum length that would fit, the following text
would have a negative hang of one character (i.e., hang to the left).
That bug is no longer present in groff-1.21, so relax mandoc, too.
|
|
* fix -Tman .Bl -bullet .It
* adjust the -Tascii .Bl -bullet -dash -hyphen .It
default and minimum width to new groff standards,
it changed from 4n (in groff 1.15) to 2n (in groff 1.21)
* same for -Tascii -enum, it changed from 5n to 2n
* use -hang formatting for -Tascii -enum -width 2n
* for -Tascii -enum, the default is -width 3n
|
|
and implement -Tman .Fd
|
|
|
|
To get the spacing right,
* avoid man(7) code line breaks at places where no spacing is allowed
* allow spacing right after .Sm on
* allow spacing after empty .Fl at the end of an input line
|
|
.Ad .Ar .Cd .Cm .Dv .Em .Er .Ev .Fa .Fl .Fn .Fo .Ft
.Ic .In .Lk .Li .Ms .Mt .Nm .Pa .Sx .Sy .Tn .Va .Vt
|
|
|
|
|
|
|
|
also reset -[no]split mode at .Sh AUTHORS in -Tascii
|
|
shortening some frequent idioms and preparing for better vertical
spacing in the SYNOPSIS; no functional change intended.
|
|
and passing around a structure containing them into each and every function,
just use a single static bitfield.
In preparation for adding more output flags to support more features.
|
|
and fix -Tman .Vt for the non-SYNOPSIS case
|
|
so avoid printing pointless goo in -Tman
|
|
|
|
again, some blank lines still missing from the output.
While here, remove the trailing semicolon
from .Fn when outside .Sh SYNOPSIS.
|
|
some blank lines are still missing from the output
|
|
|
|
Needed for sqlite3(1) as reported by espie@.
|
|
The reason was that `RS' wasn't BSCOPE'd, so the next-line (BLINE) scope
opened by `TP' would still be in the macro HEAD.
This was from joerg@'s archive of failures.
Fix by kristaps@, bsd.lv rev. 1.74.
|
|
|
|
|
|
|
|
|
|
* right after .Ns, avoid breaking the line in man code
* after .Fl without arguments, do not insert a blank into man code
* before each .Nm in .Sh SYNOPSIS, insert a .br into man code
* skip .Pp arguments, don't copy them to man code
|
|
To allow doing so, no longer abuse rew_scope() to unwind explicit blocks;
explicitly call man_unscope() instead.
Fixing the indentation of slapd.conf(5) in the OpenLDAP port;
thanks to guenther@ for the report.
|
|
after .TH, it works. Trying to redefine standard mdoc(7) macros before .Dd
works when calling groff with the -mdoc command line option, but does not
when calling groff with -mandoc; after .Dd, it always works.
Arguably, one might call that buggy behaviour in groff, but it is very
unlikely that anybody will change groff in this respect (certainly, i'm
not volunteering). So let's be bug-compatible.
This fixes the vertical spacing in sox(1).
|
|
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.
|
|
In particular, two cases were wrong:
- single-line .if with trailing whitespace gave no blank line
- multiline .if with \{ but without \{\ gave no blank line
While here, simplify roff_cond() by partially reordering the code.
|
|
profit of the occasion to pull out some spaghetti, that is,
three confusing variables and fourteen pointless assignments
among them; instead, always operate on the official pointers
**start, **end, and *sz, each of which conveys an obvious meaning.
No functional change intended, and the new tests confirm that
everything still (err...) "works", as far as that word can be
applied to the kind of roff(7) mock-up code i'm polishing here.
|
|
in particular when the inner escapes are preceded or followed by other terms.
While doing so, remove lots of bogus code that was trying to make pointless
distinctions between numeric and non-numeric escape sequences, while both
actually share the same syntax and we ignore the semantics anyway.
This prevents some of the strings defined in the pod2man(1) preamble
from producing garbage output, in particular in scandinavian words.
Of course, proper rendering of scandinavian national characters
cannot be expected even with these fixes.
|
|
character without advancing the cursor position; implement it to
simply skip the next character, as it will usually be overwritten.
With this change, the pod2man(1) preamble user-defined string \*:,
intended to render as a diaeresis or umlaut diacritic above the
preceding character, is rendered in a slightly less ugly way,
though still not correctly. It was rendered as "z.." and is now
rendered as ".".
Given that the definition of \*: uses elaborate manual \h positioning,
there is little chance for mandoc(1) to ever render it correctly,
but at least we can refrain from printing out a spurious "z", and
we can make the \z do something semi-reasonable for easier cases.
|
|
Groff forces the document author to manually request sufficient spacing
after .TE - that is, at least .sp 1v after a table with the "box" option
and at least .sp 2v after a table with the "doublebox" option - or else
it clobbers the box. I consider that insane, so i'm not imitating groff
in that respect. Instead, i add at least as much vertical space as groff,
or more where required to avoid clobbering the box.
Consequently, output will be identical for input that looks sane with
groff, and mandoc will make output look better for input that looks bad
with groff.
As a side effect, having identical output for portable input
makes it possible to set up the first regression tests for tbl(7).
|
|
flush right text, for boxes, and when more columns follow the span.
Issue found by sthen@ in the net/arp-scan(1) port manual.
|
|
instead save their properties with the following column.
This simplifies layout parsing and saves a lot of code
related to column handling.
At output time, print all white space and vertical lines
separating columns before printing the following column,
and none after printing the preceding column, considerably
simplifying white space handling and width calculations.
No functional change, but it saves 150 lines of code,
and it allows the next patch to tbl_term.c, tbl_literal().
|
|
default value for the mdoc(7) .Os macro.
Needed for man.cgi on the OpenBSD website.
Problem with man.cgi first noticed by deraadt@;
beck@ and deraadt@ agree with the way to solve the issue.
|
|
|
|
I refrained from merging one patch that i dislike
and one that requires additional review,
but we are now definitely much closer to 1.12.1 than to 1.12.0.
|