Annotation of mandoc/TODO, Revision 1.62
1.1 kristaps 1: ************************************************************************
1.37 kristaps 2: * Official mandoc TODO.
1.62 ! schwarze 3: * $Id: TODO,v 1.61 2010/10/19 21:40:27 schwarze Exp $
1.27 kristaps 4: ************************************************************************
5:
6: ************************************************************************
1.61 schwarze 7: * parser bugs
8: ************************************************************************
9:
10: - the roff parser doesn't tolerate additional characters between
11: a macro and the \} terminating a conditional block, e.g.
12: .if n \{
13: .br \}
14: reported by ulrich spoerlein Tue, 19 Oct 2010 20:39:50 +0200
15:
16: ************************************************************************
1.1 kristaps 17: * missing features
18: ************************************************************************
1.61 schwarze 19:
1.1 kristaps 20: - explicit blocks with missing end macro should be implicitely closed
21: at the end of the enclosing block, e.g. .Bl It (El) Sh
22: reminded by stsp@ in net/pptp pptp.8 Fri, 23 Apr 2010 20:32:39 +0200
23:
1.18 schwarze 24: - fix bad block nesting involving multiple identical explicit blocks
25: see the OpenBSD mdoc_macro.c 1.47 commit message
26:
1.1 kristaps 27: - .Bl -column .Xo support is missing
28: ultimate goal:
29: restore .Xr and .Dv to
30: lib/libc/compat-43/sigvec.3
31: lib/libc/gen/signal.3
32: lib/libc/sys/sigaction.2
33:
1.28 schwarze 34: - edge case: decide how to deal with blk_full bad nesting, e.g.
35: .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1)
36: from jmc@ Wed, 14 Jul 2010 18:10:32 +0100
37:
38: - auto-Bk in the SYNOPSIS
39: patch from kristaps@ Fri, 16 Jul 2010 14:51:24 +0200
40: to be revisited after OpenBSD 4.8 tree unlock
41:
1.1 kristaps 42: - implement \\
43: in plain text, identical to \e
44: as a macro argument, identical to \ i.e. escaping the next character
45: We do not have macro definitions yet; if we implement them,
46: \\ must behave in a macro def like in a macro argument,
47: and when using the macro, it must expand yet again.
1.22 schwarze 48:
1.60 schwarze 49: - implement basic non-parametric .de to support e.g. sox(1)
50: .de SP
51: .if t .sp .5
52: .if n .sp
53: ..
54: .de EX
55: .SP
56: .nf
57: .ft CW
58: ..
59: .de EE
60: .ft R
61: .SP
62: .fi
63: ..
64: reported by naddy@ Sat, 16 Oct 2010 23:51:57 +0200
1.62 ! schwarze 65:
! 66: - clean up escape sequence handling, creating three classes:
! 67: (1) fully implemented, or parsed and ignored without loss of content
! 68: (2) unimplemented, potentially causing loss of content
! 69: or serious mangling of formatting (e.g. \n) -> ERROR
! 70: see textproc/mgdiff(1) for nice examples
! 71: (3) undefined, just output the character -> perhaps WARNING
1.60 schwarze 72:
73: - port OpenBSD tbl integration bsd.lv, probably cleaning it up
1.1 kristaps 74:
75: - look at pages generated from reStructeredText, e.g. devel/mercurial hg(1)
76: These are a weird mixture of man(7) and custom autogenerated low-level
77: roff stuff. Figure out to what extent we can cope.
78: noted by stsp@ Sat, 24 Apr 2010 09:17:55 +0200
79: reminded by nicm@ Mon, 3 May 2010 09:52:41 +0100
80:
1.10 kristaps 81: - implement blank `Bl -column', such as
82: .Bl -column
83: .It foo Ta bar
84: .El
1.11 kristaps 85:
86: - explicitly disallow nested `Bl -column', which would clobber internal
87: flags defined for struct mdoc_macro
1.42 schwarze 88:
89: - inside `.Bl -column' phrases, punctuation is handled like normal
90: text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -."
91:
92: - inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf'
93: is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab."
94: but should give "ab ."
1.12 kristaps 95:
96: - set a meaningful default if no `Bl' list type is assigned
1.13 kristaps 97:
98: - have a blank `It' head for `Bl -tag' not puke
1.20 kristaps 99:
100: - prohibit `Nm' from having non-text HEAD children
101: (e.g., NetBSD mDNSShared/dns-sd.1)
102: (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified)
1.36 kristaps 103:
104: - allow `Qq', `Dq', `Sq', `Aq', `Bq' to have 0 arguments
105: noted by Alex Kozlov 08/06/10 23:05
1.57 kristaps 106:
107: - Have `Sh', `It', `Ss' and others complain if `Pp' is invoked prior to
108: close (in the post validation) or prior to open (pre). This noted by
109: jmc@ a thousand years ago.
1.41 kristaps 110:
1.1 kristaps 111: ************************************************************************
112: * formatting issues: ugly output
113: ************************************************************************
1.33 schwarze 114:
1.28 schwarze 115: - perl(1) SYNOPSIS looks bad; reported by deraadt@
1.29 kristaps 116: 1) man(7) seems to need SYNOPSIS .Nm blocks, too
1.1 kristaps 117:
1.39 schwarze 118: - In .Bl -column,
119: .It Em Authentication<tab>Key Length
120: ought to render "Key Length" with emphasis, too,
121: see OpenBSD iked.conf(5).
122:
1.1 kristaps 123: - empty phrases in .Bl column produce too few blanks
124: try e.g. .Bl -column It Ta Ta
125: reported by millert Fri, 02 Apr 2010 16:13:46 -0400
1.48 schwarze 126:
127: - in enclosures, mandoc sometimes fancies a bogus end of sentence
128: reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059
1.35 kristaps 129:
1.1 kristaps 130: ************************************************************************
131: * formatting issues: gratuitious differences
132: ************************************************************************
133:
1.38 schwarze 134: - .%T should be quoted, not underlined, when .%J is also present,
135: to better distinguish the contents of .%T and .%J,
136: see for example OpenBSD cat(1)
137:
138: - In .Bl -bullet, the groff bullet is "+\b+\bo\bo", the mandoc bullet
139: is just "o\bo".
140: see for example OpenBSD ksh(1)
141:
142: - The characters "|" and "\*(Ba" should never be bold,
143: not even in the middle of a word, e.g. ".Cm b\*(Bac" in
144: "mknod [-m mode] name b|c major minor"
145: in OpenBSD ksh(1)
146:
147: - A bogus .Pp between two .It must not produce a double blank line,
1.39 schwarze 148: see between -R and -r in OpenBSD rm(1), before "update" in mount(8),
149: or in DIAGNOSTICS in init(8).
150:
151: - .Bd -literal and .Bd -unfilled are *not* identical.
152: In -literal, tabs are 8 spaces.
153: In -unfilled, tabs are 5 spaces, just like in -filled and -ragged.
154: See the CCDF_* display in OpenBSD ccdconfig(8).
155:
156: - .Nx 1.0a
157: should be "NetBSD 1.0A", not "NetBSD 1.0a",
158: see OpenBSD ccdconfig(8).
159:
160: - In .Bl -tag, if a tag exceeds the right margin and must be continued
161: on the next line, it must be indented by -width, not width+1;
162: see "rule block|pass" in OpenBSD ifconfig(8).
1.56 schwarze 163:
164: - The \& zero-width character counts as output.
165: That is, when it is alone on a line between two .Pp,
166: we want three blank lines, not two as in mandoc.
1.1 kristaps 167:
1.9 kristaps 168: ************************************************************************
169: * performance issues
170: ************************************************************************
171:
172: Several areas can be cleaned up to make mandoc even faster. These are
173:
174: - improve hashing mechanism for macros (quite important: performance)
175:
176: - improve hashing mechanism for characters (not as important)
1.23 kristaps 177:
1.37 kristaps 178: - the PDF file is HUGE: this can be reduced by using relative offsets
179:
1.23 kristaps 180: ************************************************************************
181: * structural issues
182: ************************************************************************
CVSweb