For several reasons I need to typeset in Plain TeX, however I have always worked with LaTeX. So how hard will this be? I basically need something like the book or report documentclass (with toc, chapters, sections, Theorems, …, appendices, index, bib, …). Most of the things I have learned about LaTeX have come from examples, can somebody direct me to a complete example of a book typeset in Plain TeX?
[Tex/LaTex] Transition from LaTeX to Plain TeX
macrosplain-tex
Best Answer
Plain TeX does not provide the 'pre-built' structural concepts which LaTeX provides, such as TOC, sections and so on. Instead, it provides the basic typesetting mechanisms from which you can build these up. As mentioned in the comments, Knuth's The TeXbook is not only the definitive reference for TeX but also a guide to how to create a book using plain TeX, as the source is available for examination.
It's clear from The TeXbook that Knuth expected authors to create a suitable bundle of support macros for each document they create. He does this for The TeXbook in a file called
manmac.tex
which is then used with the plain format to provide the necessary layout and so on for the book.Some parts of this process are easier than others. LaTeX works hard to make life easy for authors in some places, for example automatically constructing a table of contents from sections using the
.toc
file with a two-pass workflow, or providing the\label
/\ref
system via the.aux
file. Setting these up by hand is non-trivial, and it is notable that Knuth does all of these things by hand in The TeXbook.Depending on the exact requirements, creating a document in plain TeX may require quite a bit of TeX programming experience. The
eplain
set of macros are often recommended to allow plain TeX to use the LaTeX mechanisms for dealing with some driver-dependent work such asgraphics
.