The dom.tex module¶
Elements needed for Latex documents.
Note
This module does not create DOM nodes for all Latex content.
You can build a full Latex document from scratch using the available nodes, but parce supports much more syntax than makes sense to build DOM nodes for.
LilyPond music is always in a lily.Document nodes, and can occur in a braced command or an environment.
-
class
Document(*children, **attrs)[source]¶ Bases:
quickly.dom.base.DocumentA full LaTeX source document.
-
space_between= ''¶
-
-
class
Option(*children, **attrs)[source]¶ Bases:
quickly.dom.element.BlockElementAn option block:
[…].-
head= '['¶
-
tail= ']'¶
-
-
class
Brace(*children, **attrs)[source]¶ Bases:
quickly.dom.element.BlockElementA braced expression:
{…}.-
head= '{'¶
-
tail= '}'¶
-
-
class
Math(*children, **attrs)[source]¶ Bases:
quickly.dom.element.BlockElementAbstract Math block. Subclasses define the start/end delimiters.
-
class
MathInlineParen(*children, **attrs)[source]¶ Bases:
quickly.dom.tex.MathInline math
\(...\).-
head= '\\('¶
-
tail= '\\)'¶
-
-
class
MathInlineDollar(*children, **attrs)[source]¶ Bases:
quickly.dom.tex.MathInline math
$...$.-
head= '$'¶
-
tail= '$'¶
-
-
class
MathDisplayBracket(*children, **attrs)[source]¶ Bases:
quickly.dom.tex.MathDisplay math
\[...\].-
head= '\\['¶
-
tail= '\\]'¶
-
-
class
MathDisplayDollar(*children, **attrs)[source]¶ Bases:
quickly.dom.tex.MathDisplay math
$$...$$(discouraged).-
head= '$$'¶
-
tail= '$$'¶
-
-
class
Command(head, *children, **attrs)[source]¶ Bases:
quickly.dom.base.BackslashCommandA backslash-prefixed command.
The backslash is not in the head value, but added on
write().Arguments may be appended as children.
-
class
Text(head, *children, **attrs)[source]¶ Bases:
quickly.dom.element.TextElementCommon text.
-
class
Environment(*children, **attrs)[source]¶ Bases:
quickly.dom.element.ElementA LaTeX environment.
Starts with a
Command\begin, with zero or moreOptionnodes, then anEnvironmentName; then the contents, and finally an\endCommandwith and again anEnvironmentName().-
space_before= '\n'¶
-
space_after= '\n'¶
-
classmethod
with_name(name, *children, **kwargs)[source]¶ Convenience method to create an
Environment.Zero or more child nodes can be specified, and keyboard arguments are given to the constructor.
-
-
class
EnvironmentName(head, *children, **attrs)[source]¶ Bases:
quickly.dom.element.TextElementThe name of an environment.
The name is in the head value, the braces are added on
write().
-
class
Comment(head, *children, **attrs)[source]¶ Bases:
quickly.dom.base.SinglelineCommentA singleline comment after
%.-
space_after= '\n'¶
-