darcs

Safe HaskellSafe-Infered

Preproc

Description

This program mangles a pseudo-LaTeX document into actual LaTeX. There are three key changes to the input:

  • \input{foo} is replaced by the contents of the file foo (after it, too, is mangled). Note that this is relative to the working directory, *not* relative to the file being parsed.
  • Anything between \begin{code} and \end{code} is deleted. Note that this is quite unlike normal literate documentation (for which we use Haddock, not LaTeX).
  • Some nonstandard pseudo-LaTeX commands are expanded into actual LaTeX text. In particular, \darcsCommand{foo} is replaced by LaTeX markup describing the command foo.

Synopsis

Documentation

preprocMain :: [String] -> IO ()

The entry point for this program. The path to the TeX master file is supplied as the first argument. Bootstrapping into preproc then happens by passing it a pseudo-document that contains a single input (include) line.