[BACK]Return to TODO CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/TODO, Revision 1.88

1.1       kristaps    1: ************************************************************************
1.37      kristaps    2: * Official mandoc TODO.
1.88    ! kristaps    3: * $Id: TODO,v 1.87 2011/01/31 12:52:43 kristaps Exp $
1.27      kristaps    4: ************************************************************************
                      5:
                      6: ************************************************************************
1.61      schwarze    7: * parser bugs
                      8: ************************************************************************
                      9:
1.81      schwarze   10: - .TP before .SH is still FATAL in man(7)
                     11:   reported by brad@  Sat, 15 Jan 2011 15:54:54 -0500
                     12:
1.83      schwarze   13: - The mdoc(7) parser should handle `\.' as punctuation:
                     14:     .Ql .if ${VAR} op something \.
                     15:   should produce
                     16:     `.if ${VAR} op something'.
                     17:   not
                     18:     `.if ${VAR} op something .'
                     19:   as seen in make(1).
                     20:   To escape the dot, one would use `\&.'.
                     21:
1.61      schwarze   22: - the roff parser doesn't tolerate additional characters between
                     23:   a macro and the \} terminating a conditional block, e.g.
                     24:   .if n \{
                     25:   .br \}
                     26:   reported by ulrich spoerlein  Tue, 19 Oct 2010 20:39:50 +0200
                     27:
1.74      schwarze   28: ************************************************************************
                     29: * formatter bugs
                     30: ************************************************************************
1.63      schwarze   31:
1.61      schwarze   32: ************************************************************************
1.1       kristaps   33: * missing features
                     34: ************************************************************************
1.70      kristaps   35:
1.79      schwarze   36: --- missing roff features ----------------------------------------------
                     37:
1.82      schwarze   38: - .ad (adjust margins)
                     39:   .ad l -- adjust left margin only (flush left)
                     40:   .ad r -- adjust right margin only (flush right)
                     41:   .ad c -- center text on line
                     42:   .ad b -- adjust both margins (alias: .ad n)
                     43:   .na   -- temporarily disable adjustment without changing the mode
                     44:   .ad   -- re-enable adjustment without changing the mode
                     45:   Adjustment mode is ignored while in no-fill mode (.nf).
                     46:
1.81      schwarze   47: - .it (line traps) occur in mysql(1), yasm_arch(7)
                     48:   generated by DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
                     49:   reported by brad@  Sat, 15 Jan 2011 15:48:18 -0500
                     50:
1.80      schwarze   51: - .ns (no-space mode) occurs in xine-config(1)
                     52:   reported by brad@  Sat, 15 Jan 2011 15:45:23 -0500
1.61      schwarze   53:
1.80      schwarze   54: - xloadimage(1) wants .ti (temporary indent), rep by naddy@
1.81      schwarze   55:
                     56: - .ta (tab settings) occurs in ircbug(1) and probably gnats(1)
                     57:   reported by brad@  Sat, 15 Jan 2011 15:50:51 -0500
1.75      schwarze   58:
1.80      schwarze   59: - pod2man expects `tr' to be implemented for \*(-- to work
1.79      schwarze   60:
1.83      schwarze   61: - \c (interrupted text) occurs in chat(8)
                     62:
1.79      schwarze   63: --- missing mdoc features ----------------------------------------------
                     64:
1.18      schwarze   65: - fix bad block nesting involving multiple identical explicit blocks
                     66:   see the OpenBSD mdoc_macro.c 1.47 commit message
                     67:
1.1       kristaps   68: - .Bl -column .Xo support is missing
                     69:   ultimate goal:
                     70:   restore .Xr and .Dv to
                     71:   lib/libc/compat-43/sigvec.3
                     72:   lib/libc/gen/signal.3
                     73:   lib/libc/sys/sigaction.2
                     74:
1.28      schwarze   75: - edge case: decide how to deal with blk_full bad nesting, e.g.
                     76:   .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1)
                     77:   from jmc@  Wed, 14 Jul 2010 18:10:32 +0100
                     78:
1.74      schwarze   79: - \\ is now implemented correctly
                     80:   * when defining strings and macros using .ds and .de
                     81:   * when parsing roff(7) and man(7) macro arguments
                     82:   It does not yet work in mdoc(7) macro arguments
                     83:   because libmdoc does not yet use mandoc_getarg().
                     84:   Also check what happens in plain text, it must be identical to \e.
1.82      schwarze   85:
                     86: - .Bd -filled should not be the same as .Bd -ragged, but align both
                     87:   the left and right margin.  In groff, it is implemented in terms
                     88:   of .ad b, which we don't have either.  Found in cksum(1).
1.22      schwarze   89:
1.10      kristaps   90: - implement blank `Bl -column', such as
                     91:   .Bl -column
                     92:   .It foo Ta bar
                     93:   .El
