man/l_roff-char.7.in: sprinkle *** (Dave Kemper)...
[s-roff.git] / TODO
blob5981fe97e56930865dca1dfddb4ebbec759744d2
1 TODO reminder.
3 Generic
4 =======
6 - Get rid of all the short options which choose preprocessors, instead
7   use a multiplexer
9 -- Offer a builtin mode which guesses required preprocessors, maybe add
10    configuration file option which can be used to specify global
11    / per-user additions by means of COMMAND-PAIR=PREPROC-PATH.
12    Of course also add to the command-line multiplexer option this
13    possibility..
15    This "auto" preprocessor should then reconsider it's guesses on
16    a per-file base!?
18    I really would like to get rid of the necessity to parse all files
19    with all defined preprocessors completely.  Instead we should, once
20    we see the starting command, hand over to a known builtin
21    preprocessor and parse only that much until we see the end command.
22    So convert all builtin preprocessors to libraries and offer jumpin
23    points for that purpose only, let the standalone versions be simple
24    wrappers.  S-roff can use dlopen(3) if available, otherwise don't
25    offer this optimization but continue to use the full-parse as usual,
26    that must be supported anyway for non-builtin preprocessors.
27    (XXX For [s-]troff we may not do so until the user has chosen the
28    preprocessor on the command line, since..)
30 -- Introduce a new command that can be used to select the preprocessors
31    explicitly, e.g., ".preprocessors tbl,eqn" etc.
32    If so, how to deal with included files?  Offer "-" mode which turns
33    off preprocessors for a specific file?
35    I think the best would be some kind of "shebang", for compatibilities
36    sake it must be comment-based, as in '.\"!troff eqn tbl enc=latin1'?
37    For example, newer man(1)s read the first line of the manual and
38    check for a syntax <^'\" >followed by concat of [egprtv]+ (and in
39    fact  *join in* $MANROFFSEQ environment [egprtv]+)
40                 while getopts 'egprtv' preproc_arg; do
41                         case "${preproc_arg}" in
42                         e)      pipeline="$pipeline | $EQN" ;;
43                         g)      GRAP  ;; # Ignore for compatibility.
44                         p)      pipeline="$pipeline | $PIC" ;;
45                         r)      pipeline="$pipeline | $REFER" ;;
46                         t)      pipeline="$pipeline | $TBL" ;;
47                         v)      pipeline="$pipeline | $VGRIND" ;;
48                         *)      usage ;;
49                         esac
51    This is good, but pretty much crypto and nothing for normal users.
52    But extending this, why not check for <'\" preprocess: tbl eqn"> etc.?
53    And as above.
54    And this is also documented in groff_tmac.man.  But do not bet on
55    this.
57 - Be sensible in respect to locale environment a.k.a. -Tlocale and offer
58   per-file input encodings, chooseable via a new command.
59   If so, how to deal with included files?  Offer "-" mode which turns
60   off character set conversion for a specific file?
61   Anyway, extend file_case to allow "stacking in" a character
62   conversion.
64 -- Get rid of preconv(1) again, this will simply be a layer of
65    file_case.  Yet still allow to specify some encoding on the command
66    line.
68 - What about extending searchpath:: (and file_case) so that an archive
69   could be opened as such, think .dmg, .JAR or tar (pax) and/or even
70   better SQLite3?
72 = Unicode input:
73   Making groff 21bit input-clean.
74 -> Use S-CText and make the entire toolchain UTF-8 -based and -clean.
75   This could be implemented through file_case, too, and when it finally
76   is possible usage of the \[uXX] escapes could be cut down drastically.
78 -- This also includes hyphenation etc.
80 - Directly support TTF/OTF fonts.
82 - Offer more typographic control a.k.a paragraph-wise formatting, but in
83   a way that remains compatibility with trap handling.  Is this
84   possible (maybe a stripped down try-and-error forward path bouquet
85   algorithm as suggested by Doug McIlroy is feasible?).
87 = Make -Tlj4 work with -X
89 = Guess man5ext and man7ext variables
91 = Provide man.sun implementing .TX
93 = Provide a `check' target
95 = Implement tmac.bib in terms of tmac.s
97 = Catch the following error in -me:
98   .(z
99   .(l C
100   .)z
102 = Arrows for next/previous page from R5 xditview
104 dev-ps
105 ======
107 Read PFB files directly.
109 Generate %%For comment.
111 Generate %%Title comment.
113 Angles in arc command: don't generate more digits after the decimal
114 point than are necessary.
116 Possibly generate BoundingBox comment.
118 Per font composite character mechanism (sufficient for fractions).
120 Consider whether we ought to do rounding of graphical objects other
121 than lines. What's the point?
123 Error messages should refer to output page number.
125 Search for downloadable fonts using their PostScript names if not
126 found in download file.
128 Separate path for searching for downloadable font files.
130 Clip to the BoundingBox when importing documents.
132 dev-tty
133 =======
135 Document font and device description file usage of grotty.
137 With -h avoid using a tab when a single space will do.
139 pre-eqn
140 =======
142 Use the same size increases for sum prod int as eqn does.
144 Perhaps chartype should be renamed.
146 TeX makes {sub,super}script on a single character with an accent
147 into an accent onto the (character with the script). Should we do this?
149 Implement mark and lineups within scripts, matrices and piles, and accents.
150 (Why would this be useful?)
152 Perhaps push hmotions down through lists to avoid upsetting spacing
153 adjustments.
155 Possibly generate .lf commands during compute_metrics phase.
157 Consider whether there should be extra space at the side of piles.
159 Provide scriptstyle displaystyle etc.
161 Provide a nicer matrix syntax, eg
162 matrix ccc {
163 a then b then c above
164 e then f then g above
165 h then i then k
168 Perhaps generate syntax error messages using the style of gpic.
170 Wide accents.
172 More use of \Z.
174 Extensible square roots.
176 Vphantom
178 Smash.
180 Provide a variant of vec that extends over the length of the accentee.
182 Support vertical arrow delimiters.
184 Make the following work:
186 delim @@
188 .EQ @<-@
189 some equation
192 pre-pic
193 =======
195 In troff mode, dotted and dashed splines.
197 Make DELIMITED have type lstr; this would allow us to give better
198 error messages for problems within the body of for and if constructs.
200 In troff mode without -x, fake \D't' with .ps commands.
202 Perhaps an option to set command char.
204 Add an output class for dumb line printers. It wouldn't be pretty but
205 it would be better than nothing. Integrate it with texinfo.  Useful
206 for groff -Tascii as well.
208 Option to allow better positioning of arrowheads on arcs.
210 Perhaps add PostScript output mode.
212 Change the interface to the output class so that output devices have
213 the opportunity to handle arrowheads themselves.
215 Consider whether the line thickness should scale.
217 Consider whether the test in a for loop should be fuzzy (as it
218 apparently is in grap).
220 Possibly change fillval so that zero is black.
222 Provide a way of getting text blocks (positioned with `.in' rather
223 than \h), into pic.  Should be possible to use block of diverted text
224 in pic.  Possibly something similar to T{ and T} in tbl.
226 Option to provide macro backtraces.
228 Have a path that is searched by `copy' statement.  Set by environment
229 variable or command line option.
231 pre-refer
232 =========
234 inline references
236 Some sort of macro/subroutine that can cover several references.
238 move-punctuation should ignore multiple punctuation characters.
240 Make the index files machine independent.
242 Allow search keys to be negated (with !) to indicate that the
243 reference should not contain the key.  Ignore negated keys during
244 indexed searching.
246 Provide an option with lkbib and lookbib that prints the location
247 (filename, position) of each reference.  Need to map filename_id's
248 back to filenames.
250 Rename join-authors to join-fields.  Have a separate label-join-fields
251 command used by @ and #.
253 Have some sort of quantifier: eg $.n#A means execute `$.n' for each
254 instance of an A field, setting $ to that field, and then join the
255 results using the join-authors command.
257 no-text-in-bracket command which says not to allow post_text and
258 pre_text when the [] flags has been given. Useful for superscripted
259 footnotes.
261 Make it possible to translate - to \(en in page ranges.
263 Trim eign a bit.
265 In indexed searching discard all numeric keys except dates.
267 Allow `\ ' to separate article from first word.
269 %also
271 Option automatically to supply [] flags in every reference.
273 See if we can avoid requiring a comma before jr. and so on
274 in find_last_name().
276 Cache sortified authors in authors string during tentative evaluation of
277 label specification.
279 Possibly don't allow * and % expressions in the first part of ?:, | or
280 & expressions.
282 Handle better the case where <> occurs inside functions and in the
283 first operand of ~. Or perhaps implement <> using some magic character
284 in the string.
286 Should special treatment be given to lines beginning with . in
287 references?  (Unix refer seems to treat them like `%').
289 Add global flag to control whether all files should be stat-ed after
290 loading, and whether they should be stat-ed before each search.
291 Perhaps make this dependent on the number of files there are.
293 Option to truncate keys to truncate_len in linear searching.
295 Allow multiple -f options in indxbib.
297 In indxbib, possibly store common words rather than common words
298 filename.  In this case store only words that are actually present in
299 the file.
301 Perhaps we should put out an obnoxious copyright message when lookbib
302 starts up.
304 Provide an option that writes a file containing just the references
305 actually used.  Useful if you want to distribute a document.
307 Have a magic token such that
308 %A <sort stuff><magic token><print stuff>
309 will print as though it were
310 %A <print stuff>
311 but sort as though it were
312 %A <sort stuff>
313 Do we need this if we can specify author alternatives for sorting?
314 No, provided we have separate alternatives for @.
316 In consider_authors when last names are ambiguous we might be able to
317 use just the first name and not Jr. bit. Or we might be able to
318 abbreviate the author.
320 It ought to be possible to specify an alternative field to sort on
321 instead of date. (ie if there's a field giving the type of document --
322 these references should sort after any years)
324 Provide a way to execute a command using a command-line option.
326 Option to set the label-spec as a command-line option (-L).
328 Command to to specify which fields can occur multiple times:
329 multiple AE
331 Command to specify how various fields sort:
332 aort-as-name A
333 sort-as-date D
334 sort-as-title T
335 sort-as-other O
337 Command to specify which fields are author fields:
338 # if we don't have A use field Q
339 author-fields AQ
341 Commands to set properties of tokens.
342 sortify-token \(ae ae
343 uppercase-token \[ae] \[AE]
345 Command to set the names of months:
346 months january february march april may ...
348 Perhaps provide some sort of macro capability:
349 # perhaps a macro capability
350 defmacro foo
351 annotation-field $1
352 endef
354 Command to control strings used in capitalization
355 capitalize-start \s+2
356 capitalize-end \s-2
357 (perhaps make these arguments to the capitalize command.)
359 pre-soelim
360 ==========
362 understand .pso.
364 src: troff
365 ==========
367 A line prefix request to make e.g. French quotation possible:
369   He said: >> blablablabla
370   >> blablabla blabla  bla
371   >> blabla blabla bla bla
372   >> bla bla bla blablabla
373   >> blabla. <<
375 Give a more helpful error message when the indent is set to a value
376 greater than the line-length.
378 Tracing. This is a pain to implement because requests are responsible
379 for reading their own arguments.
381 Possibly implement -s option (stop every N pages). This functionality
382 would be more appropriate in a postprocessor.
384 Line breaking should be smarter.  In particular, it should be possible
385 to shrink spaces.  Also avoid having a line that's been shrunk a lot
386 next to a line that's been stretched a lot.  The difficulty is to
387 design a mechanism that allows the user complete control over the
388 decision of where to break the line.
390 Provide a mechanism to control the shape of the rag in non-justified
391 text.
393 Add a discretionary break escape sequence. \='...'...'...' like TeX.
395 Think about kerning between characters and spaces. (Need to implement
396 get_breakpoints and split methods for kern_pair_node class.)
398 In troff, if .L > 1 when a diversion is reread in no-fill mode, then
399 extra line-spacing is added on. Groff at the moment treats line-spacing
400 like vertical spacing and doesn't do this.
402 Suppose \(ch comes from a special font S, and that the current font is
403 R. Suppose that R contains a hyphen character and that S does not.
404 Suppose that the current font is R. Suppose that \(ch is in a word
405 and has a non-zero hyphen-type. Then we ought to be able to hyphenate,
406 but we won't be able to because we will look for the hyphen only in
407 font S and not in font R.
409 Perhaps the current input level should be accessible in a number register.
411 Should \w deal with a newline like \X?
413 Have another look at uses of token::delimiter.  Perhaps we need to
414 distinguish the case where we want to see if a token could start a
415 number, from the case where we want to see if it could occur somewhere
416 in a number expression.
418 Provide a facility like copy thru in pic.
420 Fancier implementation of font families which doesn't group fonts into
421 families purely on the basis of their names.
423 In the DESC file make the number of fonts optional if they are all on
424 one line.
426 Number register to give the diversion level.
428 Time various alternative implementations of scale (both in font.c and
429 number.c). On a sparc it's faster to always do it in floating point.
431 Devise a more compact representation for the hyphenation patterns trie.
433 Have a per-environment parameter to increase letter-spacing.
435 Request to set character height.
437 Request to set character slant.
439 Provide some way to upcase or downcase strings.
441 Support non-uniformly scalable fonts. Perhaps associate a suffix with
442 a particular range of sizes.  eg
443   sizesuffix .display 14-512
444 Then is you ask for R at pointsize 16, groff will first look for
445 R.display and then R.  Probably necessary to be able to specify a
446 separate unitwidth for each sizesuffix (eg. for X).
448 Make it possible to suppress hyphenation on a word-by-word basis.
449 (Perhaps store hyphenation flags in tfont.)
451 Possibly allow multiple simultaneous input line traps.
453 Unpaddable, breakable space escape sequence.
455 Support hanging punctuation.
457 In justified text, if the last line of a paragraph is only a little
458 bit short it might be desirable to justify the line.  Allow the user
459 control over this.
461 The pm request could print where the macro was defined.  Also could
462 optionally print the contents of a macro.
464 Provide some way to round numbers to multiples of the current
465 horizontal or vertical resolution.
467 Better string-processing support (search).
469 Generalized ligatures.
471 Request to remove an environment. (Maintain a count of the references
472 to the environment from the environment table, environment dictionary
473 or environment stack.)
475 Perhaps in the nr request a leading `-' should only be recognized as a
476 decrement when it's at the same input level as the request.
478 Don't ever change a charinfo.  Create new variants instead and chain
479 them together.
481 Unix troff appears to read the first character of a request name in
482 copy mode.  Should we do the same?
484 Number register giving name of end macro.
486 More thorough range checking.
488 Provide syntax for octal and hexadecimal numeric constants.  Perhaps
489 o#100 and x#7f as per Scheme.  Or perhaps PostScript 16#7f.  Ambiguity
490 between whether `c' is treated as digit or scaling indicator.
492 Local variables.
494 tmac
495 ====
497 Support multiple line-spacing.
499 If we have footnotes in the abstract in RP format, then the footnote
500 will appear on the cover sheet, which it should, but also on the first
501 page, which it should not.
503 Should we allow multi-page cover-sheets?
505 Warn about automatically numbered footnotes in floating keeps.
507 When we bring back the footnote overflow at the top of page, it would
508 be more efficient to avoid diverting it again. (Need to keep track of
509 footnote height.)
511 Possibly have a place above which the footnote trap must not be
512 placed.
514 Improved indexing, not using tm, controlled by string variable (eg
515 -dIDX=file.idx).
517 When changing from multi-column to narrower columns, we could avoid
518 doing a @super-eject. (This might not be a good idea.)
520 Think about cutmarks.  Possibly implement CM.
522 Implement thesis Mode (TM, CT).
524 Implement more V10 features.
526 Should this
530 .sp \n(.tu
532 print two pages?
534 # s-ts-mode