xref: /netbsd-src/external/bsd/mdocml/dist/TODO (revision 544c191c349c1704c9d5e679d12ec15cff579663)
10d88b603Schristos************************************************************************
20d88b603Schristos* Official mandoc TODO.
3*544c191cSchristos* Id: TODO,v 1.289 2019/03/04 13:01:57 schwarze Exp
40d88b603Schristos************************************************************************
50d88b603Schristos
6fec65c98SchristosMany issues are annotated for difficulty as follows:
7fec65c98Schristos
8fec65c98Schristos - loc = locality of the issue
9fec65c98Schristos    *    single file issue, affects file only, or very few
10fec65c98Schristos    **   single module issue, affects several files of one module
11fec65c98Schristos    ***  cross-module issue, significantly impacts multiple modules
12fec65c98Schristos         and may require substantial changes to internal interfaces
13fec65c98Schristos - exist = difficulty of the existing code in this area
14fec65c98Schristos    *    affected code is straightforward and easy to read and change
15fec65c98Schristos    **   affected code is somewhat complex, but once you understand
16fec65c98Schristos         the design, not particularly difficult to understand
17fec65c98Schristos    ***  affected code uses a special, exceptionally tricky design
18fec65c98Schristos - algo = difficulty of the new algorithm to be written
19fec65c98Schristos    *    the required logic and code is straightforward
20fec65c98Schristos    **   the required logic is somewhat complex and needs a careful design
21fec65c98Schristos    ***  the required logic is exceptionally tricky,
22fec65c98Schristos         maybe an approach to solve that is not even known yet
23fec65c98Schristos - size = the amount of code to be written or changed
24fec65c98Schristos    *    a small number of lines (at most 100, usually much less)
25fec65c98Schristos    **   a considerable amount of code (several dozen to a few hundred)
26fec65c98Schristos    ***  a large amount of code (many hundreds, maybe thousands)
27fec65c98Schristos - imp = importance of the issue
28fec65c98Schristos    *    mostly for completeness
29fec65c98Schristos    **   would be nice to have
30fec65c98Schristos    ***  issue causes considerable inconvenience
31fec65c98Schristos
32fec65c98SchristosObviously, as the issues have not been solved yet, these annotations
33fec65c98Schristosare mere guesses, and some may be wrong.
34fec65c98Schristos
350d88b603Schristos************************************************************************
360d88b603Schristos* missing features
370d88b603Schristos************************************************************************
380d88b603Schristos
390d88b603Schristos--- missing roff features ----------------------------------------------
400d88b603Schristos
410d88b603Schristos- .ad (adjust margins)
420d88b603Schristos  .ad l -- adjust left margin only (flush left)
430d88b603Schristos  .ad r -- adjust right margin only (flush right)
440d88b603Schristos  .ad c -- center text on line
450d88b603Schristos  .ad b -- adjust both margins (alias: .ad n)
460d88b603Schristos  .na   -- temporarily disable adjustment without changing the mode
470d88b603Schristos  .ad   -- re-enable adjustment without changing the mode
480d88b603Schristos  Adjustment mode is ignored while in no-fill mode (.nf).
49fec65c98Schristos  loc ***  exist ***  algo **  size **  imp **  (parser reorg would help)
5070f041f9Sjoerg
5170f041f9Sjoerg- .fc (field control)
5270f041f9Sjoerg  found by naddy@ in xloadimage(1)
53fec65c98Schristos  loc **  exist ***  algo *  size *  imp *
5470f041f9Sjoerg
550d88b603Schristos- .ns (no-space mode) occurs in xine-config(1)
569ff1f2acSchristos  when implementing this, also let .TH set it
570d88b603Schristos  reported by brad@  Sat, 15 Jan 2011 15:45:23 -0500
58fec65c98Schristos  loc ***  exist ***  algo ***  size **  imp *
590d88b603Schristos
60fec65c98Schristos- \w'' improve width measurements
61fec65c98Schristos  would not be very useful without an expression parser, see below
62fec65c98Schristos  needed for Tcl_NewStringObj(3) via wiz@  Wed, 5 Mar 2014 22:27:43 +0100
63fec65c98Schristos  loc **  exist ***  algo ***  size *  imp ***
640d88b603Schristos
650d88b603Schristos--- missing mdoc features ----------------------------------------------
660d88b603Schristos
670d88b603Schristos- .Bl -column .Xo support is missing
680d88b603Schristos  ultimate goal:
690d88b603Schristos  restore .Xr and .Dv to
700d88b603Schristos  lib/libc/compat-43/sigvec.3
710d88b603Schristos  lib/libc/gen/signal.3
720d88b603Schristos  lib/libc/sys/sigaction.2
73fec65c98Schristos  loc *  exist ***  algo ***  size *  imp **
740d88b603Schristos
750d88b603Schristos- edge case: decide how to deal with blk_full bad nesting, e.g.
760d88b603Schristos  .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1)
770d88b603Schristos  from jmc@  Wed, 14 Jul 2010 18:10:32 +0100
78fec65c98Schristos  loc *  exist ***  algo ***  size **  imp **
790d88b603Schristos
800d88b603Schristos- .Bd -filled should not be the same as .Bd -ragged, but align both
810d88b603Schristos  the left and right margin.  In groff, it is implemented in terms
820d88b603Schristos  of .ad b, which we don't have either.  Found in cksum(1).
83fec65c98Schristos  loc ***  exist ***  algo **  size **  imp **  (parser reorg would help)
840d88b603Schristos
850d88b603Schristos- implement blank `Bl -column', such as
860d88b603Schristos  .Bl -column
870d88b603Schristos  .It foo Ta bar
880d88b603Schristos  .El
89fec65c98Schristos  loc *  exist ***  algo ***  size *  imp *
900d88b603Schristos
910d88b603Schristos- explicitly disallow nested `Bl -column', which would clobber internal
920d88b603Schristos  flags defined for struct mdoc_macro
93fec65c98Schristos  loc *  exist *  algo *  size *  imp **
940d88b603Schristos
950d88b603Schristos- In .Bl -column .It, the end of the line probably has to be regarded
960d88b603Schristos  as an implicit .Ta, if there could be one, see the following mildly
970d88b603Schristos  ugly code from login.conf(5):
980d88b603Schristos    .Bl -column minpasswordlen program xetcxmotd
990d88b603Schristos    .It path Ta path Ta value of Dv _PATH_DEFPATH
1000d88b603Schristos    .br
1010d88b603Schristos    Default search path.
1020d88b603Schristos  reported by Michal Mazurek <akfaew at jasminek dot net>
1030d88b603Schristos  via jmc@ Thu, 7 Apr 2011 16:00:53 +0059
104fec65c98Schristos  loc *  exist ***  algo **  size *  imp **
1050d88b603Schristos
1060d88b603Schristos- inside `.Bl -column' phrases, punctuation is handled like normal
1070d88b603Schristos  text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -."
1080d88b603Schristos
1090d88b603Schristos- inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf'
1100d88b603Schristos  is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab."
1110d88b603Schristos  but should give "ab ."
1120d88b603Schristos
1130d88b603Schristos- prohibit `Nm' from having non-text HEAD children
1140d88b603Schristos  (e.g., NetBSD mDNSShared/dns-sd.1)
1150d88b603Schristos  (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified)
1160d88b603Schristos
117fec65c98Schristos- support translated section names
118fec65c98Schristos  e.g. x11/scrotwm scrotwm_es.1:21:2: error: NAME section must be first
119fec65c98Schristos  that one uses NOMBRE because it is spanish...
120fec65c98Schristos  deraadt tends to think that section-dependent macro behaviour
121fec65c98Schristos  is a bad idea in the first place, so this may be irrelevant
122fec65c98Schristos  loc **  exist **  algo **  size *  imp **
123fec65c98Schristos
1240d88b603Schristos- When there is free text in the SYNOPSIS and that free text contains
1250d88b603Schristos  the .Nm macro, groff somehow understands to treat the .Nm as an in-line
1260d88b603Schristos  macro, while mandoc treats it as a block macro and breaks the line.
1270d88b603Schristos  No idea how the logic for distinguishing in-line and block instances
1280d88b603Schristos  should be, needs investigation.
1290d88b603Schristos  uqs@  Thu, 2 Jun 2011 11:03:51 +0200
1300d88b603Schristos  uqs@  Thu, 2 Jun 2011 11:33:35 +0200
131fec65c98Schristos  loc *  exist **  algo ***  size *  imp **
1320d88b603Schristos
133c9bcef03Schristos--- missing man features -----------------------------------------------
134c9bcef03Schristos
135c9bcef03Schristos- groff_www(7) .MTO and .URL
136c9bcef03Schristos  These macros were used by the GNU grep(1) man page.
137c9bcef03Schristos  The groff_www(7) manual page itself uses them, too.
138c9bcef03Schristos  We should probably *not* add them to mandoc.
139c9bcef03Schristos  Just mentioning this here to keep track of the abuse.
140c9bcef03Schristos  Laura Morales <lauretas at mail dot com> 20 Apr 2018 07:33:02 +0200
141c9bcef03Schristos  loc **  exist *  algo *  size **  imp *
142c9bcef03Schristos
1430d88b603Schristos--- missing tbl features -----------------------------------------------
1440d88b603Schristos
145c9bcef03Schristos- vertical centering in cells vertically spanned with ^
146c9bcef03Schristos  pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200
147c9bcef03Schristos  loc *  exist ***  algo ***  size **  imp *
148c9bcef03Schristos
1499ff1f2acSchristos- support mdoc(7) and man(7) macros inside tbl(7) code;
1509ff1f2acSchristos  probably requires the parser reorg and letting tbl(7)
1519ff1f2acSchristos  use roff_node such that macro sets can mix;
1529508192eSchristos  informed by bapt@ that FreeBSD needs this: 3 Jan 2015 23:32:23 +0100
1539ff1f2acSchristos  loc ***  exist **  algo ***  size **  imp ***
1549ff1f2acSchristos
155fec65c98Schristos- look at the POSIX manuals in the books/man-pages-posix port,
156*544c191cSchristos  they use some unsupported tbl(7) features, mostly macros in tbl(7).
157fec65c98Schristos  loc *  exist **  algo **  size **  imp ***
158fec65c98Schristos
1599508192eSchristos- look what Joerg Schilling manual pages use
1609508192eSchristos  Thu, 19 Mar 2015 18:31:48 +0100
1619508192eSchristos
162fec65c98Schristos--- missing eqn features -----------------------------------------------
163fec65c98Schristos
1649ff1f2acSchristos- In a matrix, break the output line after each matrix line.
165*544c191cSchristos  Found in the discussion at CDBUG 2015.  Suggested by Avi Weinstock.
166*544c191cSchristos  This may not be the ideal solution after all: eqn(7) matrices
167*544c191cSchristos  are lists of columns, so Avi's proposal would show each *column*
168*544c191cSchristos  on its own *line*, which is likely to cause confusion.
169*544c191cSchristos  A better solution, but much harder to implement, would be to
170*544c191cSchristos  actually show the coordinates of column vectors on different
171*544c191cSchristos  terminal output lines, using the clumnated output facilities
172*544c191cSchristos  developed for .Bl -tag, .Bl -column, and also used for tbl(7).
173*544c191cSchristos  loc *  exist *  algo **  size **  imp **
1749ff1f2acSchristos
175fec65c98Schristos- The "size" keyword is parsed, but ignored by the formatter.
176fec65c98Schristos  loc *  exist *  algo *  size *  imp *
177fec65c98Schristos
178fec65c98Schristos- The spacing characters `~', `^', and tab are currently ignored,
179fec65c98Schristos  see User's Guide (Second Edition) page 2 section 4.
180fec65c98Schristos  loc *  exist *  algo **  size *  imp **
181fec65c98Schristos
182fec65c98Schristos- Mark and lineup are parsed and ignored,
183fec65c98Schristos  see User's Guide (Second Edition) page 5 section 15.
184fec65c98Schristos  loc **  exist **  algo **  size **  imp **
1850d88b603Schristos
186c9bcef03Schristos- GNU eqn converts some operators to special characters, for example,
187c9bcef03Schristos  input HYPHEN-MINUS becomes output \(mi, unless it is part of a
188c9bcef03Schristos  quoted word.  mandoc(1) only does this when the operator is
189c9bcef03Schristos  surrounded by blanks, not when it is part of an unquoted word.
190c9bcef03Schristos  Also, check whether there are more such cases (e.g., +?).
191c9bcef03Schristos  reported by bentley@  20 Jun 2017 02:04:29 -0600
192c9bcef03Schristos  loc *  exist **  algo **  size *  imp *
193c9bcef03Schristos
194c9bcef03Schristos- Primes, opprime, and '
195c9bcef03Schristos  bentley@  Thu, 13 Jul 2017 23:14:20 -0600
196c9bcef03Schristos
1970d88b603Schristos--- missing misc features ----------------------------------------------
1980d88b603Schristos
199c9bcef03Schristos- man -ks 1,8 route; kn@ Jul 13, 2018 orally
200c9bcef03Schristos
20170f041f9Sjoerg- italic correction (\/) in PostScript mode
20270f041f9Sjoerg  Werner LEMBERG on groff at gnu dot org  Sun, 10 Nov 2013 12:47:46
203fec65c98Schristos  loc **  exist **  algo *  size *  imp *
20470f041f9Sjoerg
2059ff1f2acSchristos- change the default PAGER to more -Es and use the pager
2069ff1f2acSchristos  even for apropos title line output; req by bapt@
2079ff1f2acSchristos  loc *  exist *  algo *  size *  imp ***
208fec65c98Schristos
2090d88b603Schristos- clean up escape sequence handling, creating three classes:
2100d88b603Schristos  (1) fully implemented, or parsed and ignored without loss of content
2110d88b603Schristos  (2) unimplemented, potentially causing loss of content
2120d88b603Schristos      or serious mangling of formatting (e.g. \n) -> ERROR
2130d88b603Schristos      see textproc/mgdiff(1) for nice examples
2140d88b603Schristos  (3) undefined, just output the character -> perhaps WARNING
215fec65c98Schristos  loc ***  exist **  algo **  size **  imp *** (parser reorg helps)
216fec65c98Schristos
217fec65c98Schristos- kettenis wants base roff, ms, and me  Fri, 1 Jan 2010 22:13:15 +0100 (CET)
218fec65c98Schristos  loc **  exist **  algo **  size ***  imp *
219fec65c98Schristos
2209ff1f2acSchristos--- compatibility checks -----------------------------------------------
221fec65c98Schristos
222fec65c98Schristos- is .Bk implemented correctly in modern groff?
223fec65c98Schristos  sobrado@  Tue, 19 Apr 2011 22:12:55 +0200
224fec65c98Schristos
225fec65c98Schristos- compare output to Heirloom roff, Solaris roff, and
226fec65c98Schristos  http://repo.or.cz/w/neatroff.git  http://litcave.rudi.ir/
227fec65c98Schristos
228fec65c98Schristos- look at AT&T DWB http://www2.research.att.com/sw/download
229fec65c98Schristos  Carsten Kunze <carsten dot kunze at arcor dot de> has patches
230fec65c98Schristos  Mon, 4 Aug 2014 17:01:28 +0200
2319508192eSchristos  ported version: https://github.com/n-t-roff/DWB3.3
2329508192eSchristos  Carsten Kunze  Wed, 22 Apr 2015 11:21:43 +0200
2330d88b603Schristos
2340d88b603Schristos- look at pages generated from reStructeredText, e.g. devel/mercurial hg(1)
2350d88b603Schristos  These are a weird mixture of man(7) and custom autogenerated low-level
2360d88b603Schristos  roff stuff.  Figure out to what extent we can cope.
2370d88b603Schristos  For details, see http://docutils.sourceforge.net/rst.html
2380d88b603Schristos  noted by stsp@  Sat, 24 Apr 2010 09:17:55 +0200
2390d88b603Schristos  reminded by nicm@  Mon, 3 May 2010 09:52:41 +0100
2400d88b603Schristos
241fec65c98Schristos- look at pages generated from ronn(1) github.com/rtomayko/ronn
242fec65c98Schristos  (based on markdown)
243fec65c98Schristos
24470f041f9Sjoerg- look at pages generated from Texinfo source by yat2m, e.g. security/gnupg
24570f041f9Sjoerg  First impression is not that bad.
24670f041f9Sjoerg
247fec65c98Schristos- look at pages generated by pandoc; see
248fec65c98Schristos  https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Writers/Man.hs
249fec65c98Schristos  porting planned by kili@  Thu, 19 Jun 2014 19:46:28 +0200
250fec65c98Schristos
2510d88b603Schristos- check compatibility with Plan9:
2520d88b603Schristos  http://swtch.com/usr/local/plan9/tmac/tmac.an
2530d88b603Schristos  http://swtch.com/plan9port/man/man7/man.html
2540d88b603Schristos  "Anthony J. Bentley" <anthonyjbentley@gmail.com> 28 Dec 2010 21:58:40 -0700
2550d88b603Schristos
2569ff1f2acSchristos- check compatibility with COHERENT troff:
2579ff1f2acSchristos  http://www.nesssoftware.com/home/mwc/source.php
2589ff1f2acSchristos
259fec65c98Schristos- check compatibility with the man(7) formatter
260fec65c98Schristos  https://raw.githubusercontent.com/rofl0r/hardcore-utils/master/man.c
261fec65c98Schristos
262fec65c98Schristos- check compatibility with
263fec65c98Schristos  http://ikiwiki.info/plugins/contrib/mandoc/
264fec65c98Schristos  https://github.com/schmonz/ikiwiki/compare/mandoc
265fec65c98Schristos  Amitai Schlair  Mon, 19 May 2014 14:05:53 -0400
266fec65c98Schristos
2679508192eSchristos- check features of the Slackware man.conf(5) format
2689508192eSchristos  Carsten Kunze  Wed, 11 Mar 2015 17:57:24 +0100
2699508192eSchristos
2700d88b603Schristos************************************************************************
2710d88b603Schristos* formatting issues: ugly output
2720d88b603Schristos************************************************************************
2730d88b603Schristos
274fec65c98Schristos- revisit empty in-line macros
275fec65c98Schristos  look at the difference between "Em x Em ." and "Sq x Em ."
276fec65c98Schristos  Carsten Kunze  Fri, 12 Dec 2014 00:15:41 +0100
277fec65c98Schristos  loc *** exist *** algo *** size * imp **
278fec65c98Schristos
279fec65c98Schristos- a column list with blank `Ta' cells triggers a spurious
2800d88b603Schristos  start-with-whitespace printing of a newline
2810d88b603Schristos
282fec65c98Schristos- In .Bl -column, .It a<tab>"b<tab>c"
283fec65c98Schristos  shows the quotes in groff, but not in mandoc
284fec65c98Schristos  loc * exist *** algo ** size * imp **
285fec65c98Schristos
2860d88b603Schristos- In .Bl -column,
2870d88b603Schristos  .It Em Authentication<tab>Key Length
2880d88b603Schristos  ought to render "Key Length" with emphasis, too,
2890d88b603Schristos  see OpenBSD iked.conf(5).
2900d88b603Schristos  reported again Nicolas Joly via wiz@ Wed, 12 Oct 2011 00:20:00 +0200
291fec65c98Schristos  loc *  exist ***  algo ***  size **  imp ***
2920d88b603Schristos
2930d88b603Schristos- empty phrases in .Bl column produce too few blanks
2940d88b603Schristos  try e.g. .Bl -column It Ta Ta
2950d88b603Schristos  reported by millert Fri, 02 Apr 2010 16:13:46 -0400
296fec65c98Schristos  loc *  exist ***  algo ***  size *  imp **
2970d88b603Schristos
2980d88b603Schristos- .%T can have trailing punctuation.  Currently, it puts the trailing
2990d88b603Schristos  punctuation into a trailing MDOC_TEXT element inside its own scope.
3000d88b603Schristos  That element should rather be outside its scope, such that the
3010d88b603Schristos  punctuation does not get underlines.  This is not trivial to
3020d88b603Schristos  implement because .%T then needs some features of in_line_eoln() -
3030d88b603Schristos  slurp all arguments into one single text element - and one feature
3040d88b603Schristos  of in_line() - put trailing punctuation out of scope.
3050d88b603Schristos  Found in mount_nfs(8) and exports(5), search for "Appendix".
306fec65c98Schristos  loc **  exist **  algo ***  size *  imp **
3070d88b603Schristos
30870f041f9Sjoerg- Trailing punctuation after .%T triggers EOS spacing, at least
30970f041f9Sjoerg  outside .Rs (eek!).  Simply setting ARGSFL_DELIM for .%T is not
31070f041f9Sjoerg  the right solution, it sends mandoc into an endless loop.
31170f041f9Sjoerg  reported by Nicolas Joly  Sat, 17 Nov 2012 11:49:54 +0100
312fec65c98Schristos  loc *  exist **  algo **  size *  imp **
313fec65c98Schristos
314fec65c98Schristos- global variables in the SYNOPSIS of section 3 pages
315fec65c98Schristos  .Vt vs .Vt/.Va vs .Ft/.Va vs .Ft/.Fa ...
316fec65c98Schristos  from kristaps@  Tue, 08 Jun 2010 11:13:32 +0200
31770f041f9Sjoerg
318c9bcef03Schristos- implicit whitespace around inline equations
319c9bcef03Schristos  example code:  where '$times$' denotes matrix multiplication
320c9bcef03Schristos  must not have an HTML line break, nor a blank, before <math>
321c9bcef03Schristos  partial solution: html.c {"math", HTML_NLINSIDE | HTML_INDENT},
322c9bcef03Schristos  bentley@  Thu, 13 Jul 2017 19:00:59 -0600
323c9bcef03Schristos
3240d88b603Schristos- in enclosures, mandoc sometimes fancies a bogus end of sentence
3250d88b603Schristos  reminded by jmc@  Thu, 23 Sep 2010 18:13:39 +0059
326fec65c98Schristos  loc *  exist **  algo ***  size *  imp ***
327fec65c98Schristos
328fec65c98Schristos- a line starting with "\fB something" counts as starting with whitespace
329fec65c98Schristos  and triggers a line break; found in audio/normalize-mp3(1)
330*544c191cSchristos  This will become easier once escape sequences are represented
331*544c191cSchristos  by syntax tree nodes.
332fec65c98Schristos  loc **  exist *  algo **  size *  imp **
3330d88b603Schristos
33470f041f9Sjoerg- formatting /usr/local/man/man1/latex2man.1 with groff and mandoc
33570f041f9Sjoerg  reveals lots of bugs both in groff and mandoc...
33670f041f9Sjoerg  reported by bentley@  Wed, 22 May 2013 23:49:30 -0600
33770f041f9Sjoerg
3389508192eSchristos--- PostScript and PDF issues ------------------------------------------
339fec65c98Schristos
340fec65c98Schristos- PDF output doesn't use a monospaced font for .Bd -literal
341fec65c98Schristos  Example: "mandoc -Tpdf afterboot.8 > output.pdf && pdfviewer output.pdf".
342fec65c98Schristos  Search the text "Routing tables".
343fec65c98Schristos  Also check what PostScript mode does when fixing this.
344fec65c98Schristos  reported by juanfra@ Wed, 04 Jun 2014 21:44:58 +0200
345fec65c98Schristos  instructions from juanfra@  Wed, 11 Jun 2014 02:21:01 +0200
346fec65c98Schristos    add a new <</Type /Font>> block to the PDF files with /BaseFont /Courier
347fec65c98Schristos    and change the /Name from /F0 to the new font (/F5 (?)).
3489508192eSchristos  re-reported by tb@ Mon, 16 Mar 2015 16:47:21 +0100
349fec65c98Schristos  loc *  exist **  algo **  size *  imp **
350fec65c98Schristos
351fec65c98Schristos--- HTML issues --------------------------------------------------------
352fec65c98Schristos
3539ff1f2acSchristos- .Bf at the beginning of a paragraph inserts a bogus 1ex horizontal
3549ff1f2acSchristos  space, see for example random(3).  Introduced in
3559ff1f2acSchristos  http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_html.c.diff?r1=1.91&r2=1.92
3569ff1f2acSchristos  reported by deraadt@ Mon, 28 Sep 2015 20:14:13 -0600 (MDT)
3579ff1f2acSchristos  loc **  exist **  algo **  size *  imp *
3589ff1f2acSchristos
359fec65c98Schristos- jsg on icb, Nov 3, 2014:
360fec65c98Schristos  try to guess Xr in man(7) for hyperlinking
3619508192eSchristos  and render them with <a class="Xr" href=...>
3629508192eSchristos  https://github.com/Debian/debiman/issues/15
3639508192eSchristos  loc *  exist *  algo **  size **  imp **
364fec65c98Schristos
365fec65c98Schristos- The tables used to render the three-part page headers actually force
366fec65c98Schristos  the width of the <body> to the max-width given for <html>.
367fec65c98Schristos  Not yet sure how to fix that...
368fec65c98Schristos  Observed by an Anonymous Coward on undeadly.org:
369fec65c98Schristos  http://undeadly.org/cgi?action=article&sid=20140925064244&pid=1
370fec65c98Schristos  loc *  exist *  algo **  size *  imp ***
371fec65c98Schristos
3729ff1f2acSchristos- generate <img> tags in HTML
3739ff1f2acSchristos  idea from florian@  Tue, 7 Apr 2015 00:26:28 +0000
3749ff1f2acSchristos  may be possible to implement with .Lk img://something.png alt_text
3759ff1f2acSchristos
376fec65c98Schristos- check https://github.com/trentm/mdocml
377fec65c98Schristos
3780d88b603Schristos************************************************************************
3790d88b603Schristos* formatting issues: gratuitous differences
3800d88b603Schristos************************************************************************
3810d88b603Schristos
382fec65c98Schristos- .Fn reopens a new scope after punctuation in mandoc,
383fec65c98Schristos  but closes its scope for good in groff.
384fec65c98Schristos  Do we want to change mandoc or groff?
385fec65c98Schristos  Steffen Nurpmeso  Sat, 08 Nov 2014 13:34:59 +0100
386fec65c98Schristos  loc *  exist **  algo **  size *  imp **
3870d88b603Schristos
388fec65c98Schristos- In .Bl -enum -width 0n, groff continues one the same line after
389fec65c98Schristos  the number, mandoc breaks the line.
390fec65c98Schristos  mail to kristaps@  Mon, 20 Jul 2009 02:21:39 +0200
391fec65c98Schristos  loc *  exist **  algo **  size *  imp **
3920d88b603Schristos
3930d88b603Schristos- .Pp between two .It in .Bl -column should produce one,
3940d88b603Schristos  not two blank lines, see e.g. login.conf(5).
3950d88b603Schristos  reported by jmc@  Sun, 17 Apr 2011 14:04:58 +0059
3960d88b603Schristos  reported again by sthen@  Wed, 18 Jan 2012 02:09:39 +0000 (UTC)
397fec65c98Schristos  loc *  exist ***  algo **  size *  imp **
3980d88b603Schristos
3990d88b603Schristos- If the *first* line after .It is .Pp, break the line right after
4000d88b603Schristos  the tag, do not pad with space characters before breaking.
4010d88b603Schristos  See the description of the a, c, and i commands in sed(1).
402fec65c98Schristos  loc *  exist **  algo **  size *  imp **
4030d88b603Schristos
4040d88b603Schristos- If the first line after .It is .D1, do not assert a blank line
4050d88b603Schristos  in between, see for example tmux(1).
4060d88b603Schristos  reported by nicm@  13 Jan 2011 00:18:57 +0000
407fec65c98Schristos  loc *  exist **  algo **  size *  imp **
4080d88b603Schristos
40970f041f9Sjoerg- Trailing punctuation after .It should trigger EOS spacing.
41070f041f9Sjoerg  reported by Nicolas Joly  Sat, 17 Nov 2012 11:49:54 +0100
41170f041f9Sjoerg  Probably, this should be fixed somewhere in termp_it_pre(), not sure.
412fec65c98Schristos  loc *  exist **  algo **  size *  imp **
41370f041f9Sjoerg
4140d88b603Schristos- When the -width string contains macros, the macros must be rendered
4150d88b603Schristos  before measuring the width, for example
4160d88b603Schristos    .Bl -tag -width ".Dv message"
4170d88b603Schristos  in magic(5), located in src/usr.bin/file, is the same
4180d88b603Schristos  as -width 7n, not -width 11n.
4190d88b603Schristos  The same applies to .Bl -column column widths;
4200d88b603Schristos  reported again by Nicolas Joly Thu, 1 Mar 2012 13:41:26 +0100 via wiz@ 5 Mar
42170f041f9Sjoerg  reported again by Franco Fichtner Fri, 27 Sep 2013 21:02:28 +0200
4229508192eSchristos  reported again by Bruce Evans Fri, 17 Feb 2017 21:22:44 +0100 via bapt@
423fec65c98Schristos  loc ***  exist ***  algo ***  size **  imp ***
42470f041f9Sjoerg  An easy partial fix would be to just skip the first word if it starts
42570f041f9Sjoerg  with a dot, including any following white space, when measuring.
426fec65c98Schristos  loc *  exist *  algo *  size *  imp ***
4270d88b603Schristos
4280d88b603Schristos- The \& zero-width character counts as output.
4290d88b603Schristos  That is, when it is alone on a line between two .Pp,
4300d88b603Schristos  we want three blank lines, not two as in mandoc.
431fec65c98Schristos  loc **  exist **  algo **  size *  imp **
4320d88b603Schristos
4339ff1f2acSchristos- Sequences of multiple man(7) paragraphs (.PP, .IP) interspersed
4349ff1f2acSchristos  with .ps and .nf/.fi produce execessive blank lines, see libJudy
4359ff1f2acSchristos  and graphics/dcmtk.  The parser reorg may help with this.
4369ff1f2acSchristos
4370d88b603Schristos- trailing whitespace must be ignored even when followed by a font escape,
4380d88b603Schristos  see for example
4390d88b603Schristos    makes
4400d88b603Schristos    \fBdig \fR
4410d88b603Schristos    operate in batch mode
4420d88b603Schristos  in dig(1).
443fec65c98Schristos  loc **  exist **  algo **  size *  imp **
444fec65c98Schristos
445fec65c98Schristos************************************************************************
446fec65c98Schristos* warning issues
447fec65c98Schristos************************************************************************
448fec65c98Schristos
449c9bcef03Schristos- warn about duplicate .Sh/.Ss heads
450c9bcef03Schristos  gre(4): Rename duplicate sections 20 Apr 2018 15:27:33 +0200
451c9bcef03Schristos  loc *  exist *  algo *  size *  imp **
452c9bcef03Schristos
453c9bcef03Schristos- style message about macros inside .Bd -literal and .Dl, in particular
454c9bcef03Schristos  font changing macros like .Cm, .Ar, .Fa (from the mdoclint TODO)
455c9bcef03Schristos
456c9bcef03Schristos- style message about mismatches between the section number in the
457c9bcef03Schristos  file name (if it is known) and the section number in .Dt
458c9bcef03Schristos  (from the mdoclint TODO)
459c9bcef03Schristos
460c9bcef03Schristos- style message about NULL without .Dv (from the mdoclint TODO)
461c9bcef03Schristos
462c9bcef03Schristos- style message about error constants without .Er (from the mdoclint TODO)
4639ff1f2acSchristos
4649ff1f2acSchristos- warn when .Sh or .Ss contain other macros
4659ff1f2acSchristos  Steffen Nurpmeso, savannah.gnu.org/bugs/index.php?45034
4669ff1f2acSchristos  loc *  exist *  algo *  size *  imp **
4679ff1f2acSchristos
468c9bcef03Schristos- style message about violations of the convention
469c9bcef03Schristos  .An name Aq Mt localpart@domain in AUTHORS (from the mdoclint TODO)
470c9bcef03Schristos
471fec65c98Schristos- warn about attempts to call non-callable macros
472fec65c98Schristos  Steffen Nurpmeso  Tue, 11 Nov 2014 22:55:16 +0100
473fec65c98Schristos  Note that formatting is inconsistent in groff.
474fec65c98Schristos  .Fn Po prints "Po()", .Ar Sh prints "file ..." and no "Sh".
475fec65c98Schristos  Relatively hard because the relevant code is scattered
476fec65c98Schristos  all over mdoc_macro.c and all subtly different.
477fec65c98Schristos  loc **  exist **  algo **  size **  imp **
478fec65c98Schristos
479c9bcef03Schristos- warn about punctuation - e.g. ',' and ';' - at the beginning
480c9bcef03Schristos  of a text line, if it is likely intended to follow the preceding
481c9bcef03Schristos  output without intervening whitespace, in particular after a
482c9bcef03Schristos  macro line (from the mdoclint TODO)
483c9bcef03Schristos
484c9bcef03Schristos- makewhatis -p complains about language subdirectories:
485c9bcef03Schristos  /usr/local/man//ru: Unknown directory part
486fec65c98Schristos
487fec65c98Schristos
488fec65c98Schristos************************************************************************
489fec65c98Schristos* documentation issues
490fec65c98Schristos************************************************************************
491fec65c98Schristos
492fec65c98Schristos- mark macros as: page structure domain, manual domain, general text domain
493fec65c98Schristos  is this useful?
494fec65c98Schristos
495fec65c98Schristos- mention /usr/share/misc/mdoc.template in mdoc(7)?
496fec65c98Schristos
497fec65c98Schristos- Is all the content from http://www.std.com/obi/BSD/doc/usd/28.tbl/tbl
498fec65c98Schristos  covered in tbl(7)?
4990d88b603Schristos
5000d88b603Schristos************************************************************************
5010d88b603Schristos* performance issues
5020d88b603Schristos************************************************************************
5030d88b603Schristos
5040d88b603Schristos- the PDF file is HUGE: this can be reduced by using relative offsets
5050d88b603Schristos
5060d88b603Schristos************************************************************************
5070d88b603Schristos* structural issues
5080d88b603Schristos************************************************************************
5090d88b603Schristos
5109508192eSchristos- POSIX says in the documentation of sysconf(3) that PATH_MAX
5119508192eSchristos  is allowed to be so large that it is a bad idea to use it
5129508192eSchristos  for sizing static buffers.  So use dynamic buffers throughout.
5139508192eSchristos  See the file test-PATH_MAX.c for details.
5149508192eSchristos  Found by Aaron M. Ucko in the GNU Hurd via Bdale Garbee,
5159508192eSchristos  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829624
5169508192eSchristos
517c9bcef03Schristos- Is it possible to further simplify ENDBODY_SPACE?
518c9bcef03Schristos
5190d88b603Schristos- Find better ways to prevent endless loops
5200d88b603Schristos  in roff(7) macro and string expansion.
5210d88b603Schristos
522c9bcef03Schristos- make buffers for parsing functions const
523c9bcef03Schristos  christos@ via wiz@  Fri, 18 Dec 2015 17:10:01 +0100
524fec65c98Schristos
525fec65c98Schristos- struct mparse refactoring
526fec65c98Schristos  Steffen Nurpmeso  Thu, 04 Sep 2014 12:50:00 +0200
527fec65c98Schristos
528fec65c98Schristos************************************************************************
529fec65c98Schristos* CGI issues
530fec65c98Schristos************************************************************************
531fec65c98Schristos
532fec65c98Schristos - Enable HTTP compression by detecting gzip encoding and filtering
533fec65c98Schristos   output through libz.
534c9bcef03Schristos - Privilege separation (see OpenSSH).
535fec65c98Schristos - Enable caching support via HTTP 304 and If-Modified-Since.
536fec65c98Schristos
537fec65c98Schristos************************************************************************
538fec65c98Schristos* to improve in the groff_mdoc(7) macros
539fec65c98Schristos************************************************************************
540fec65c98Schristos
541c9bcef03Schristos- .Cd # arch1, arch2 in section 4 pages:
542c9bcef03Schristos  find better way to indicate multiple architectures, maybe:
543c9bcef03Schristos  allow .Dt vgafb 4 "macppc sparc64"
544c9bcef03Schristos  already shown as "Device Drivers Manual (macppc sparc64)"
545c9bcef03Schristos  for apropos, make that "vgafb(4) - macppc # sparc64" instead of "- all"
546c9bcef03Schristos  groff can be made to show multiple arches, too, but it is
547c9bcef03Schristos  tedious to do the string parsing in roff code...
548c9bcef03Schristos  jmc@ 23 Apr 2018 07:24:52 +0100 [man for vgafb(4)...]
549c9bcef03Schristos  loc **  exist **  algo *  size *  imp ***
550c9bcef03Schristos
551fec65c98Schristos- use uname(1) to set doc-default-operating-system at install time
552fec65c98Schristos  tobimensch  Mon, 1 Dec 2014 00:25:07 +0100
553c9bcef03Schristos
554c9bcef03Schristos- apostrophe (39), circumflex (94), grave (96), tilde (126)
555c9bcef03Schristos  in manuals: \(aq, \(ha, \`, \(ti
556c9bcef03Schristos  Re: [Groff] ASCII Minus Sign in man Pages.
557c9bcef03Schristos  bentley@ 26 Apr 2017 10:02:06 -0600
558c9bcef03Schristos  Do we need to fix existing manuals?
559c9bcef03Schristos  Do we need to fix the definition of the mdoc(7) language?
560