1 ************************************************************************
2 * Official mandoc TODO.
3 * $Id: TODO,v 1.86 2011/01/25 16:20:24 kristaps Exp $
4 ************************************************************************
6 ************************************************************************
8 ************************************************************************
10 - .TP before .SH is still FATAL in man(7)
11 reported by brad@ Sat, 15 Jan 2011 15:54:54 -0500
13 - The mdoc(7) parser should handle `\.' as punctuation:
14 .Ql .if ${VAR} op something \.
16 `.if ${VAR} op something'.
18 `.if ${VAR} op something .'
20 To escape the dot, one would use `\&.'.
22 - the roff parser doesn't tolerate additional characters between
23 a macro and the \} terminating a conditional block, e.g.
26 reported by ulrich spoerlein Tue, 19 Oct 2010 20:39:50 +0200
28 ************************************************************************
30 ************************************************************************
32 ************************************************************************
34 ************************************************************************
36 --- missing roff features ----------------------------------------------
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).
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
51 - .ns (no-space mode) occurs in xine-config(1)
52 reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500
54 - xloadimage(1) wants .ti (temporary indent), rep by naddy@
56 - .ta (tab settings) occurs in ircbug(1) and probably gnats(1)
57 reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500
59 - pod2man expects `tr' to be implemented for \*(-- to work
61 - \c (interrupted text) occurs in chat(8)
63 --- missing mdoc features ----------------------------------------------
65 - fix bad block nesting involving multiple identical explicit blocks
66 see the OpenBSD mdoc_macro.c 1.47 commit message
68 - .Bl -column .Xo support is missing
70 restore .Xr and .Dv to
71 lib/libc/compat-43/sigvec.3
73 lib/libc/sys/sigaction.2
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
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.
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).
90 - implement blank `Bl -column', such as
95 - explicitly disallow nested `Bl -column', which would clobber internal
96 flags defined for struct mdoc_macro
98 - inside `.Bl -column' phrases, punctuation is handled like normal
99 text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -."
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 ."
105 - set a meaningful default if no `Bl' list type is assigned
107 - have a blank `It' head for `Bl -tag' not puke
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)
113 --- missing man features -----------------------------------------------
115 - bashbug(1) complains "line scope broken" after
118 should either just work or be a warning
121 - groff an-ext.tmac macros (.UR, .UE) occur in xine(5)
122 reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500
124 --- missing tbl features -----------------------------------------------
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
130 --- missing misc features ----------------------------------------------
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
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
144 000 nul 001 soh 002 stx 003 etx 004 eot 005 enq
145 and the example in oldrdist(1)
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.
150 For details, see http://docutils.sourceforge.net/rst.html
151 noted by stsp@ Sat, 24 Apr 2010 09:17:55 +0200
152 reminded by nicm@ Mon, 3 May 2010 09:52:41 +0100
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
159 ************************************************************************
160 * formatting issues: ugly output
161 ************************************************************************
163 - double quotes inside double quotes are escaped by doubling them
164 implement this in mdoc(7), too
165 so far, we only have it in roff(7) and man(7)
166 reminded by millert@ Thu, 09 Dec 2010 17:29:52 -0500
168 - perl(1) SYNOPSIS looks bad; reported by deraadt@
169 1) man(7) seems to need SYNOPSIS .Nm blocks, too
172 .It Em Authentication<tab>Key Length
173 ought to render "Key Length" with emphasis, too,
174 see OpenBSD iked.conf(5).
176 - empty phrases in .Bl column produce too few blanks
177 try e.g. .Bl -column It Ta Ta
178 reported by millert Fri, 02 Apr 2010 16:13:46 -0400
180 - .%T can have trailing punctuation. Currently, it puts the trailing
181 punctuation into a trailing MDOC_TEXT element inside its own scope.
182 That element should rather be outside its scope, such that the
183 punctuation does not get underlines. This is not trivial to
184 implement because .%T then needs some features of in_line_eoln() -
185 slurp all arguments into one single text element - and one feature
186 of in_line() - put trailing punctuation out of scope.
187 Found in mount_nfs(8) and exports(5), search for "Appendix".
189 - in enclosures, mandoc sometimes fancies a bogus end of sentence
190 reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059
192 ************************************************************************
193 * formatting issues: gratuitious differences
194 ************************************************************************
196 - .Rv (and probably .Ex) print different text if an `Nm' has been named
197 or not (run a manual without `Nm blah' to see this). I'm not sure
198 that this exists in the wild, but it's still an error.
200 - In .Bl -bullet, the groff bullet is "+\b+\bo\bo", the mandoc bullet
202 see for example OpenBSD ksh(1)
204 - The characters "|" and "\*(Ba" should never be bold,
205 not even in the middle of a word, e.g. ".Cm b\*(Bac" in
206 "mknod [-m mode] name b|c major minor"
209 - A bogus .Pp between two .It must not produce a double blank line,
210 see between -R and -r in OpenBSD rm(1), before "update" in mount(8),
211 or in DIAGNOSTICS in init(8), or before "is always true" in ksh(1).
212 The same happens with .Pp just before .El, see bgpd.conf(5).
213 Also have `It' complain if `Pp' is invoked at certain times (not
216 - If the *first* line after .It is .Pp, break the line right after
217 the tag, do not pad with space characters before breaking.
218 See the description of the a, c, and i commands in sed(1).
220 - If the first line after .It is .D1, do not assert a blank line
221 in between, see for example tmux(1).
222 reported by nicm@ 13 Jan 2011 00:18:57 +0000
225 should be "NetBSD 1.0A", not "NetBSD 1.0a",
226 see OpenBSD ccdconfig(8).
228 - In .Bl -tag, if a tag exceeds the right margin and must be continued
229 on the next line, it must be indented by -width, not width+1;
230 see "rule block|pass" in OpenBSD ifconfig(8).
232 - When the -width string contains macros, the macros must be rendered
233 before measuring the width, for example
234 .Bl -tag -width ".Dv message"
235 in magic(5), located in src/usr.bin/file, is the same
236 as -width 7n, not -width 11n.
238 - The \& zero-width character counts as output.
239 That is, when it is alone on a line between two .Pp,
240 we want three blank lines, not two as in mandoc.
242 - When .Fn arguments exceed one output line, all but the first
243 should be indented, see e.g. rpc(3);
244 reported by jmc@ on discuss@ Fri, 29 Oct 2010 13:48:33 +0100
246 - .Ns should only be effective when called by another macro,
247 not as a stand-alone macro at the beginning of a line;
248 see for example the awk(1) SYNOPSIS.
250 - .Ns should work when called at the end of an input line, see
251 the following code in vi(1):
254 .Cm a Ns Op Cm ppend Ns
257 The input text is appended after the specified line.
259 - Header lines of excessive length:
260 Port OpenBSD man_term.c rev. 1.25 to mdoc_term.c
261 and document it in mdoc(7) and man(7) COMPATIBILITY
262 found while talking to Chris Bennett
264 - In man(7), the sequence
266 one line of regular text
268 should not produce two blank lines before the .SH,
269 see for example named-checkconf(8).
271 - In man(7), the sequence
275 should have a blank line between the text and the beginning of the
276 indented paragraph, see for example sudo(1).
278 - At least sometimes, .sp is ignored right after .SH; see named.conf(5).
280 - trailing whitespace must be ignored even when followed by a font escape,
284 operate in batch mode
287 ************************************************************************
288 * error reporting issues
289 ************************************************************************
291 ************************************************************************
293 ************************************************************************
295 Several areas can be cleaned up to make mandoc even faster. These are
297 - improve hashing mechanism for macros (quite important: performance)
299 - improve hashing mechanism for characters (not as important)
301 - the PDF file is HUGE: this can be reduced by using relative offsets
303 ************************************************************************
305 ************************************************************************
307 - Find better ways to prevent endless loops
308 in roff(7) macro and string expansion.