plasTeX 3.0 — A Python Framework for Processing LaTeX Documents

6.3.10 TeXDocument Objects

class TeXDocument()

A complete LaTeX document.

charsubs

a list of two element tuples containing character substitutions for all text nodes in a document. This is used to convert character strings like “---” into “—”. The first element in each tuple in the string to replace, the second element is the character or sequence to replace the original string with.

preamble

returns the LaTeX source representation of the document preamble (i.e. everything before the \begin{document})

source

the LaTeX source representation of the document