1.11      kristaps   94:
                     95: - explicitly disallow nested `Bl -column', which would clobber internal
                     96:   flags defined for struct mdoc_macro
1.42      schwarze   97:
                     98: - inside `.Bl -column' phrases, punctuation is handled like normal
                     99:   text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -."
                    100:
                    101: - inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf'
                    102:   is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab."
                    103:   but should give "ab ."
1.12      kristaps  104:
                    105: - set a meaningful default if no `Bl' list type is assigned
1.13      kristaps  106:
                    107: - have a blank `It' head for `Bl -tag' not puke
1.20      kristaps  108:
                    109: - prohibit `Nm' from having non-text HEAD children
                    110:   (e.g., NetBSD mDNSShared/dns-sd.1)
                    111:   (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified)
1.57      kristaps  112:
1.79      schwarze  113: --- missing man features -----------------------------------------------
1.63      schwarze  114:
                    115: - bashbug(1) complains "line scope broken" after
                    116:   .SM
                    117:   .B something
                    118:   should either just work or be a warning
                    119:   reported by naddy@
1.79      schwarze  120:
1.80      schwarze  121: - groff an-ext.tmac macros (.UR, .UE) occur in xine(5)
                    122:   reported by brad@  Sat, 15 Jan 2011 15:45:23 -0500
                    123:
1.79      schwarze  124: --- missing tbl features -----------------------------------------------
                    125:
                    126: - implement basic non-parametric .de to support e.g. sox(1)
                    127:   reported by naddy@ Sat, 16 Oct 2010 23:51:57 +0200
                    128:   *** sox(1) still doesn't work, tbl(1) errors need investigation
                    129:
                    130: --- missing misc features ----------------------------------------------
                    131:
                    132: - clean up escape sequence handling, creating three classes:
                    133:   (1) fully implemented, or parsed and ignored without loss of content
                    134:   (2) unimplemented, potentially causing loss of content
                    135:       or serious mangling of formatting (e.g. \n) -> ERROR
                    136:       see textproc/mgdiff(1) for nice examples
                    137:   (3) undefined, just output the character -> perhaps WARNING
                    138:
1.83      schwarze  139: - The \t escape sequence is the same as a literal tab, see for example
                    140:   the ASCII table in hexdump(1) where
                    141:     .Bl -column \&000_nu \&001_so \&002_st \&003_et \&004_eo
                    142:     .It \&000\ nul\t001\ soh\t002\ stx\t003\ etx\t004\ eot\t005\ enq
                    143:   produces
                    144:     000 nul  001 soh  002 stx  003 etx  004 eot  005 enq
                    145:   and the example in oldrdist(1)
                    146:
1.79      schwarze  147: - look at pages generated from reStructeredText, e.g. devel/mercurial hg(1)
                    148:   These are a weird mixture of man(7) and custom autogenerated low-level
                    149:   roff stuff.  Figure out to what extent we can cope.
1.80      schwarze  150:   For details, see http://docutils.sourceforge.net/rst.html
1.79      schwarze  151:   noted by stsp@  Sat, 24 Apr 2010 09:17:55 +0200
                    152:   reminded by nicm@  Mon, 3 May 2010 09:52:41 +0100
1.71      schwarze  153:
                    154: - check compatibility with Plan9:
                    155:   http://swtch.com/usr/local/plan9/tmac/tmac.an
                    156:   http://swtch.com/plan9port/man/man7/man.html
                    157:   "Anthony J. Bentley" <anthonyjbentley@gmail.com> 28 Dec 2010 21:58:40 -0700
1.63      schwarze  158:
1.1       kristaps  159: ************************************************************************
                    160: * formatting issues: ugly output
                    161: ************************************************************************
1.87      kristaps  162:
                    163: - a column list with blank `Ta' cells triggers a spurrious
                    164:   start-with-whitespace printing of a newline
