Adapt src/pre-html (src/preproc/html)
[s-roff.git] / TODO
blob6fe1471082253e1aec68e239ccd48761671cbb89
2 - Get rid of all the short options which choose preprocessors, instead
3   use a multiplexer
5 -- Offer a builtin mode which guesses required preprocessors, maybe add
6    configuration file option which can be used to specify global
7    / per-user additions by means of COMMAND-PAIR=PREPROC-PATH.
8    Of course also add to the command-line multiplexer option this
9    possibility..
11    This "auto" preprocessor should then reconsider it's guesses on
12    a per-file base!?
14    I really would like to get rid of the necessity to parse all files
15    with all defined preprocessors completely.  Instead we should, once
16    we see the starting command, hand over to a known builtin
17    preprocessor and parse only that much until we see the end command.
18    So convert all builtin preprocessors to libraries and offer jumpin
19    points for that purpose only, let the standalone versions be simple
20    wrappers.  S-roff can use dlopen(3) if available, otherwise don't
21    offer this optimization but continue to use the full-parse as usual,
22    that must be supported anyway for non-builtin preprocessors.
23    (XXX For [s-]troff we may not do so until the user has chosen the
24    preprocessor on the command line, since..)
26 -- Introduce a new command that can be used to select the preprocessors
27    explicitly, e.g., ".preprocessors tbl,eqn" etc.
28    If so, how to deal with included files?  Offer "-" mode which turns
29    off preprocessors for a specific file?
31    I think the best would be some kind of "shebang", for compatibilities
32    sake it must be comment-based, as in '.\"!troff eqn tbl enc=latin1'?
33    For example, newer man(1)s read the first line of the manual and
34    check for a syntax <^'\" >followed by concat of [egprtv]+ (and in
35    fact  *join in* $MANROFFSEQ environment [egprtv]+)
36                 while getopts 'egprtv' preproc_arg; do
37                         case "${preproc_arg}" in
38                         e)      pipeline="$pipeline | $EQN" ;;
39                         g)      GRAP  ;; # Ignore for compatibility.
40                         p)      pipeline="$pipeline | $PIC" ;;
41                         r)      pipeline="$pipeline | $REFER" ;;
42                         t)      pipeline="$pipeline | $TBL" ;;
43                         v)      pipeline="$pipeline | $VGRIND" ;;
44                         *)      usage ;;
45                         esac
47    This is good, but pretty much crypto and nothing for normal users.
48    But extending this, why not check for <'\" preprocess: tbl eqn"> etc.?
49    And as above.
50    And this is also documented in groff_tmac.man.  But do not bet on
51    this.
53 - Be sensible in respect to locale environment a.k.a. -Tlocale and offer
54   per-file input encodings, chooseable via a new command.
55   If so, how to deal with included files?  Offer "-" mode which turns
56   off character set conversion for a specific file?
57   Anyway, extend file_case to allow "stacking in" a character
58   conversion.
60 -- Get rid of preconv(1) again, this will simply be a layer of
61    file_case.  Yet still allow to specify some encoding on the command
62    line.
64 - What about extending searchpath:: (and file_case) so that an archive
65   could be opened as such, think .dmg, .JAR or tar (pax) and/or even
66   better SQLite3?
68 = Unicode input:
69   Making groff 21bit input-clean.
70 -> Use S-CText and make the entire toolchain UTF-8 -based and -clean.
71   This could be implemented through file_case, too, and when it finally
72   is possible usage of the \[uXX] escapes could be cut down drastically.
74 -- This also includes hyphenation etc.
76 - Directly support TTF/OTF fonts.
78 - Offer more typographic control a.k.a paragraph-wise formatting, but in
79   a way that remains compatibility with trap handling.  Is this
80   possible (maybe a stripped down try-and-error forward path bouquet
81   algorithm as suggested by Doug McIlroy is feasible?).
83 = Make -Tlj4 work with -X
85 = Guess man5ext and man7ext variables
87 = Provide man.sun implementing .TX
89 = Provide a `check' target
91 = Implement tmac.bib in terms of tmac.s
93 = Catch the following error in -me:
94   .(z
95   .(l C
96   .)z
98 = Arrows for next/previous page from R5 xditview
100 # s-ts-mode