The lang.latex module¶
LaTeX language and transformation definition.
-
class
Latex[source]¶ Bases:
parce.lang.tex.LatexLatex language definition.
-
classmethod
get_environment_target(name)[source]¶ Return environment target for environment
name.Can be overridden to support special environments.
-
option= Latex.option¶
-
test_lilypond_option= Latex.test_lilypond_option¶
-
classmethod
-
class
LatexTransform[source]¶ Bases:
quickly.dom.base.TransformTransform Latex quickly.dom.
-
option(items)[source]¶ Process the
optioncontext.Returns a two-tuple(options, head_origin).
The options is a list of objects that are finished Option nodes, only the first might be incomplete because of a missing opening token. In that case the first object is a tuple (contents, tail_origin). (The tail_origin might be empty in the case of an imcomplete source text).
The head_origin is normally empty, only for the
\lilypond[opts]{command, it is the brace that starts the braced expression.
-
environment_option(items)[source]¶ Process the
environment_optioncontext.Returns a tuple(option, envname), where option is a list like the first value returned by
option()and envname anEnvironmentNamenode it it was there at the end of the options list, otherwise None.
-
environment(items)[source]¶ Process the
environmentcontext.Returns a list of nodes, the last is the
\endcommand.
-
test_lilypond_option= None¶
-
-
class
LatexAdHocTransform[source]¶ Bases:
quickly.dom.base.AdHocTransform,quickly.lang.latex.LatexTransformLatexTransform that does not keep the origin tokens.