Next: Sectioning
Prev: notation-tut
Up: notation-tut
Top: Top
0.2.1. A micro-tutorial on our LaTeX-like conventions
LaTeX is a document preparation system (described in a book of
almost that name, by Leslie Lamport), and its notation is the basis of
that used in this literate programming system.
Unsurprisingly, one thing you can do with your literate programs is
turn them into real LaTeX documents (for typesetting), using the
program `lit2latex'.
A few things to know about our literate-programming markup notation:
- • Backslash (`\') is the starts-a-command character. Therefore,
`\item' and `\/' are commands, but `dog' and `(+)' are
just plain text.
- • Mandatory arguments to a command are given inside curly braces. So,
we would use `\foo{bar}' to pass one argument to the command
`\foo'; we would use `\bar{hey1}{hey2}' to pass two arguments to
the command `\bar'.
- • Optional arguments to a command are given in square brackets and
come before mandatory arguments. So, for example,
`\help[everyone]{lunch}' passes one optional and one mandatory
argument to the command `\help'.
- • `\foo' is a command called "foo", while `\begin{foo}'
<text in-between> `\end{foo}' is an environment called
"foo" with <text in-between> being inside that environment.
- • The above isn't everything you need to know.