1.33      schwarze  165:
1.67      schwarze  166: - double quotes inside double quotes are escaped by doubling them
1.74      schwarze  167:   implement this in mdoc(7), too
                    168:   so far, we only have it in roff(7) and man(7)
1.67      schwarze  169:   reminded by millert@  Thu, 09 Dec 2010 17:29:52 -0500
                    170:
1.28      schwarze  171: - perl(1) SYNOPSIS looks bad; reported by deraadt@
1.29      kristaps  172:   1) man(7) seems to need SYNOPSIS .Nm blocks, too
1.1       kristaps  173:
1.39      schwarze  174: - In .Bl -column,
                    175:   .It Em Authentication<tab>Key Length
                    176:   ought to render "Key Length" with emphasis, too,
                    177:   see OpenBSD iked.conf(5).
                    178:
1.1       kristaps  179: - empty phrases in .Bl column produce too few blanks
                    180:   try e.g. .Bl -column It Ta Ta
                    181:   reported by millert Fri, 02 Apr 2010 16:13:46 -0400
1.48      schwarze  182:
1.83      schwarze  183: - .%T can have trailing punctuation.  Currently, it puts the trailing
                    184:   punctuation into a trailing MDOC_TEXT element inside its own scope.
                    185:   That element should rather be outside its scope, such that the
                    186:   punctuation does not get underlines.  This is not trivial to
                    187:   implement because .%T then needs some features of in_line_eoln() -
                    188:   slurp all arguments into one single text element - and one feature
                    189:   of in_line() - put trailing punctuation out of scope.
                    190:   Found in mount_nfs(8) and exports(5), search for "Appendix".
                    191:
1.48      schwarze  192: - in enclosures, mandoc sometimes fancies a bogus end of sentence
                    193:   reminded by jmc@  Thu, 23 Sep 2010 18:13:39 +0059
1.35      kristaps  194:
1.1       kristaps  195: ************************************************************************
                    196: * formatting issues: gratuitious differences
                    197: ************************************************************************
1.65      kristaps  198:
                    199: - .Rv (and probably .Ex) print different text if an `Nm' has been named
                    200:   or not (run a manual without `Nm blah' to see this).  I'm not sure
                    201:   that this exists in the wild, but it's still an error.
1.38      schwarze  202:
                    203: - In .Bl -bullet, the groff bullet is "+\b+\bo\bo", the mandoc bullet
                    204:   is just "o\bo".
                    205:   see for example OpenBSD ksh(1)
                    206:
                    207: - The characters "|" and "\*(Ba" should never be bold,
                    208:   not even in the middle of a word, e.g. ".Cm b\*(Bac" in
                    209:   "mknod [-m mode] name b|c major minor"
                    210:   in OpenBSD ksh(1)
                    211:
                    212: - A bogus .Pp between two .It must not produce a double blank line,
1.39      schwarze  213:   see between -R and -r in OpenBSD rm(1), before "update" in mount(8),
1.83      schwarze  214:   or in DIAGNOSTICS in init(8), or before "is always true" in ksh(1).
                    215:   The same happens with .Pp just before .El, see bgpd.conf(5).
1.68      kristaps  216:   Also have `It' complain if `Pp' is invoked at certain times (not
                    217:   -compact?).
