161d06d6bSBaptiste Daroussin************************************************************************ 261d06d6bSBaptiste Daroussin* Official mandoc TODO. 3*06410c1bSAlexander Ziaee* $Id: TODO,v 1.338 2025/07/22 13:36:54 schwarze Exp $ 461d06d6bSBaptiste Daroussin************************************************************************ 561d06d6bSBaptiste Daroussin 661d06d6bSBaptiste DaroussinMany issues are annotated for difficulty as follows: 761d06d6bSBaptiste Daroussin 861d06d6bSBaptiste Daroussin - loc = locality of the issue 961d06d6bSBaptiste Daroussin * single file issue, affects file only, or very few 1061d06d6bSBaptiste Daroussin ** single module issue, affects several files of one module 1161d06d6bSBaptiste Daroussin *** cross-module issue, significantly impacts multiple modules 1261d06d6bSBaptiste Daroussin and may require substantial changes to internal interfaces 1361d06d6bSBaptiste Daroussin - exist = difficulty of the existing code in this area 1461d06d6bSBaptiste Daroussin * affected code is straightforward and easy to read and change 1561d06d6bSBaptiste Daroussin ** affected code is somewhat complex, but once you understand 1661d06d6bSBaptiste Daroussin the design, not particularly difficult to understand 1761d06d6bSBaptiste Daroussin *** affected code uses a special, exceptionally tricky design 1861d06d6bSBaptiste Daroussin - algo = difficulty of the new algorithm to be written 1961d06d6bSBaptiste Daroussin * the required logic and code is straightforward 2061d06d6bSBaptiste Daroussin ** the required logic is somewhat complex and needs a careful design 2161d06d6bSBaptiste Daroussin *** the required logic is exceptionally tricky, 2261d06d6bSBaptiste Daroussin maybe an approach to solve that is not even known yet 2361d06d6bSBaptiste Daroussin - size = the amount of code to be written or changed 2461d06d6bSBaptiste Daroussin * a small number of lines (at most 100, usually much less) 2561d06d6bSBaptiste Daroussin ** a considerable amount of code (several dozen to a few hundred) 2661d06d6bSBaptiste Daroussin *** a large amount of code (many hundreds, maybe thousands) 2761d06d6bSBaptiste Daroussin - imp = importance of the issue 2861d06d6bSBaptiste Daroussin * mostly for completeness 2961d06d6bSBaptiste Daroussin ** would be nice to have 3061d06d6bSBaptiste Daroussin *** issue causes considerable inconvenience 3161d06d6bSBaptiste Daroussin 3261d06d6bSBaptiste DaroussinObviously, as the issues have not been solved yet, these annotations 3361d06d6bSBaptiste Daroussinare mere guesses, and some may be wrong. 3461d06d6bSBaptiste Daroussin 3561d06d6bSBaptiste Daroussin************************************************************************ 366d38604fSBaptiste Daroussin* assertion failures 376d38604fSBaptiste Daroussin************************************************************************ 386d38604fSBaptiste Daroussin 396d38604fSBaptiste Daroussin- .if n .ce in the middle of .TS data 406d38604fSBaptiste Daroussin afl case f1/id:000103,sig:06,src:009024+009105,op:splice,rep:2 (jes@) 416d38604fSBaptiste Daroussin While roff_parseln() prevents .ce and similar requests in the middle 426d38604fSBaptiste Daroussin of a tbl, the guard is no longer effective when the .ce is wrapped 436d38604fSBaptiste Daroussin in a roff block, for example a conditional. The resulting assertion 446d38604fSBaptiste Daroussin has never been seen in any real-world manual page. 456d38604fSBaptiste Daroussin This is too dangerous to fix before release because it requires 466d38604fSBaptiste Daroussin reorganizing the very delicate internals of roff_parseln(), 476d38604fSBaptiste Daroussin which risks causing more severe bugs. 486d38604fSBaptiste Daroussin loc * exist *** algo *** size * imp * 496d38604fSBaptiste Daroussin 506d38604fSBaptiste Daroussin 516d38604fSBaptiste Daroussin************************************************************************ 526d38604fSBaptiste Daroussin* bugs: invalid output 536d38604fSBaptiste Daroussin************************************************************************ 546d38604fSBaptiste Daroussin 556d38604fSBaptiste Daroussin- wrong number of layout columns in tbl(7) code generated by -T man 566d38604fSBaptiste Daroussin https://savannah.gnu.org/bugs/?57720 576d38604fSBaptiste Daroussin The reason likely is that tbl(7) does not support the -Bl -column 586d38604fSBaptiste Daroussin feature of not explicitly specifying the last table column. 596d38604fSBaptiste Daroussin loc ** exist * algo ** size * imp *** 606d38604fSBaptiste Daroussin 616d38604fSBaptiste Daroussin- eqn(7) delimiters cause conditional lines to misbehave 626d38604fSBaptiste Daroussin nabijaczleweli 8 Sep 2021 15:24:48 +0200 636d38604fSBaptiste Daroussin loc * exist *** algo *** size * imp * 646d38604fSBaptiste Daroussin 656d38604fSBaptiste Daroussin- roff.c, roff_expand() should not remove blanks before comments 666d38604fSBaptiste Daroussin to Oliver Corff, Sep 7, 2021 676d38604fSBaptiste Daroussin loc * exist * algo * size * imp * 686d38604fSBaptiste Daroussin but watch out for regressions in the high-level parsers 696d38604fSBaptiste Daroussin maybe it should not even remove comments? - consider T{\" 706d38604fSBaptiste Daroussin 71c1c95addSBrooks Davis- In the body of conditional requests, escape sequence expansion 72c1c95addSBrooks Davis must not be performed if the condition is false. This implies 73c1c95addSBrooks Davis the first part of a request line must be expanded before 74c1c95addSBrooks Davis request parsing (like it is now), but expansion in the second 75c1c95addSBrooks Davis part must be delayed. 76c1c95addSBrooks Davis to Nab 8 Aug 2023 20:05:32 +0200 Subject: if/ie d condition always true 77c1c95addSBrooks Davis loc ** exist *** algo *** size ** imp * 78c1c95addSBrooks Davis 796d38604fSBaptiste Daroussin 806d38604fSBaptiste Daroussin************************************************************************ 8161d06d6bSBaptiste Daroussin* missing features 8261d06d6bSBaptiste Daroussin************************************************************************ 8361d06d6bSBaptiste Daroussin 8461d06d6bSBaptiste Daroussin--- missing roff features ---------------------------------------------- 8561d06d6bSBaptiste Daroussin 8661d06d6bSBaptiste Daroussin- .ad (adjust margins) 8761d06d6bSBaptiste Daroussin .ad l -- adjust left margin only (flush left) 8861d06d6bSBaptiste Daroussin .ad r -- adjust right margin only (flush right) 8961d06d6bSBaptiste Daroussin .ad c -- center text on line 9061d06d6bSBaptiste Daroussin .ad b -- adjust both margins (alias: .ad n) 9161d06d6bSBaptiste Daroussin .na -- temporarily disable adjustment without changing the mode 9261d06d6bSBaptiste Daroussin .ad -- re-enable adjustment without changing the mode 9361d06d6bSBaptiste Daroussin Adjustment mode is ignored while in no-fill mode (.nf). 9461d06d6bSBaptiste Daroussin loc *** exist *** algo ** size ** imp ** (parser reorg would help) 9561d06d6bSBaptiste Daroussin 9661d06d6bSBaptiste Daroussin- .fc (field control) 9761d06d6bSBaptiste Daroussin found by naddy@ in xloadimage(1) 9861d06d6bSBaptiste Daroussin loc ** exist *** algo * size * imp * 9961d06d6bSBaptiste Daroussin 10061d06d6bSBaptiste Daroussin- .ns (no-space mode) occurs in xine-config(1) 10161d06d6bSBaptiste Daroussin when implementing this, also let .TH set it 10261d06d6bSBaptiste Daroussin reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500 10361d06d6bSBaptiste Daroussin loc *** exist *** algo *** size ** imp * 10461d06d6bSBaptiste Daroussin 10561d06d6bSBaptiste Daroussin- \w'' improve width measurements 10661d06d6bSBaptiste Daroussin would not be very useful without an expression parser, see below 10761d06d6bSBaptiste Daroussin needed for Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 10861d06d6bSBaptiste Daroussin loc ** exist *** algo *** size * imp *** 10961d06d6bSBaptiste Daroussin 11045a5aec3SBaptiste Daroussin- .als only works for macros in mandoc, not for user-defined strings. 11145a5aec3SBaptiste Daroussin Also, the "val" field in struct roffkv would have to be replaced 11245a5aec3SBaptiste Daroussin with a pointer to a reference-counted wrapper, and an alias 11345a5aec3SBaptiste Daroussin would have to point to the same wrapper as the original. 11445a5aec3SBaptiste Daroussin .als to undefined does nothing; the alias is not created. 11545a5aec3SBaptiste Daroussin .rm'ing the original leaves the alias to point to the old value. 11645a5aec3SBaptiste Daroussin .de .als .de changes both, but 11745a5aec3SBaptiste Daroussin .de .als .rm .de only changes the new value, not the alias. 11845a5aec3SBaptiste Daroussin Found in groffer(1) version 1.19 11945a5aec3SBaptiste Daroussin Jan Stary 20 Apr 2019 20:16:54 +0200 12045a5aec3SBaptiste Daroussin loc * exist ** algo ** size ** imp * 12145a5aec3SBaptiste Daroussin 12245a5aec3SBaptiste Daroussin- roff string condition comparisons fail when vars contain quotes: 12345a5aec3SBaptiste Daroussin .ds s ' 12445a5aec3SBaptiste Daroussin .if '\*s'' \&... 12545a5aec3SBaptiste Daroussin hard to fix because of the basic architecture (string replacement 12645a5aec3SBaptiste Daroussin happens before roff(7) syntax parsing) 12745a5aec3SBaptiste Daroussin Found in groffer(1) version 1.19 12845a5aec3SBaptiste Daroussin Jan Stary 20 Apr 2019 20:16:54 +0200 12945a5aec3SBaptiste Daroussin loc * exist *** algo *** size ** imp * 13045a5aec3SBaptiste Daroussin 1316d38604fSBaptiste Daroussin- mandoc replaces all ASCII control characters except tab and line feed 1326d38604fSBaptiste Daroussin with '?' during input. It would be better to replace them with 1336d38604fSBaptiste Daroussin Unicode escapes in preconv_encode() or somewhere in the vicinity, 1346d38604fSBaptiste Daroussin such that the already existing better replacement strings show 1356d38604fSBaptiste Daroussin up in the output. Emulating groff is not desirable: groff replaces 1366d38604fSBaptiste Daroussin 0x00, 0x0b, and 0x0d to 0x1f with the empty string (bad because 1376d38604fSBaptiste Daroussin that's easy to overlook for the document author), 0x01 with '.' 1386d38604fSBaptiste Daroussin (very confusing), and passes through 0x02 to 0x08, 0x0c, and 0x7f 1396d38604fSBaptiste Daroussin raw (bad because that is insecure output). Remember that 0x07 may 1406d38604fSBaptiste Daroussin need special handling because it is sometimes used for certain 1416d38604fSBaptiste Daroussin delimiters, so it may need handling *after* roff.c rather than before. 1426d38604fSBaptiste Daroussin reminded by John Gardner 16 Jun 2020 14:26:28 +1000 1436d38604fSBaptiste Daroussin Actually, more ASCII control characters than just 0x07 may need 1446d38604fSBaptiste Daroussin later handling because they can for example be used in macro names. 1456d38604fSBaptiste Daroussin So they may need handling after roff(7) processing. 1466d38604fSBaptiste Daroussin pointed out by John Gardner 23 Jun 2020 18:28:08 +1000 1476d38604fSBaptiste Daroussin more info from John Gardner 29 Jun 2020 19:54:04 +1000 1486d38604fSBaptiste Daroussin loc ** exist ** algo ** size ** imp * 1496d38604fSBaptiste Daroussin 1506d38604fSBaptiste Daroussin- many missing features used in old groff_char(7), 1516d38604fSBaptiste Daroussin some can possibly be supported 1526d38604fSBaptiste Daroussin kamil at netbsd 12 Nov 2020 17:27:09 +0100 + reply 1536d38604fSBaptiste Daroussin 1546d38604fSBaptiste Daroussin- \s with arbitrary arg delimiters as already supported for other escapes 1556d38604fSBaptiste Daroussin found following jmc@'s mail 28 Apr 2021 18:31:41 +0100 1566d38604fSBaptiste Daroussin loc * exist * algo * size * imp * 1576d38604fSBaptiste Daroussin 15861d06d6bSBaptiste Daroussin--- missing mdoc features ---------------------------------------------- 15961d06d6bSBaptiste Daroussin 160c1c95addSBrooks Davis- support mixed case for section names 161c1c95addSBrooks Davis also, first section is not "NAME" should not appear more than once per page 162c1c95addSBrooks Davis Alejandro Colomar 28 Apr 2023 16:57:49 +0200 163c1c95addSBrooks Davis loc * exist * algo * size * imp *** 164c1c95addSBrooks Davis 1656d38604fSBaptiste Daroussin- .Sh and .Ss should be parsed and partially callable, see groff_mdoc(7) 1666d38604fSBaptiste Daroussin reed at reedmedia dot net Sat, 21 Dec 2019 17:13:07 -0600 1676d38604fSBaptiste Daroussin loc ** exist ** algo ** size ** imp * 1686d38604fSBaptiste Daroussin 16961d06d6bSBaptiste Daroussin- .Bl -column .Xo support is missing 17061d06d6bSBaptiste Daroussin ultimate goal: 17161d06d6bSBaptiste Daroussin restore .Xr and .Dv to 17261d06d6bSBaptiste Daroussin lib/libc/compat-43/sigvec.3 17361d06d6bSBaptiste Daroussin lib/libc/gen/signal.3 17461d06d6bSBaptiste Daroussin lib/libc/sys/sigaction.2 17561d06d6bSBaptiste Daroussin loc * exist *** algo *** size * imp ** 17661d06d6bSBaptiste Daroussin 17761d06d6bSBaptiste Daroussin- edge case: decide how to deal with blk_full bad nesting, e.g. 17861d06d6bSBaptiste Daroussin .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1) 17961d06d6bSBaptiste Daroussin from jmc@ Wed, 14 Jul 2010 18:10:32 +0100 18061d06d6bSBaptiste Daroussin loc * exist *** algo *** size ** imp ** 18161d06d6bSBaptiste Daroussin 18261d06d6bSBaptiste Daroussin- .Bd -filled should not be the same as .Bd -ragged, but align both 18361d06d6bSBaptiste Daroussin the left and right margin. In groff, it is implemented in terms 18461d06d6bSBaptiste Daroussin of .ad b, which we don't have either. Found in cksum(1). 18561d06d6bSBaptiste Daroussin loc *** exist *** algo ** size ** imp ** (parser reorg would help) 18661d06d6bSBaptiste Daroussin 18761d06d6bSBaptiste Daroussin- implement blank `Bl -column', such as 18861d06d6bSBaptiste Daroussin .Bl -column 18961d06d6bSBaptiste Daroussin .It foo Ta bar 19061d06d6bSBaptiste Daroussin .El 19161d06d6bSBaptiste Daroussin loc * exist *** algo *** size * imp * 19261d06d6bSBaptiste Daroussin 19361d06d6bSBaptiste Daroussin- explicitly disallow nested `Bl -column', which would clobber internal 19461d06d6bSBaptiste Daroussin flags defined for struct mdoc_macro 19561d06d6bSBaptiste Daroussin loc * exist * algo * size * imp ** 19661d06d6bSBaptiste Daroussin 19761d06d6bSBaptiste Daroussin- In .Bl -column .It, the end of the line probably has to be regarded 19861d06d6bSBaptiste Daroussin as an implicit .Ta, if there could be one, see the following mildly 19961d06d6bSBaptiste Daroussin ugly code from login.conf(5): 20061d06d6bSBaptiste Daroussin .Bl -column minpasswordlen program xetcxmotd 20161d06d6bSBaptiste Daroussin .It path Ta path Ta value of Dv _PATH_DEFPATH 20261d06d6bSBaptiste Daroussin .br 20361d06d6bSBaptiste Daroussin Default search path. 20461d06d6bSBaptiste Daroussin reported by Michal Mazurek <akfaew at jasminek dot net> 20561d06d6bSBaptiste Daroussin via jmc@ Thu, 7 Apr 2011 16:00:53 +0059 20661d06d6bSBaptiste Daroussin loc * exist *** algo ** size * imp ** 20761d06d6bSBaptiste Daroussin 20861d06d6bSBaptiste Daroussin- inside `.Bl -column' phrases, punctuation is handled like normal 20961d06d6bSBaptiste Daroussin text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -." 21061d06d6bSBaptiste Daroussin 21161d06d6bSBaptiste Daroussin- inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf' 21261d06d6bSBaptiste Daroussin is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab." 21361d06d6bSBaptiste Daroussin but should give "ab ." 21461d06d6bSBaptiste Daroussin 21561d06d6bSBaptiste Daroussin- prohibit `Nm' from having non-text HEAD children 21661d06d6bSBaptiste Daroussin (e.g., NetBSD mDNSShared/dns-sd.1) 21761d06d6bSBaptiste Daroussin (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified) 21861d06d6bSBaptiste Daroussin 21961d06d6bSBaptiste Daroussin- support translated section names 22061d06d6bSBaptiste Daroussin e.g. x11/scrotwm scrotwm_es.1:21:2: error: NAME section must be first 22161d06d6bSBaptiste Daroussin that one uses NOMBRE because it is spanish... 22261d06d6bSBaptiste Daroussin deraadt tends to think that section-dependent macro behaviour 22361d06d6bSBaptiste Daroussin is a bad idea in the first place, so this may be irrelevant 22461d06d6bSBaptiste Daroussin loc ** exist ** algo ** size * imp ** 22561d06d6bSBaptiste Daroussin 22661d06d6bSBaptiste Daroussin- When there is free text in the SYNOPSIS and that free text contains 22761d06d6bSBaptiste Daroussin the .Nm macro, groff somehow understands to treat the .Nm as an in-line 22861d06d6bSBaptiste Daroussin macro, while mandoc treats it as a block macro and breaks the line. 22961d06d6bSBaptiste Daroussin No idea how the logic for distinguishing in-line and block instances 23061d06d6bSBaptiste Daroussin should be, needs investigation. 23161d06d6bSBaptiste Daroussin uqs@ Thu, 2 Jun 2011 11:03:51 +0200 23261d06d6bSBaptiste Daroussin uqs@ Thu, 2 Jun 2011 11:33:35 +0200 23361d06d6bSBaptiste Daroussin loc * exist ** algo *** size * imp ** 23461d06d6bSBaptiste Daroussin 23561d06d6bSBaptiste Daroussin--- missing man features ----------------------------------------------- 23661d06d6bSBaptiste Daroussin 23780c12959SAlexander Ziaee- When calling less(1), specify -P to print "name(sec) lines ..." 23880c12959SAlexander Ziaee in the bottom line instead of "/tmp/man..." 23980c12959SAlexander Ziaee Jan Engelhardt (SuSE) via Matej Cepl 06 Apr 2025 14:42:52 +0200 24080c12959SAlexander Ziaee loc * exist * algo * size * imp ** 24180c12959SAlexander Ziaee 2426d38604fSBaptiste Daroussin- MANWIDTH 2436d38604fSBaptiste Daroussin Markus Waldeck <waldeck at gmx dot de> 9 Jun 2015 05:49:56 +0200 2446d38604fSBaptiste Daroussin Laura Morales <lauretas at mail dot com> 26 Apr 2018 08:15:55 +0200 2456d38604fSBaptiste Daroussin Kamil Rytarowski <kamil at netbsd> 13 Nov 2020 00:19:36 +0100 2466d38604fSBaptiste Daroussin patch from Kamil 13 Nov 2020 22:37:07 +0100 2476d38604fSBaptiste Daroussin loc * exist * algo * size * imp * 2486d38604fSBaptiste Daroussin 24961d06d6bSBaptiste Daroussin- groff_www(7) .MTO and .URL 25061d06d6bSBaptiste Daroussin These macros were used by the GNU grep(1) man page. 25161d06d6bSBaptiste Daroussin The groff_www(7) manual page itself uses them, too. 25261d06d6bSBaptiste Daroussin We should probably *not* add them to mandoc. 25361d06d6bSBaptiste Daroussin Just mentioning this here to keep track of the abuse. 25461d06d6bSBaptiste Daroussin Laura Morales <lauretas at mail dot com> 20 Apr 2018 07:33:02 +0200 25561d06d6bSBaptiste Daroussin loc ** exist * algo * size ** imp * 25661d06d6bSBaptiste Daroussin 25761d06d6bSBaptiste Daroussin--- missing tbl features ----------------------------------------------- 25861d06d6bSBaptiste Daroussin 25961d06d6bSBaptiste Daroussin- vertical centering in cells vertically spanned with ^ 26061d06d6bSBaptiste Daroussin pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 26161d06d6bSBaptiste Daroussin loc * exist *** algo *** size ** imp * 26261d06d6bSBaptiste Daroussin 26361d06d6bSBaptiste Daroussin- support mdoc(7) and man(7) macros inside tbl(7) code; 26461d06d6bSBaptiste Daroussin probably requires the parser reorg and letting tbl(7) 26561d06d6bSBaptiste Daroussin use roff_node such that macro sets can mix; 26661d06d6bSBaptiste Daroussin informed by bapt@ that FreeBSD needs this: 3 Jan 2015 23:32:23 +0100 26761d06d6bSBaptiste Daroussin loc *** exist ** algo *** size ** imp *** 26861d06d6bSBaptiste Daroussin 26961d06d6bSBaptiste Daroussin- look at the POSIX manuals in the books/man-pages-posix port, 2707295610fSBaptiste Daroussin they use some unsupported tbl(7) features, mostly macros in tbl(7). 27161d06d6bSBaptiste Daroussin loc * exist ** algo ** size ** imp *** 27261d06d6bSBaptiste Daroussin 27361d06d6bSBaptiste Daroussin- look what Joerg Schilling manual pages use 27461d06d6bSBaptiste Daroussin Thu, 19 Mar 2015 18:31:48 +0100 27561d06d6bSBaptiste Daroussin 27661d06d6bSBaptiste Daroussin--- missing eqn features ----------------------------------------------- 27761d06d6bSBaptiste Daroussin 27861d06d6bSBaptiste Daroussin- In a matrix, break the output line after each matrix line. 2797295610fSBaptiste Daroussin Found in the discussion at CDBUG 2015. Suggested by Avi Weinstock. 2807295610fSBaptiste Daroussin This may not be the ideal solution after all: eqn(7) matrices 2817295610fSBaptiste Daroussin are lists of columns, so Avi's proposal would show each *column* 2827295610fSBaptiste Daroussin on its own *line*, which is likely to cause confusion. 2837295610fSBaptiste Daroussin A better solution, but much harder to implement, would be to 2847295610fSBaptiste Daroussin actually show the coordinates of column vectors on different 2857295610fSBaptiste Daroussin terminal output lines, using the clumnated output facilities 2867295610fSBaptiste Daroussin developed for .Bl -tag, .Bl -column, and also used for tbl(7). 2877295610fSBaptiste Daroussin loc * exist * algo ** size ** imp ** 28861d06d6bSBaptiste Daroussin 28961d06d6bSBaptiste Daroussin- The "size" keyword is parsed, but ignored by the formatter. 29061d06d6bSBaptiste Daroussin loc * exist * algo * size * imp * 29161d06d6bSBaptiste Daroussin 29261d06d6bSBaptiste Daroussin- The spacing characters `~', `^', and tab are currently ignored, 29361d06d6bSBaptiste Daroussin see User's Guide (Second Edition) page 2 section 4. 29461d06d6bSBaptiste Daroussin loc * exist * algo ** size * imp ** 29561d06d6bSBaptiste Daroussin 29661d06d6bSBaptiste Daroussin- Mark and lineup are parsed and ignored, 29761d06d6bSBaptiste Daroussin see User's Guide (Second Edition) page 5 section 15. 29861d06d6bSBaptiste Daroussin loc ** exist ** algo ** size ** imp ** 29961d06d6bSBaptiste Daroussin 30061d06d6bSBaptiste Daroussin- GNU eqn converts some operators to special characters, for example, 30161d06d6bSBaptiste Daroussin input HYPHEN-MINUS becomes output \(mi, unless it is part of a 30261d06d6bSBaptiste Daroussin quoted word. mandoc(1) only does this when the operator is 30361d06d6bSBaptiste Daroussin surrounded by blanks, not when it is part of an unquoted word. 30461d06d6bSBaptiste Daroussin Also, check whether there are more such cases (e.g., +?). 30561d06d6bSBaptiste Daroussin reported by bentley@ 20 Jun 2017 02:04:29 -0600 30661d06d6bSBaptiste Daroussin loc * exist ** algo ** size * imp * 30761d06d6bSBaptiste Daroussin 30861d06d6bSBaptiste Daroussin- Primes, opprime, and ' 30961d06d6bSBaptiste Daroussin bentley@ Thu, 13 Jul 2017 23:14:20 -0600 31061d06d6bSBaptiste Daroussin 31161d06d6bSBaptiste Daroussin--- missing misc features ---------------------------------------------- 31261d06d6bSBaptiste Daroussin 313c1c95addSBrooks Davis- use the default volume headers for sections with suffixes 314c1c95addSBrooks Davis certainly affects man(7); possibly mdoc(7)?; and also groff(1) 315c1c95addSBrooks Davis Alejandro Colomar 21 Aug 2022 316c1c95addSBrooks Davis 317c1c95addSBrooks Davis- consider whether man(1) fallback code in main.c/fs_*() can find files 3186d38604fSBaptiste Daroussin like man3c/fopen.3c (illumos, Solaris) and man3p/fopen.3p (POSIX) 3196d38604fSBaptiste Daroussin discussed with Robert Mustacchi 21 Sep 2021 10:39:40 -0700 3206d38604fSBaptiste Daroussin loc * exist * algo ** size * imp ** 3216d38604fSBaptiste Daroussin 3226d38604fSBaptiste Daroussin- let makewhatis(8) follow symbolic links to dirs below READ_ALLOWED_PATH 3236d38604fSBaptiste Daroussin this may be feasible using fts_set(FTS_FOLLOW) 3246d38604fSBaptiste Daroussin mail to sternenseemann 19 Aug 2021 19:11:50 +0200 3256d38604fSBaptiste Daroussin loc * exist ** algo ** size * imp ** 3266d38604fSBaptiste Daroussin 327c1c95addSBrooks Davis- handle Unicode letters in tags in both HTML and terminal output 328c1c95addSBrooks Davis thread "section headers with diacritics" starting with 329c1c95addSBrooks Davis Mario Blaettermann 24 Mar 2022 18:13:23 +0100 330c1c95addSBrooks Davis loc ** exist * algo * size * imp ** 331c1c95addSBrooks Davis 3326d38604fSBaptiste Daroussin- -T man does not handle eqn(7) and tbl(7) 3336d38604fSBaptiste Daroussin Stephen Gregoratto 16 Feb 2020 01:28:07 +1100 3346d38604fSBaptiste Daroussin also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901636 3356d38604fSBaptiste Daroussin loc ** exist ** algo ** size *** imp ** 3366d38604fSBaptiste Daroussin 33761d06d6bSBaptiste Daroussin- man -ks 1,8 route; kn@ Jul 13, 2018 orally 33861d06d6bSBaptiste Daroussin 33961d06d6bSBaptiste Daroussin- italic correction (\/) in PostScript mode 34061d06d6bSBaptiste Daroussin Werner LEMBERG on groff at gnu dot org Sun, 10 Nov 2013 12:47:46 34161d06d6bSBaptiste Daroussin loc ** exist ** algo * size * imp * 34261d06d6bSBaptiste Daroussin 34361d06d6bSBaptiste Daroussin- change the default PAGER to more -Es and use the pager 34461d06d6bSBaptiste Daroussin even for apropos title line output; req by bapt@ 34561d06d6bSBaptiste Daroussin loc * exist * algo * size * imp *** 34661d06d6bSBaptiste Daroussin 34761d06d6bSBaptiste Daroussin- clean up escape sequence handling, creating three classes: 34861d06d6bSBaptiste Daroussin (1) fully implemented, or parsed and ignored without loss of content 34961d06d6bSBaptiste Daroussin (2) unimplemented, potentially causing loss of content 35061d06d6bSBaptiste Daroussin or serious mangling of formatting (e.g. \n) -> ERROR 35161d06d6bSBaptiste Daroussin see textproc/mgdiff(1) for nice examples 35261d06d6bSBaptiste Daroussin (3) undefined, just output the character -> perhaps WARNING 35361d06d6bSBaptiste Daroussin loc *** exist ** algo ** size ** imp *** (parser reorg helps) 35461d06d6bSBaptiste Daroussin 355c1c95addSBrooks Davis- man.conf(5) alias aliasname dirname or just -Mb -Mx -Mp 356c1c95addSBrooks Davis mail to jmc@ Mar 23, 2015 03:53:14PM +0100 357c1c95addSBrooks Davis loc * exist * algo * size * imp ** 358c1c95addSBrooks Davis 35961d06d6bSBaptiste Daroussin- kettenis wants base roff, ms, and me Fri, 1 Jan 2010 22:13:15 +0100 (CET) 36061d06d6bSBaptiste Daroussin loc ** exist ** algo ** size *** imp * 36161d06d6bSBaptiste Daroussin 36261d06d6bSBaptiste Daroussin--- compatibility checks ----------------------------------------------- 36361d06d6bSBaptiste Daroussin 36461d06d6bSBaptiste Daroussin- is .Bk implemented correctly in modern groff? 36561d06d6bSBaptiste Daroussin sobrado@ Tue, 19 Apr 2011 22:12:55 +0200 36661d06d6bSBaptiste Daroussin 36761d06d6bSBaptiste Daroussin- compare output to Heirloom roff, Solaris roff, and 36861d06d6bSBaptiste Daroussin http://repo.or.cz/w/neatroff.git http://litcave.rudi.ir/ 36961d06d6bSBaptiste Daroussin 37061d06d6bSBaptiste Daroussin- look at AT&T DWB http://www2.research.att.com/sw/download 37161d06d6bSBaptiste Daroussin Carsten Kunze <carsten dot kunze at arcor dot de> has patches 37261d06d6bSBaptiste Daroussin Mon, 4 Aug 2014 17:01:28 +0200 37361d06d6bSBaptiste Daroussin ported version: https://github.com/n-t-roff/DWB3.3 37461d06d6bSBaptiste Daroussin Carsten Kunze Wed, 22 Apr 2015 11:21:43 +0200 37561d06d6bSBaptiste Daroussin 37661d06d6bSBaptiste Daroussin- look at pages generated from reStructeredText, e.g. devel/mercurial hg(1) 37761d06d6bSBaptiste Daroussin These are a weird mixture of man(7) and custom autogenerated low-level 37861d06d6bSBaptiste Daroussin roff stuff. Figure out to what extent we can cope. 37961d06d6bSBaptiste Daroussin For details, see http://docutils.sourceforge.net/rst.html 38061d06d6bSBaptiste Daroussin noted by stsp@ Sat, 24 Apr 2010 09:17:55 +0200 38161d06d6bSBaptiste Daroussin reminded by nicm@ Mon, 3 May 2010 09:52:41 +0100 38261d06d6bSBaptiste Daroussin 38361d06d6bSBaptiste Daroussin- look at pages generated from ronn(1) github.com/rtomayko/ronn 38461d06d6bSBaptiste Daroussin (based on markdown) 38561d06d6bSBaptiste Daroussin 38661d06d6bSBaptiste Daroussin- look at pages generated from Texinfo source by yat2m, e.g. security/gnupg 38761d06d6bSBaptiste Daroussin First impression is not that bad. 38861d06d6bSBaptiste Daroussin 38961d06d6bSBaptiste Daroussin- look at pages generated by pandoc; see 39061d06d6bSBaptiste Daroussin https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Writers/Man.hs 39161d06d6bSBaptiste Daroussin porting planned by kili@ Thu, 19 Jun 2014 19:46:28 +0200 39261d06d6bSBaptiste Daroussin 39361d06d6bSBaptiste Daroussin- check compatibility with Plan9: 39461d06d6bSBaptiste Daroussin http://swtch.com/usr/local/plan9/tmac/tmac.an 39561d06d6bSBaptiste Daroussin http://swtch.com/plan9port/man/man7/man.html 39661d06d6bSBaptiste Daroussin "Anthony J. Bentley" <anthonyjbentley@gmail.com> 28 Dec 2010 21:58:40 -0700 39761d06d6bSBaptiste Daroussin 39861d06d6bSBaptiste Daroussin- check compatibility with COHERENT troff: 39961d06d6bSBaptiste Daroussin http://www.nesssoftware.com/home/mwc/source.php 40061d06d6bSBaptiste Daroussin 40161d06d6bSBaptiste Daroussin- check compatibility with the man(7) formatter 40261d06d6bSBaptiste Daroussin https://raw.githubusercontent.com/rofl0r/hardcore-utils/master/man.c 40361d06d6bSBaptiste Daroussin 40461d06d6bSBaptiste Daroussin- check compatibility with 40561d06d6bSBaptiste Daroussin http://ikiwiki.info/plugins/contrib/mandoc/ 40661d06d6bSBaptiste Daroussin https://github.com/schmonz/ikiwiki/compare/mandoc 40761d06d6bSBaptiste Daroussin Amitai Schlair Mon, 19 May 2014 14:05:53 -0400 40861d06d6bSBaptiste Daroussin 40945a5aec3SBaptiste Daroussin- check compatibility with 41045a5aec3SBaptiste Daroussin https://git.sr.ht/~sircmpwn/scdoc 41145a5aec3SBaptiste Daroussin 41261d06d6bSBaptiste Daroussin- check features of the Slackware man.conf(5) format 41361d06d6bSBaptiste Daroussin Carsten Kunze Wed, 11 Mar 2015 17:57:24 +0100 41461d06d6bSBaptiste Daroussin 4156d38604fSBaptiste Daroussin- look at http://www.snake.net/software/troffcvt/ (troff to HTML) 4166d38604fSBaptiste Daroussin mentioned by Oliver Corff 22 Jan 2021 01:36:49 +0100 4176d38604fSBaptiste Daroussin 4186d38604fSBaptiste Daroussin 41961d06d6bSBaptiste Daroussin************************************************************************ 42061d06d6bSBaptiste Daroussin* formatting issues: ugly output 42161d06d6bSBaptiste Daroussin************************************************************************ 42261d06d6bSBaptiste Daroussin 42361d06d6bSBaptiste Daroussin- revisit empty in-line macros 42461d06d6bSBaptiste Daroussin look at the difference between "Em x Em ." and "Sq x Em ." 42561d06d6bSBaptiste Daroussin Carsten Kunze Fri, 12 Dec 2014 00:15:41 +0100 42661d06d6bSBaptiste Daroussin loc *** exist *** algo *** size * imp ** 42761d06d6bSBaptiste Daroussin 42861d06d6bSBaptiste Daroussin- a column list with blank `Ta' cells triggers a spurious 42961d06d6bSBaptiste Daroussin start-with-whitespace printing of a newline 43061d06d6bSBaptiste Daroussin 43161d06d6bSBaptiste Daroussin- In .Bl -column, .It a<tab>"b<tab>c" 43261d06d6bSBaptiste Daroussin shows the quotes in groff, but not in mandoc 43361d06d6bSBaptiste Daroussin loc * exist *** algo ** size * imp ** 43461d06d6bSBaptiste Daroussin 43561d06d6bSBaptiste Daroussin- In .Bl -column, 43661d06d6bSBaptiste Daroussin .It Em Authentication<tab>Key Length 43761d06d6bSBaptiste Daroussin ought to render "Key Length" with emphasis, too, 43861d06d6bSBaptiste Daroussin see OpenBSD iked.conf(5). 43961d06d6bSBaptiste Daroussin reported again Nicolas Joly via wiz@ Wed, 12 Oct 2011 00:20:00 +0200 44061d06d6bSBaptiste Daroussin loc * exist *** algo *** size ** imp *** 44161d06d6bSBaptiste Daroussin 44261d06d6bSBaptiste Daroussin- empty phrases in .Bl column produce too few blanks 44361d06d6bSBaptiste Daroussin try e.g. .Bl -column It Ta Ta 44461d06d6bSBaptiste Daroussin reported by millert Fri, 02 Apr 2010 16:13:46 -0400 44561d06d6bSBaptiste Daroussin loc * exist *** algo *** size * imp ** 44661d06d6bSBaptiste Daroussin 44761d06d6bSBaptiste Daroussin- .%T can have trailing punctuation. Currently, it puts the trailing 44861d06d6bSBaptiste Daroussin punctuation into a trailing MDOC_TEXT element inside its own scope. 44961d06d6bSBaptiste Daroussin That element should rather be outside its scope, such that the 45061d06d6bSBaptiste Daroussin punctuation does not get underlines. This is not trivial to 45161d06d6bSBaptiste Daroussin implement because .%T then needs some features of in_line_eoln() - 45261d06d6bSBaptiste Daroussin slurp all arguments into one single text element - and one feature 45361d06d6bSBaptiste Daroussin of in_line() - put trailing punctuation out of scope. 45461d06d6bSBaptiste Daroussin Found in mount_nfs(8) and exports(5), search for "Appendix". 45561d06d6bSBaptiste Daroussin loc ** exist ** algo *** size * imp ** 45661d06d6bSBaptiste Daroussin 45761d06d6bSBaptiste Daroussin- Trailing punctuation after .%T triggers EOS spacing, at least 45861d06d6bSBaptiste Daroussin outside .Rs (eek!). Simply setting ARGSFL_DELIM for .%T is not 45961d06d6bSBaptiste Daroussin the right solution, it sends mandoc into an endless loop. 46061d06d6bSBaptiste Daroussin reported by Nicolas Joly Sat, 17 Nov 2012 11:49:54 +0100 46161d06d6bSBaptiste Daroussin loc * exist ** algo ** size * imp ** 46261d06d6bSBaptiste Daroussin 46361d06d6bSBaptiste Daroussin- global variables in the SYNOPSIS of section 3 pages 46461d06d6bSBaptiste Daroussin .Vt vs .Vt/.Va vs .Ft/.Va vs .Ft/.Fa ... 46561d06d6bSBaptiste Daroussin from kristaps@ Tue, 08 Jun 2010 11:13:32 +0200 46661d06d6bSBaptiste Daroussin 46761d06d6bSBaptiste Daroussin- implicit whitespace around inline equations 46861d06d6bSBaptiste Daroussin example code: where '$times$' denotes matrix multiplication 46961d06d6bSBaptiste Daroussin must not have an HTML line break, nor a blank, before <math> 47061d06d6bSBaptiste Daroussin partial solution: html.c {"math", HTML_NLINSIDE | HTML_INDENT}, 47161d06d6bSBaptiste Daroussin bentley@ Thu, 13 Jul 2017 19:00:59 -0600 47261d06d6bSBaptiste Daroussin 47361d06d6bSBaptiste Daroussin- in enclosures, mandoc sometimes fancies a bogus end of sentence 47461d06d6bSBaptiste Daroussin reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059 47561d06d6bSBaptiste Daroussin loc * exist ** algo *** size * imp *** 47661d06d6bSBaptiste Daroussin 477c1c95addSBrooks Davis- the man(7) single-font macros (e.g. .B) use .itc, 478c1c95addSBrooks Davis so ".B foo\c" followed by "bar" prints "bar" in bold 479c1c95addSBrooks Davis gbranden@ Sun, 5 Jun 2022 18:08:46 -0500 480c1c95addSBrooks Davis 48161d06d6bSBaptiste Daroussin- a line starting with "\fB something" counts as starting with whitespace 48261d06d6bSBaptiste Daroussin and triggers a line break; found in audio/normalize-mp3(1) 4837295610fSBaptiste Daroussin This will become easier once escape sequences are represented 4847295610fSBaptiste Daroussin by syntax tree nodes. 48561d06d6bSBaptiste Daroussin loc ** exist * algo ** size * imp ** 48661d06d6bSBaptiste Daroussin 48761d06d6bSBaptiste Daroussin- formatting /usr/local/man/man1/latex2man.1 with groff and mandoc 48861d06d6bSBaptiste Daroussin reveals lots of bugs both in groff and mandoc... 48961d06d6bSBaptiste Daroussin reported by bentley@ Wed, 22 May 2013 23:49:30 -0600 49061d06d6bSBaptiste Daroussin 49180c12959SAlexander Ziaee- Make an underlined blank an underscore rather than a blank in both 49280c12959SAlexander Ziaee groff and mandoc terminal output (likely tricky, needs investigation) 49380c12959SAlexander Ziaee job@ 21 Jan 2025 18:03:52 +0000 49480c12959SAlexander Ziaee 49561d06d6bSBaptiste Daroussin--- PostScript and PDF issues ------------------------------------------ 49661d06d6bSBaptiste Daroussin 49761d06d6bSBaptiste Daroussin- PDF output doesn't use a monospaced font for .Bd -literal 49861d06d6bSBaptiste Daroussin Example: "mandoc -Tpdf afterboot.8 > output.pdf && pdfviewer output.pdf". 49961d06d6bSBaptiste Daroussin Search the text "Routing tables". 50061d06d6bSBaptiste Daroussin Also check what PostScript mode does when fixing this. 50161d06d6bSBaptiste Daroussin reported by juanfra@ Wed, 04 Jun 2014 21:44:58 +0200 50261d06d6bSBaptiste Daroussin instructions from juanfra@ Wed, 11 Jun 2014 02:21:01 +0200 50361d06d6bSBaptiste Daroussin add a new <</Type /Font>> block to the PDF files with /BaseFont /Courier 50461d06d6bSBaptiste Daroussin and change the /Name from /F0 to the new font (/F5 (?)). 50561d06d6bSBaptiste Daroussin re-reported by tb@ Mon, 16 Mar 2015 16:47:21 +0100 5066d38604fSBaptiste Daroussin loc ** exist ** algo ** size * imp ** 50761d06d6bSBaptiste Daroussin 508*06410c1bSAlexander Ziaee- Check for bad line breaks caused by PostScript and PDF using variable- 509*06410c1bSAlexander Ziaee width fonts, for example in .Bl -width "string". The difficulty line 510*06410c1bSAlexander Ziaee below describes a naive solution by simply scaling up widths internally 511*06410c1bSAlexander Ziaee or adding default spacing (like in terminal output). If fixes are 512*06410c1bSAlexander Ziaee needed in width measurements, it might be a bit harder, but likely 513*06410c1bSAlexander Ziaee not unreasonably so. 514*06410c1bSAlexander Ziaee reported by Jan Stary 20 May 2024 10:19:01 +0200 515*06410c1bSAlexander Ziaee loc * exist * algo ** size * imp ** 516*06410c1bSAlexander Ziaee 51761d06d6bSBaptiste Daroussin--- HTML issues -------------------------------------------------------- 51861d06d6bSBaptiste Daroussin 519c1c95addSBrooks Davis- support the idiom .TP .IP .TP for multi-paragraph list item bodies 520c1c95addSBrooks Davis to: Alejandro Colomar Thu, 19 Oct 2023 16:45:21 +0200 521c1c95addSBrooks Davis loc ** exist ** algo ** size ** imp ** 522c1c95addSBrooks Davis 523c1c95addSBrooks Davis- .Nm without an argument and .Bx cause premature </pre> 524c1c95addSBrooks Davis Nab Sun, 5 Jun 2022 18:30:09 +0200 525c1c95addSBrooks Davis 526c1c95addSBrooks Davis- .Aq Mt could set and reset "white-space: nowrap"; 527c1c95addSBrooks Davis Check whether other enclosure macros could profit from similar handling, 528c1c95addSBrooks Davis or whether that is covered by Unicode line-breaking classes WJ, ZW, GL, ZWJ. 529c1c95addSBrooks Davis John Gardner 25 Mar 2022 04:44:27 +1100 530c1c95addSBrooks Davis 531c1c95addSBrooks Davis- make the HTML scaffolding customizable with -O skip=... 5326d38604fSBaptiste Daroussin mail to Oliver Corff 3 Jun 2021 17:28:02 +0200 5336d38604fSBaptiste Daroussin more feedback from Oliver 3 Jun 2021 18:27:56 +0200 5346d38604fSBaptiste Daroussin more feedback from Oliver 3 Jun 2021 23:37:18 +0200 535c1c95addSBrooks Davis would also be useful for 536c1c95addSBrooks Davis https://github.com/gbdev/rgbds-www/blob/master/ 537c1c95addSBrooks Davis maintainer/support/man_postproc.awk 5386d38604fSBaptiste Daroussin 5396d38604fSBaptiste Daroussin- .Bd -unfilled should not use monospaced font 5406d38604fSBaptiste Daroussin anton@ 4 Mar 2021 08:19:35 +0100 5416d38604fSBaptiste Daroussin loc ** exist * algo * size * imp ** 5426d38604fSBaptiste Daroussin 543c1c95addSBrooks Davis- HTML formatting of .nf should avoid <br/>, 544c1c95addSBrooks Davis even when input lines start with whitespace, 5456d38604fSBaptiste Daroussin and not close and re-open <pre> on .P 5466d38604fSBaptiste Daroussin my mail to ports@ 27 Jun 2021 16:09:20 +0200 547c1c95addSBrooks Davis reported again by Mohamed Akram 25 Jun 2022 16:28:18 +0000 5486d38604fSBaptiste Daroussin loc ** exist ** algo * size * imp ** 5496d38604fSBaptiste Daroussin 550c1c95addSBrooks Davis- tbl(7) HTML output does not implement column width specifications 551c1c95addSBrooks Davis reported by Ted Bullock 11 Jan 2022 16:00:44 -0700 552c1c95addSBrooks Davis loc * exist * algo ? size ? imp * 553c1c95addSBrooks Davis 554c1c95addSBrooks Davis- link from flags in the SYNOPSIS to their descriptions 555c1c95addSBrooks Davis https://github.com/gbdev/rgbds-www/blob/master/ 556c1c95addSBrooks Davis maintainer/support/man_postproc.awk 557c1c95addSBrooks Davis loc * exist * algo ** size * imp * 558c1c95addSBrooks Davis 5596d38604fSBaptiste Daroussin- get rid of the last handful of style= attributes such that 5606d38604fSBaptiste Daroussin Content-Security-Policy: can be enabled without unsafe-inline 5616d38604fSBaptiste Daroussin suggested by bentley@ Nov 10, 2019 at 06:02:49AM -0700 5626d38604fSBaptiste Daroussin loc * exist * algo * size * imp ** 5636d38604fSBaptiste Daroussin 56461d06d6bSBaptiste Daroussin- .Bf at the beginning of a paragraph inserts a bogus 1ex horizontal 56561d06d6bSBaptiste Daroussin space, see for example random(3). Introduced in 56661d06d6bSBaptiste Daroussin http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_html.c.diff?r1=1.91&r2=1.92 56761d06d6bSBaptiste Daroussin reported by deraadt@ Mon, 28 Sep 2015 20:14:13 -0600 (MDT) 56861d06d6bSBaptiste Daroussin loc ** exist ** algo ** size * imp * 56961d06d6bSBaptiste Daroussin 57061d06d6bSBaptiste Daroussin- jsg on icb, Nov 3, 2014: 57161d06d6bSBaptiste Daroussin try to guess Xr in man(7) for hyperlinking 57261d06d6bSBaptiste Daroussin and render them with <a class="Xr" href=...> 57361d06d6bSBaptiste Daroussin https://github.com/Debian/debiman/issues/15 57461d06d6bSBaptiste Daroussin loc * exist * algo ** size ** imp ** 57561d06d6bSBaptiste Daroussin 5766d38604fSBaptiste Daroussin- space characters can end up in href= attributes, for example coming 5776d38604fSBaptiste Daroussin from the first .Xr argument (where they make no sense, but still); 5786d38604fSBaptiste Daroussin does this affect other characters, other source macros...? 5796d38604fSBaptiste Daroussin Jackson Pauls 29 Aug 2017 16:56:27 +0100 5806d38604fSBaptiste Daroussin 58161d06d6bSBaptiste Daroussin- generate <img> tags in HTML 58261d06d6bSBaptiste Daroussin idea from florian@ Tue, 7 Apr 2015 00:26:28 +0000 58361d06d6bSBaptiste Daroussin may be possible to implement with .Lk img://something.png alt_text 58461d06d6bSBaptiste Daroussin 58561d06d6bSBaptiste Daroussin- check https://github.com/trentm/mdocml 58661d06d6bSBaptiste Daroussin 587c1c95addSBrooks Davis--- CSS issues --------------------------------------------------------- 588c1c95addSBrooks Davis 589c1c95addSBrooks Davis- use flexbox for .Bl-tag instead of the fragile float/clear mechanism 590c1c95addSBrooks Davis John Gardner 25 Mar 2022 04:44:27 +1100 591c1c95addSBrooks Davis 592c1c95addSBrooks Davis 59361d06d6bSBaptiste Daroussin************************************************************************ 59461d06d6bSBaptiste Daroussin* formatting issues: gratuitous differences 59561d06d6bSBaptiste Daroussin************************************************************************ 59661d06d6bSBaptiste Daroussin 59761d06d6bSBaptiste Daroussin- .Fn reopens a new scope after punctuation in mandoc, 59861d06d6bSBaptiste Daroussin but closes its scope for good in groff. 59961d06d6bSBaptiste Daroussin Do we want to change mandoc or groff? 60061d06d6bSBaptiste Daroussin Steffen Nurpmeso Sat, 08 Nov 2014 13:34:59 +0100 60161d06d6bSBaptiste Daroussin loc * exist ** algo ** size * imp ** 60261d06d6bSBaptiste Daroussin 603c1c95addSBrooks Davis- Multiple issues with .In below SYNOPSIS; groff behaviour is: 604c1c95addSBrooks Davis text line + .In -> no line break before #include 605c1c95addSBrooks Davis called .In -> no line break before angle bracket 606c1c95addSBrooks Davis .In + .In -> second one gets #include, too 607c1c95addSBrooks Davis two arguments -> line break before second 608c1c95addSBrooks Davis child macro -> line break before child 609c1c95addSBrooks Davis .In + text line -> line break before the text line 610c1c95addSBrooks Davis Evan Silberman Fri, 20 Sep 2024 16:48:19 -0700 611c1c95addSBrooks Davis loc ** exist ** algo * size * imp * 612c1c95addSBrooks Davis 613c1c95addSBrooks Davis- In .Bl -enum -width 0n, groff continues on the same line after 61461d06d6bSBaptiste Daroussin the number, mandoc breaks the line. 61561d06d6bSBaptiste Daroussin mail to kristaps@ Mon, 20 Jul 2009 02:21:39 +0200 61661d06d6bSBaptiste Daroussin loc * exist ** algo ** size * imp ** 61761d06d6bSBaptiste Daroussin 61861d06d6bSBaptiste Daroussin- .Pp between two .It in .Bl -column should produce one, 61961d06d6bSBaptiste Daroussin not two blank lines, see e.g. login.conf(5). 62061d06d6bSBaptiste Daroussin reported by jmc@ Sun, 17 Apr 2011 14:04:58 +0059 62161d06d6bSBaptiste Daroussin reported again by sthen@ Wed, 18 Jan 2012 02:09:39 +0000 (UTC) 62261d06d6bSBaptiste Daroussin loc * exist *** algo ** size * imp ** 62361d06d6bSBaptiste Daroussin 62461d06d6bSBaptiste Daroussin- If the *first* line after .It is .Pp, break the line right after 62561d06d6bSBaptiste Daroussin the tag, do not pad with space characters before breaking. 62661d06d6bSBaptiste Daroussin See the description of the a, c, and i commands in sed(1). 62761d06d6bSBaptiste Daroussin loc * exist ** algo ** size * imp ** 62861d06d6bSBaptiste Daroussin 62961d06d6bSBaptiste Daroussin- If the first line after .It is .D1, do not assert a blank line 63061d06d6bSBaptiste Daroussin in between, see for example tmux(1). 63161d06d6bSBaptiste Daroussin reported by nicm@ 13 Jan 2011 00:18:57 +0000 63261d06d6bSBaptiste Daroussin loc * exist ** algo ** size * imp ** 63361d06d6bSBaptiste Daroussin 63461d06d6bSBaptiste Daroussin- Trailing punctuation after .It should trigger EOS spacing. 63561d06d6bSBaptiste Daroussin reported by Nicolas Joly Sat, 17 Nov 2012 11:49:54 +0100 63661d06d6bSBaptiste Daroussin Probably, this should be fixed somewhere in termp_it_pre(), not sure. 63761d06d6bSBaptiste Daroussin loc * exist ** algo ** size * imp ** 63861d06d6bSBaptiste Daroussin 63961d06d6bSBaptiste Daroussin- When the -width string contains macros, the macros must be rendered 64061d06d6bSBaptiste Daroussin before measuring the width, for example 64161d06d6bSBaptiste Daroussin .Bl -tag -width ".Dv message" 64261d06d6bSBaptiste Daroussin in magic(5), located in src/usr.bin/file, is the same 64361d06d6bSBaptiste Daroussin as -width 7n, not -width 11n. 64461d06d6bSBaptiste Daroussin The same applies to .Bl -column column widths; 64561d06d6bSBaptiste Daroussin reported again by Nicolas Joly Thu, 1 Mar 2012 13:41:26 +0100 via wiz@ 5 Mar 64661d06d6bSBaptiste Daroussin reported again by Franco Fichtner Fri, 27 Sep 2013 21:02:28 +0200 64761d06d6bSBaptiste Daroussin reported again by Bruce Evans Fri, 17 Feb 2017 21:22:44 +0100 via bapt@ 648c1c95addSBrooks Davis https://reviews.freebsd.org/D35245 649c1c95addSBrooks Davis even groff_mdoc(7) uses this: Nab Sun, 5 Jun 2022 22:16:37 +0200 650c1c95addSBrooks Davis When implementing this, try to avoid breaking existing manuals, 651c1c95addSBrooks Davis or at least fix them: Jan Stary Sun, 5 Jun 2022 22:48:05 +0200 65261d06d6bSBaptiste Daroussin loc *** exist *** algo *** size ** imp *** 6539f6a619aSEric van Gyzen An easy partial fix has been implemented as skip_leading_dot_word(). 65461d06d6bSBaptiste Daroussin 65561d06d6bSBaptiste Daroussin- The \& zero-width character counts as output. 65661d06d6bSBaptiste Daroussin That is, when it is alone on a line between two .Pp, 65761d06d6bSBaptiste Daroussin we want three blank lines, not two as in mandoc. 65861d06d6bSBaptiste Daroussin loc ** exist ** algo ** size * imp ** 65961d06d6bSBaptiste Daroussin 66061d06d6bSBaptiste Daroussin- Sequences of multiple man(7) paragraphs (.PP, .IP) interspersed 66161d06d6bSBaptiste Daroussin with .ps and .nf/.fi produce execessive blank lines, see libJudy 66261d06d6bSBaptiste Daroussin and graphics/dcmtk. The parser reorg may help with this. 66361d06d6bSBaptiste Daroussin 664c1c95addSBrooks Davis- The man(7) .UR macro produces UTF-8 angle brackets in -Tutf8 output mode 665c1c95addSBrooks Davis with groff, but ASCII <> with mandoc 666c1c95addSBrooks Davis Alejandro Colomar Mon, 7 Aug 2023 17:13:29 +0200 Subject: hostname 667c1c95addSBrooks Davis 66861d06d6bSBaptiste Daroussin- trailing whitespace must be ignored even when followed by a font escape, 66961d06d6bSBaptiste Daroussin see for example 67061d06d6bSBaptiste Daroussin makes 67161d06d6bSBaptiste Daroussin \fBdig \fR 67261d06d6bSBaptiste Daroussin operate in batch mode 67361d06d6bSBaptiste Daroussin in dig(1). 67461d06d6bSBaptiste Daroussin loc ** exist ** algo ** size * imp ** 67561d06d6bSBaptiste Daroussin 67661d06d6bSBaptiste Daroussin************************************************************************ 67761d06d6bSBaptiste Daroussin* warning issues 67861d06d6bSBaptiste Daroussin************************************************************************ 67961d06d6bSBaptiste Daroussin 6806d38604fSBaptiste Daroussin- shorten/simplify error messages for usage errors 6816d38604fSBaptiste Daroussin To: deraadt@ 25 Oct 2020 23:37:01 +0100 6826d38604fSBaptiste Daroussin loc ** exist * algo * size ** imp *** 6836d38604fSBaptiste Daroussin 684c1c95addSBrooks Davis- warn about \\ and \. in interpretation mode 685c1c95addSBrooks Davis gbranden@, groff issue #62776, 10 Nov 2023 01:57:32 -0500 686c1c95addSBrooks Davis 687c1c95addSBrooks Davis- warn about output lines exceeding 80 characters 688c1c95addSBrooks Davis Alejandro Colomar Aug 22, 2022 689c1c95addSBrooks Davis not trivial because -T lint does not call any formatter 690c1c95addSBrooks Davis loc *** exist * algo ** size ** imp ** 691c1c95addSBrooks Davis 69261d06d6bSBaptiste Daroussin- warn about duplicate .Sh/.Ss heads 69361d06d6bSBaptiste Daroussin gre(4): Rename duplicate sections 20 Apr 2018 15:27:33 +0200 69461d06d6bSBaptiste Daroussin loc * exist * algo * size * imp ** 69561d06d6bSBaptiste Daroussin 69661d06d6bSBaptiste Daroussin- style message about macros inside .Bd -literal and .Dl, in particular 69761d06d6bSBaptiste Daroussin font changing macros like .Cm, .Ar, .Fa (from the mdoclint TODO) 69861d06d6bSBaptiste Daroussin 69961d06d6bSBaptiste Daroussin- style message about mismatches between the section number in the 70061d06d6bSBaptiste Daroussin file name (if it is known) and the section number in .Dt 70161d06d6bSBaptiste Daroussin (from the mdoclint TODO) 70261d06d6bSBaptiste Daroussin 70361d06d6bSBaptiste Daroussin- style message about NULL without .Dv (from the mdoclint TODO) 70461d06d6bSBaptiste Daroussin 70561d06d6bSBaptiste Daroussin- style message about error constants without .Er (from the mdoclint TODO) 70661d06d6bSBaptiste Daroussin 70761d06d6bSBaptiste Daroussin- warn when .Sh or .Ss contain other macros 70861d06d6bSBaptiste Daroussin Steffen Nurpmeso, savannah.gnu.org/bugs/index.php?45034 70961d06d6bSBaptiste Daroussin loc * exist * algo * size * imp ** 71061d06d6bSBaptiste Daroussin 71161d06d6bSBaptiste Daroussin- style message about violations of the convention 71261d06d6bSBaptiste Daroussin .An name Aq Mt localpart@domain in AUTHORS (from the mdoclint TODO) 71361d06d6bSBaptiste Daroussin 71461d06d6bSBaptiste Daroussin- warn about attempts to call non-callable macros 71561d06d6bSBaptiste Daroussin Steffen Nurpmeso Tue, 11 Nov 2014 22:55:16 +0100 71661d06d6bSBaptiste Daroussin Note that formatting is inconsistent in groff. 71761d06d6bSBaptiste Daroussin .Fn Po prints "Po()", .Ar Sh prints "file ..." and no "Sh". 71861d06d6bSBaptiste Daroussin Relatively hard because the relevant code is scattered 71961d06d6bSBaptiste Daroussin all over mdoc_macro.c and all subtly different. 72061d06d6bSBaptiste Daroussin loc ** exist ** algo ** size ** imp ** 72161d06d6bSBaptiste Daroussin 72261d06d6bSBaptiste Daroussin- warn about punctuation - e.g. ',' and ';' - at the beginning 72361d06d6bSBaptiste Daroussin of a text line, if it is likely intended to follow the preceding 72461d06d6bSBaptiste Daroussin output without intervening whitespace, in particular after a 72561d06d6bSBaptiste Daroussin macro line (from the mdoclint TODO) 72661d06d6bSBaptiste Daroussin 7276d38604fSBaptiste Daroussin- report double .TH in man(7) as an ERROR and let the first win 7286d38604fSBaptiste Daroussin kristaps@ 28 Mar 2021 13:30:41 +0200 7296d38604fSBaptiste Daroussin loc * exist * algo * size * imp * 7306d38604fSBaptiste Daroussin 73161d06d6bSBaptiste Daroussin- makewhatis -p complains about language subdirectories: 73261d06d6bSBaptiste Daroussin /usr/local/man//ru: Unknown directory part 73361d06d6bSBaptiste Daroussin 73461d06d6bSBaptiste Daroussin 73561d06d6bSBaptiste Daroussin************************************************************************ 73661d06d6bSBaptiste Daroussin* documentation issues 73761d06d6bSBaptiste Daroussin************************************************************************ 73861d06d6bSBaptiste Daroussin 73961d06d6bSBaptiste Daroussin- mark macros as: page structure domain, manual domain, general text domain 74061d06d6bSBaptiste Daroussin is this useful? 74161d06d6bSBaptiste Daroussin 74261d06d6bSBaptiste Daroussin- mention /usr/share/misc/mdoc.template in mdoc(7)? 74361d06d6bSBaptiste Daroussin 74461d06d6bSBaptiste Daroussin- Is all the content from http://www.std.com/obi/BSD/doc/usd/28.tbl/tbl 74561d06d6bSBaptiste Daroussin covered in tbl(7)? 74661d06d6bSBaptiste Daroussin 74761d06d6bSBaptiste Daroussin************************************************************************ 74861d06d6bSBaptiste Daroussin* performance issues 74961d06d6bSBaptiste Daroussin************************************************************************ 75061d06d6bSBaptiste Daroussin 75161d06d6bSBaptiste Daroussin- the PDF file is HUGE: this can be reduced by using relative offsets 75261d06d6bSBaptiste Daroussin 75361d06d6bSBaptiste Daroussin************************************************************************ 75461d06d6bSBaptiste Daroussin* structural issues 75561d06d6bSBaptiste Daroussin************************************************************************ 75661d06d6bSBaptiste Daroussin 75761d06d6bSBaptiste Daroussin- POSIX says in the documentation of sysconf(3) that PATH_MAX 75861d06d6bSBaptiste Daroussin is allowed to be so large that it is a bad idea to use it 75961d06d6bSBaptiste Daroussin for sizing static buffers. So use dynamic buffers throughout. 76061d06d6bSBaptiste Daroussin See the file test-PATH_MAX.c for details. 76161d06d6bSBaptiste Daroussin Found by Aaron M. Ucko in the GNU Hurd via Bdale Garbee, 76261d06d6bSBaptiste Daroussin https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829624 76361d06d6bSBaptiste Daroussin 76461d06d6bSBaptiste Daroussin- Is it possible to further simplify ENDBODY_SPACE? 76561d06d6bSBaptiste Daroussin 76661d06d6bSBaptiste Daroussin- Find better ways to prevent endless loops 76761d06d6bSBaptiste Daroussin in roff(7) macro and string expansion. 76861d06d6bSBaptiste Daroussin 76961d06d6bSBaptiste Daroussin- make buffers for parsing functions const 77061d06d6bSBaptiste Daroussin christos@ via wiz@ Fri, 18 Dec 2015 17:10:01 +0100 77161d06d6bSBaptiste Daroussin 77261d06d6bSBaptiste Daroussin- struct mparse refactoring 77361d06d6bSBaptiste Daroussin Steffen Nurpmeso Thu, 04 Sep 2014 12:50:00 +0200 77461d06d6bSBaptiste Daroussin 77561d06d6bSBaptiste Daroussin************************************************************************ 77661d06d6bSBaptiste Daroussin* CGI issues 77761d06d6bSBaptiste Daroussin************************************************************************ 77861d06d6bSBaptiste Daroussin 7796d38604fSBaptiste Daroussin - Inspect httpd(8) logs on man.openbsd.org and consider 7806d38604fSBaptiste Daroussin whether logging can be improved, where bad syntax comes from, 7816d38604fSBaptiste Daroussin and what needs to be done to get rid of COMPAT_OLDURI. 78261d06d6bSBaptiste Daroussin - Enable HTTP compression by detecting gzip encoding and filtering 78361d06d6bSBaptiste Daroussin output through libz. 78461d06d6bSBaptiste Daroussin - Privilege separation (see OpenSSH). 78561d06d6bSBaptiste Daroussin - Enable caching support via HTTP 304 and If-Modified-Since. 78661d06d6bSBaptiste Daroussin 78761d06d6bSBaptiste Daroussin************************************************************************ 78861d06d6bSBaptiste Daroussin* to improve in the groff_mdoc(7) macros 78961d06d6bSBaptiste Daroussin************************************************************************ 79061d06d6bSBaptiste Daroussin 7916d38604fSBaptiste Daroussin- delete OS release verification from .Dx, .Fx, .Nx, .Ox etc. 7926d38604fSBaptiste Daroussin https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629161 7936d38604fSBaptiste Daroussin also Branden Robinson 18 Dec 2019 00:59:52 +1100 7946d38604fSBaptiste Daroussin 7956d38604fSBaptiste Daroussin- Can the distinction between .Vt and .Va be made stricter, 7966d38604fSBaptiste Daroussin recommending .Vt extern char * Ns Va optarg ; ? 7976d38604fSBaptiste Daroussin What about the block macro properties of .Vt in the SYNOPSIS? 7986d38604fSBaptiste Daroussin zeurkous 25 Dec 2019 08:48:36 +0100 7996d38604fSBaptiste Daroussin 80061d06d6bSBaptiste Daroussin- .Cd # arch1, arch2 in section 4 pages: 80161d06d6bSBaptiste Daroussin find better way to indicate multiple architectures, maybe: 80261d06d6bSBaptiste Daroussin allow .Dt vgafb 4 "macppc sparc64" 80361d06d6bSBaptiste Daroussin already shown as "Device Drivers Manual (macppc sparc64)" 80461d06d6bSBaptiste Daroussin for apropos, make that "vgafb(4) - macppc # sparc64" instead of "- all" 80561d06d6bSBaptiste Daroussin groff can be made to show multiple arches, too, but it is 80661d06d6bSBaptiste Daroussin tedious to do the string parsing in roff code... 80761d06d6bSBaptiste Daroussin jmc@ 23 Apr 2018 07:24:52 +0100 [man for vgafb(4)...] 80861d06d6bSBaptiste Daroussin loc ** exist ** algo * size * imp *** 80961d06d6bSBaptiste Daroussin 81061d06d6bSBaptiste Daroussin- use uname(1) to set doc-default-operating-system at install time 81161d06d6bSBaptiste Daroussin tobimensch Mon, 1 Dec 2014 00:25:07 +0100 81261d06d6bSBaptiste Daroussin 81361d06d6bSBaptiste Daroussin- apostrophe (39), circumflex (94), grave (96), tilde (126) 81461d06d6bSBaptiste Daroussin in manuals: \(aq, \(ha, \`, \(ti 81561d06d6bSBaptiste Daroussin Re: [Groff] ASCII Minus Sign in man Pages. 81661d06d6bSBaptiste Daroussin bentley@ 26 Apr 2017 10:02:06 -0600 81761d06d6bSBaptiste Daroussin Do we need to fix existing manuals? 81861d06d6bSBaptiste Daroussin Do we need to fix the definition of the mdoc(7) language? 819