#
0ac7e6ec |
| 13-Mar-2020 |
schwarze <schwarze@openbsd.org> |
Split tagging into a validation part including prioritization in tag.{h,c} and {mdoc,man}_validate.c and into a formatting part including command line argument checking in term_tag.{h,c}, html.c, and
Split tagging into a validation part including prioritization in tag.{h,c} and {mdoc,man}_validate.c and into a formatting part including command line argument checking in term_tag.{h,c}, html.c, and {mdoc|man}_{term|html}.c.
Immediate functional benefits include: * Improved prioritization of automatic tags for .Em and .Sy. * Avoiding bogus automatic tags when .Em, .Fn, or .Sy are explicitly tagged. * Explicit tagging of .Er and .Fl now works in HTML output. * Automatic tagging of .IP and .TP now works in HTML output. But mainly, this patch provides clean earth to build further improvements on.
Technical changes: * Main program: Write a tag file for ASCII and UTF-8 output only. * All formatters: There is no more need to delay writing the tags. * mdoc(7)+man(7) formatters: No more need for elaborate syntax tree inspection. * HTML formatter: If available, use the "string" attribute as the tag. * HTML formatter: New function to write permalinks, to reduce code duplication.
Style cleanup in the vicinity while here: * mdoc(7) terminal formatter: To set up bold font for children, defer to termp_bold_pre() rather than calling term_fontpush() manually. * mdoc(7) terminal formatter: Garbage collect some duplicate functions. * mdoc(7) HTML formatter: Unify <code> handling, delete redundant functions. * Where possible, use switch statements rather than if cascades. * Get rid of some more Yoda notation.
The necessity for such changes was first discussed with kn@, but i didn't bother him with a request to review the resulting -673/+782 line patch.
show more ...
|
#
7ebbefbe |
| 27-Feb-2020 |
schwarze <schwarze@openbsd.org> |
Introduce the concept of nodes that are semantically transparent: they are skipped when looking for previous or following high-level macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm a
Introduce the concept of nodes that are semantically transparent: they are skipped when looking for previous or following high-level macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm and .Tg, and man(7) .DT and .PD. Use this concept for a variety of improved decisions in various validators and formatters.
While here, * remove a few const qualifiers on struct arguments that caused trouble; * get rid of some more Yoda notation in the vicinity; * and apply some other stylistic improvements in the vicinity.
I found this class of issues while considering .Tg patches from kn@.
show more ...
|
#
7f442bfe |
| 06-Jan-2019 |
schwarze <schwarze@openbsd.org> |
Finally, represent the man(7) .PP and .HP macros by the natural choice, which is <p> HTML element. On top of the previous fill-mode improvements, the key to making this possible is to automatically
Finally, represent the man(7) .PP and .HP macros by the natural choice, which is <p> HTML element. On top of the previous fill-mode improvements, the key to making this possible is to automatically close the <p> when required: before headers, subsequent paragraphs, lists, indented blocks, synopsis blocks, tbl(7) blocks, and before blocks using no-fill mode.
In man(7) documents, represent the .sp request by a blank line in no-fill mode and in the same way as .PP in fill mode.
show more ...
|
#
318aa4c1 |
| 17-Jun-2017 |
schwarze <schwarze@openbsd.org> |
if .in is used inside the .TP head, it's always relative
|
#
5d8f5ae1 |
| 03-Jun-2017 |
schwarze <schwarze@openbsd.org> |
ignore blank lines in man(7) next line scope; strange groff edge case behaviour found in multimedia/mjpegtools
|
#
b8d4b727 |
| 21-Sep-2015 |
schwarze <schwarze@openbsd.org> |
Trailing whitespace is significant when determining the width of a tag in mdoc(7) .Bl -tag and man(7) .TP, but not in man(7) .IP. Quirk reported by Jan Stary <hans at stare dot cz> on ports@.
|
#
9d496861 |
| 04-Sep-2015 |
schwarze <schwarze@openbsd.org> |
Fill mode changes don't break next-line scope in all cases, in particular not for tagged paragraphs. Issue found by Christian Neukirchen <chneukirchen at gmail dot com> in the exiv2(1) manual page.
|
#
2eb2afb2 |
| 16-Dec-2014 |
schwarze <schwarze@openbsd.org> |
Explicit block closure macros clobber next-line block head scope, just like explicit block macros themselves. Fixing an assertion failure jsg@ found with afl.
|
#
5e5ff21e |
| 07-Jul-2014 |
schwarze <schwarze@openbsd.org> |
Clean up ERROR messages related to document structure and macros: Hierarchical naming and mention macro names in messages.
|
#
b723eac2 |
| 02-Jul-2014 |
schwarze <schwarze@openbsd.org> |
Clean up warnings related to macros and nesting. * Hierarchical naming of enum mandocerr items. * Improve the wording to make it comprehensible. * Mention the offending macro. * Garbage collect one c
Clean up warnings related to macros and nesting. * Hierarchical naming of enum mandocerr items. * Improve the wording to make it comprehensible. * Mention the offending macro. * Garbage collect one chunk of ancient, long unreachable code.
show more ...
|
#
eeb5fd14 |
| 08-Apr-2014 |
schwarze <schwarze@openbsd.org> |
Add a new term_flushln() flag TERMP_BRIND (if break, then indent) to control indentation of continuation lines in TERMP_NOBREAK mode. In the past, this was always on; continue using it for .Bl, .Nm,
Add a new term_flushln() flag TERMP_BRIND (if break, then indent) to control indentation of continuation lines in TERMP_NOBREAK mode. In the past, this was always on; continue using it for .Bl, .Nm, .Fn, .Fo, and .HP, but no longer for .IP and .TP.
I looked at this because sthen@ reported the issue in a manual of a Perl module from ports, but it affects base, too: This patch reduces groff-mandoc differences in base by more than 15%.
show more ...
|
#
074125cb |
| 08-Mar-2014 |
schwarze <schwarze@openbsd.org> |
To find out whether .TP head arguments are same-line or next-line arguments, use the MAN_LINE flag instead of the man_node line member. This is required such that user-defined macros wrapping .TP wor
To find out whether .TP head arguments are same-line or next-line arguments, use the MAN_LINE flag instead of the man_node line member. This is required such that user-defined macros wrapping .TP work correctly.
Issue found by Havard Eidnes in Tcl_NewStringObj(3), reported via the NetBSD bug tracking system and Thomas Klausner <wiz at NetBSD>.
show more ...
|
#
59bce20c |
| 13-Jul-2013 |
schwarze <schwarze@openbsd.org> |
Check handling of two consecutive .TP lines. Related to ports/textproc/groff/patches/patch-tmac_an-old_tmac rev. 1.3.
|
#
b20fee8f |
| 18-Nov-2012 |
schwarze <schwarze@openbsd.org> |
Check that mandoc handles non-numeric width arguments to .Bl -tag and .TP the same way as groff, even via -Tman. Some time ago, millert@ reported issues with these; apparently, those issues were fixe
Check that mandoc handles non-numeric width arguments to .Bl -tag and .TP the same way as groff, even via -Tman. Some time ago, millert@ reported issues with these; apparently, those issues were fixed since then.
show more ...
|
#
2e5f490f |
| 17-Nov-2011 |
schwarze <schwarze@openbsd.org> |
Complete overhaul of the mandoc(1) test suite. * Test the recently introduced -Tman output mode, too. * Specify date and OS arguments in all tests. * Remove the kludge of sed(1)ing away the page foot
Complete overhaul of the mandoc(1) test suite. * Test the recently introduced -Tman output mode, too. * Specify date and OS arguments in all tests. * Remove the kludge of sed(1)ing away the page footer lines. * New make(1) variables SKIP_TMAN, SKIP_GROFF. * Drop obsolete, clumsy make(1) variable GROFF_TARGETS. * Delete obsolete mdoc/Bl/E*.sh error reporting tests. * Silence char/N/basic. * New targets: - ascii, ascii-clean - to run -Tascii tests only - tman, tman-clean - to run the new -Tman tests only - obj-clean - maintainer only, needed before groff-clean and groff - groff-clean - maintainer only, affects checked-in files
show more ...
|
#
31f2280f |
| 24-Jul-2011 |
schwarze <schwarze@openbsd.org> |
check that a macro works in the head of a tagged paragraph; found in my tree
|
#
63c0a9e0 |
| 04-Jan-2011 |
schwarze <schwarze@openbsd.org> |
Fix stupid commit error pointed out by guenther@ (thanks!): 1) Actually commit TP/* this time. 2) Revert IP/* to 1.1, which is the correct version.
What happened is that i committed both IP/* and TP
Fix stupid commit error pointed out by guenther@ (thanks!): 1) Actually commit TP/* this time. 2) Revert IP/* to 1.1, which is the correct version.
What happened is that i committed both IP/* and TP/* into IP, committing two versions in one commit, because the file TP/CVS/Repository was corrupt in my tree. I didn't even know that could happen...
show more ...
|