1.39      schwarze  218:
1.83      schwarze  219: - If the *first* line after .It is .Pp, break the line right after
                    220:   the tag, do not pad with space characters before breaking.
                    221:   See the description of the a, c, and i commands in sed(1).
                    222:
                    223: - If the first line after .It is .D1, do not assert a blank line
                    224:   in between, see for example tmux(1).
                    225:   reported by nicm@  13 Jan 2011 00:18:57 +0000
                    226:
1.39      schwarze  227: - .Nx 1.0a
                    228:   should be "NetBSD 1.0A", not "NetBSD 1.0a",
                    229:   see OpenBSD ccdconfig(8).
1.83      schwarze  230:
1.39      schwarze  231: - In .Bl -tag, if a tag exceeds the right margin and must be continued
                    232:   on the next line, it must be indented by -width, not width+1;
                    233:   see "rule block|pass" in OpenBSD ifconfig(8).
1.56      schwarze  234:
1.83      schwarze  235: - When the -width string contains macros, the macros must be rendered
                    236:   before measuring the width, for example
                    237:     .Bl -tag -width ".Dv message"
                    238:   in magic(5), located in src/usr.bin/file, is the same
                    239:   as -width 7n, not -width 11n.
                    240:
1.56      schwarze  241: - The \& zero-width character counts as output.
                    242:   That is, when it is alone on a line between two .Pp,
                    243:   we want three blank lines, not two as in mandoc.
1.63      schwarze  244:
                    245: - When .Fn arguments exceed one output line, all but the first
                    246:   should be indented, see e.g. rpc(3);
                    247:   reported by jmc@ on discuss@  Fri, 29 Oct 2010 13:48:33 +0100
1.83      schwarze  248:
                    249: - .Ns should work when called at the end of an input line, see
                    250:   the following code in vi(1):
                    251:     .It Xo
                    252:     .Op Ar line
                    253:     .Cm a Ns Op Cm ppend Ns
                    254:     .Op Cm !\&
                    255:     .Xc
                    256:     The input text is appended after the specified line.
                    257:
1.64      schwarze  258: - Header lines of excessive length:
                    259:   Port OpenBSD man_term.c rev. 1.25 to mdoc_term.c
                    260:   and document it in mdoc(7) and man(7) COMPATIBILITY
                    261:   found while talking to Chris Bennett
1.83      schwarze  262:
                    263: - In man(7), the sequence
                    264:     .HP
                    265:     one line of regular text
                    266:     .SH
                    267:   should not produce two blank lines before the .SH,
                    268:   see for example named-checkconf(8).
                    269:
                    270: - In man(7), the sequence
                    271:     regular text
                    272:     .RS
                    273:     .IP
                    274:   should have a blank line between the text and the beginning of the
                    275:   indented paragraph, see for example sudo(1).
                    276:
                    277: - At least sometimes, .sp is ignored right after .SH; see named.conf(5).
                    278:
                    279: - trailing whitespace must be ignored even when followed by a font escape,
                    280:   see for example
                    281:     makes
                    282:     \fBdig \fR
                    283:     operate in batch mode
                    284:   in dig(1).
1.75      schwarze  285:
                    286: ************************************************************************
                    287: * error reporting issues
                    288: ************************************************************************
1.1       kristaps  289:
1.9       kristaps  290: ************************************************************************
                    291: * performance issues
                    292: ************************************************************************
                    293:
                    294: Several areas can be cleaned up to make mandoc even faster.  These are
                    295:
                    296: - improve hashing mechanism for macros (quite important: performance)
                    297:
                    298: - improve hashing mechanism for characters (not as important)
1.23      kristaps  299:
1.37      kristaps  300: - the PDF file is HUGE: this can be reduced by using relative offsets
                    301:
1.23      kristaps  302: ************************************************************************
                    303: * structural issues
                    304: ************************************************************************
1.67      schwarze  305:
                    306: - Find better ways to prevent endless loops
                    307:   in roff(7) macro and string expansion.
                    308:

CVSweb