plasTeX 3.0 — A Python Framework for Processing LaTeX Documents

6.3.3 DocumentFragment Objects

class DocumentFragment()

A collection of nodes that make up only part of a document. This is mainly used to hold the content of a LaTeX macro argument.