Next: Info_etc Prev: Caveats Up: Top Top: Top

0.7. Programs to process literate documents

In this incarnation, the programs `lit2pgm', `lit2latex', and `lit2texi' (to extract program, LaTeX, or GNU Texinfo fodder) are just three ways of invoking one killer `perl' script, `lit2stuff'.

[Actually, this same script may be invoked as `mkdependlit', to build a set of `make' dependencies for a literate document, as `lit2text', to extract just the non-code text (perhaps for spell-checking), or as `lit2changelog', which is the (mainly unimplemented) interface to the changelog-slurping code. I ignore these details herein.]

APRIL91: there are starting to be enough options that getopt-style one-letter names aren't enough/too obtuse. Some revision may be in order there... See section See revised-pgm-options.

For all three programs, their invocation takes the form `lit2<whatever> [options] [input-file]'. Usually, output is to a file determined from the input-file's suffix (e.g., a `.hs' file from a `.lhs' file); if no input file is provided or life becomes confused, output is to the standard output. You can control input and output explicitly with the `-i' and `-o' options.

Known file suffixes and what they mean:

The suffixes `.itex' and `.itxi' indicate the intermediate files from "separate compilation" (to LaTeX and Texinfo, respectively) of parts of a larger document.

In ordinary life, given a literate C program `foo' in file `foo.lc', one would hope that the following simple invocations would suffice:

What follows are the options to control these programs (and to complicate your life [and mine, too]). Not all command-line options make sense for all three programs; they are so noted. Options may be glopped together in the best getopt(3) style.

Menu

A_option
-A <pgm-name> option.
c_option
-c option.
d_option
-d option.
capital_D_option
-D option.
f_option
-f <nodename-suffix> option.
g_option
-g <node-name> option.
H_option
-H <dir1>:<dir2> option.
i_option
-i <input-file> option.
capital_I_option
-I <directories> option.
capital_L_option
-L option.
l_option
-l <language> option.
n_option
-n option.
capital_N_option
-N <info-filename> option.
o_option
-o <output-file> option.
capital_O_option
-O option.
p_option
-p <pagebreak-hints> option.
q_option
-q option.
r_option
-r <ribbons-to-get> option.
s_option
-s <stop-list-file> option.
capital_S_option
-S option.
t_option
-t <typesetting-hints> option.
v_option
-v option.
x_option
-x <xref-hints> option.