Annotation of mandoc/TODO, Revision 1.81
1.1 kristaps 1: ************************************************************************
1.37 kristaps 2: * Official mandoc TODO.
1.81 ! schwarze 3: * $Id: TODO,v 1.80 2011/01/22 20:36:02 schwarze 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.61 schwarze 13: - the roff parser doesn't tolerate additional characters between
14: a macro and the \} terminating a conditional block, e.g.
15: .if n \{
16: .br \}
17: reported by ulrich spoerlein Tue, 19 Oct 2010 20:39:50 +0200
18:
1.74 schwarze 19: ************************************************************************
20: * formatter bugs
21: ************************************************************************
1.63 schwarze 22:
1.61 schwarze 23: ************************************************************************
1.1 kristaps 24: * missing features
25: ************************************************************************
1.70 kristaps 26:
1.79 schwarze 27: --- missing roff features ----------------------------------------------
28:
1.81 ! schwarze 29: - .it (line traps) occur in mysql(1), yasm_arch(7)
! 30: generated by DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
! 31: reported by brad@ Sat, 15 Jan 2011 15:48:18 -0500
! 32:
1.80 schwarze 33: - .ns (no-space mode) occurs in xine-config(1)
34: reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500
1.61 schwarze 35:
1.80 schwarze 36: - xloadimage(1) wants .ti (temporary indent), rep by naddy@
1.81 ! schwarze 37:
! 38: - .ta (tab settings) occurs in ircbug(1) and probably gnats(1)
! 39: reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500
1.75 schwarze 40:
1.80 schwarze 41: - pod2man expects `tr' to be implemented for \*(-- to work
1.79 schwarze 42:
43: --- missing mdoc features ----------------------------------------------
44:
1.18 schwarze 45: - fix bad block nesting involving multiple identical explicit blocks
46: see the OpenBSD mdoc_macro.c 1.47 commit message
47:
1.1 kristaps 48: - .Bl -column .Xo support is missing
49: ultimate goal:
50: restore .Xr and .Dv to
51: lib/libc/compat-43/sigvec.3
52: lib/libc/gen/signal.3
53: lib/libc/sys/sigaction.2
54:
1.28 schwarze 55: - edge case: decide how to deal with blk_full bad nesting, e.g.
56: .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1)
57: from jmc@ Wed, 14 Jul 2010 18:10:32 +0100
58:
1.74 schwarze 59: - \\ is now implemented correctly
60: * when defining strings and macros using .ds and .de
61: * when parsing roff(7) and man(7) macro arguments
62: It does not yet work in mdoc(7) macro arguments
63: because libmdoc does not yet use mandoc_getarg().
64: Also check what happens in plain text, it must be identical to \e.
1.22 schwarze 65:
1.10 kristaps 66: - implement blank `Bl -column', such as
67: .Bl -column
68: .It foo Ta bar
69: .El
1.11 kristaps 70:
71: - explicitly disallow nested `Bl -column', which would clobber internal
72: flags defined for struct mdoc_macro
1.42 schwarze 73:
74: - inside `.Bl -column' phrases, punctuation is handled like normal
75: text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -."
76:
77: - inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf'
78: is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab."
79: but should give "ab ."
1.12 kristaps 80:
81: - set a meaningful default if no `Bl' list type is assigned
1.13 kristaps 82:
83: - have a blank `It' head for `Bl -tag' not puke
1.20 kristaps 84:
85: - prohibit `Nm' from having non-text HEAD children
86: (e.g., NetBSD mDNSShared/dns-sd.1)
87: (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified)
1.57 kristaps 88:
1.79 schwarze 89: --- missing man features -----------------------------------------------
1.63 schwarze 90:
91: - bashbug(1) complains "line scope broken" after
92: .SM
93: .B something
94: should either just work or be a warning
95: reported by naddy@
1.79 schwarze 96:
1.80 schwarze 97: - groff an-ext.tmac macros (.UR, .UE) occur in xine(5)
98: reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500
99:
1.79 schwarze 100: --- missing tbl features -----------------------------------------------
101:
102: - implement basic non-parametric .de to support e.g. sox(1)
103: reported by naddy@ Sat, 16 Oct 2010 23:51:57 +0200
104: *** sox(1) still doesn't work, tbl(1) errors need investigation
105:
106: --- missing misc features ----------------------------------------------
107:
108: - clean up escape sequence handling, creating three classes:
109: (1) fully implemented, or parsed and ignored without loss of content
110: (2) unimplemented, potentially causing loss of content
111: or serious mangling of formatting (e.g. \n) -> ERROR
112: see textproc/mgdiff(1) for nice examples
113: (3) undefined, just output the character -> perhaps WARNING
114:
115: - look at pages generated from reStructeredText, e.g. devel/mercurial hg(1)
116: These are a weird mixture of man(7) and custom autogenerated low-level
117: roff stuff. Figure out to what extent we can cope.
1.80 schwarze 118: For details, see http://docutils.sourceforge.net/rst.html
1.79 schwarze 119: noted by stsp@ Sat, 24 Apr 2010 09:17:55 +0200
120: reminded by nicm@ Mon, 3 May 2010 09:52:41 +0100
1.71 schwarze 121:
122: - check compatibility with Plan9:
123: http://swtch.com/usr/local/plan9/tmac/tmac.an
124: http://swtch.com/plan9port/man/man7/man.html
125: "Anthony J. Bentley" <anthonyjbentley@gmail.com> 28 Dec 2010 21:58:40 -0700
1.63 schwarze 126:
1.1 kristaps 127: ************************************************************************
128: * formatting issues: ugly output
129: ************************************************************************
1.33 schwarze 130:
1.67 schwarze 131: - double quotes inside double quotes are escaped by doubling them
1.74 schwarze 132: implement this in mdoc(7), too
133: so far, we only have it in roff(7) and man(7)
1.67 schwarze 134: reminded by millert@ Thu, 09 Dec 2010 17:29:52 -0500
135:
1.28 schwarze 136: - perl(1) SYNOPSIS looks bad; reported by deraadt@
1.29 kristaps 137: 1) man(7) seems to need SYNOPSIS .Nm blocks, too
1.1 kristaps 138:
1.39 schwarze 139: - In .Bl -column,
140: .It Em Authentication<tab>Key Length
141: ought to render "Key Length" with emphasis, too,
142: see OpenBSD iked.conf(5).
143:
1.1 kristaps 144: - empty phrases in .Bl column produce too few blanks
145: try e.g. .Bl -column It Ta Ta
146: reported by millert Fri, 02 Apr 2010 16:13:46 -0400
1.48 schwarze 147:
148: - in enclosures, mandoc sometimes fancies a bogus end of sentence
149: reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059
1.35 kristaps 150:
1.1 kristaps 151: ************************************************************************
152: * formatting issues: gratuitious differences
153: ************************************************************************
1.65 kristaps 154:
155: - .Rv (and probably .Ex) print different text if an `Nm' has been named
156: or not (run a manual without `Nm blah' to see this). I'm not sure
157: that this exists in the wild, but it's still an error.
1.38 schwarze 158:
159: - In .Bl -bullet, the groff bullet is "+\b+\bo\bo", the mandoc bullet
160: is just "o\bo".
161: see for example OpenBSD ksh(1)
162:
163: - The characters "|" and "\*(Ba" should never be bold,
164: not even in the middle of a word, e.g. ".Cm b\*(Bac" in
165: "mknod [-m mode] name b|c major minor"
166: in OpenBSD ksh(1)
167:
168: - A bogus .Pp between two .It must not produce a double blank line,
1.39 schwarze 169: see between -R and -r in OpenBSD rm(1), before "update" in mount(8),
170: or in DIAGNOSTICS in init(8).
1.68 kristaps 171: Also have `It' complain if `Pp' is invoked at certain times (not
172: -compact?).
1.39 schwarze 173:
174: - .Nx 1.0a
175: should be "NetBSD 1.0A", not "NetBSD 1.0a",
176: see OpenBSD ccdconfig(8).
177:
178: - In .Bl -tag, if a tag exceeds the right margin and must be continued
179: on the next line, it must be indented by -width, not width+1;
180: see "rule block|pass" in OpenBSD ifconfig(8).
1.56 schwarze 181:
182: - The \& zero-width character counts as output.
183: That is, when it is alone on a line between two .Pp,
184: we want three blank lines, not two as in mandoc.
1.63 schwarze 185:
186: - When .Fn arguments exceed one output line, all but the first
187: should be indented, see e.g. rpc(3);
188: reported by jmc@ on discuss@ Fri, 29 Oct 2010 13:48:33 +0100
1.64 schwarze 189:
190: - Header lines of excessive length:
191: Port OpenBSD man_term.c rev. 1.25 to mdoc_term.c
192: and document it in mdoc(7) and man(7) COMPATIBILITY
193: found while talking to Chris Bennett
1.75 schwarze 194:
195: ************************************************************************
196: * error reporting issues
197: ************************************************************************
1.1 kristaps 198:
1.9 kristaps 199: ************************************************************************
200: * performance issues
201: ************************************************************************
202:
203: Several areas can be cleaned up to make mandoc even faster. These are
204:
205: - improve hashing mechanism for macros (quite important: performance)
206:
207: - improve hashing mechanism for characters (not as important)
1.23 kristaps 208:
1.37 kristaps 209: - the PDF file is HUGE: this can be reduced by using relative offsets
210:
1.23 kristaps 211: ************************************************************************
212: * structural issues
213: ************************************************************************
1.67 schwarze 214:
215: - Find better ways to prevent endless loops
216: in roff(7) macro and string expansion.
217:
CVSweb