Pylatex subclasses

One very usefull way to interact with LaTeX using Python is the package PyLaTeX . DMT has already some of the necessary subclasses to make report writing easy implemented and ready to use:

DMT specific PyLaTeX classes and routines used for automatic documentations

class DMT.external.pylatex.CommandInput(arguments=None, options=None, *, extra_arguments=None)[source]

Bases: CommandBase

This command can be used to input matplotlib2tikz .tex files.

packages = OrderedSet([Package(Arguments('siunitx'), Options()), Package(Arguments('tikz'), Options()), Package(Arguments('fontspec'), Options()), Package(Arguments('pgfplots'), Options()), Package(Arguments('inputenc'), Options('utf8'))])[source]
class DMT.external.pylatex.CommandInputTikz(arguments=None, options=None, *, extra_arguments=None)[source]

Bases: CommandBase

This command can be used to input .tikz files.

packages = OrderedSet([Package(Arguments('siunitx'), Options()), Package(Arguments('tikz'), Options()), Package(Arguments('fontspec'), Options()), Package(Arguments('pgfplots'), Options()), Package(Arguments('inputenc'), Options('utf8'))])[source]
class DMT.external.pylatex.CommandLabel(arguments=None, options=None, *, extra_arguments=None)[source]

Bases: CommandBase

This command can be used to input matplotlib2tikz .tex files.

packages = OrderedSet()[source]
class DMT.external.pylatex.CommandRef(arguments=None, options=None, *, extra_arguments=None)[source]

Bases: CommandBase

This command can be used to reference multiple things like figures.

packages = OrderedSet([Package(Arguments('hyperref'), Options()), Package(Arguments('cleveref'), Options())])[source]
class DMT.external.pylatex.CommandRefRange(arguments=None, options=None, *, extra_arguments=None)[source]

Bases: CommandBase

This command can be used to reference multiple things like figures.

packages = OrderedSet([Package(Arguments('hyperref'), Options()), Package(Arguments('cleveref'), Options())])[source]
class DMT.external.pylatex.Listing(content=None, file_path=None, language='TRADICA', caption=None, label=None, **kwargs)[source]

Bases: Container

dumps()[source]

Represent the class as a string in LaTeX syntax.

This method should be implemented by any class that subclasses this class.

marker_prefix = 'listing'[source]

Default prefix to use with Marker

packages = OrderedSet()[source]
class DMT.external.pylatex.SubFile(numbering=None, label=False, master=None, **kwargs)[source]

Bases: Section

This class implements a container to create SubFiles (thats a Latex package)

dumps()[source]

Represent the section as a string in LaTeX syntax.

Returns:
str
generate_pdf(full_path_to_file, compiler=None)[source]
packages = OrderedSet()[source]
class DMT.external.pylatex.Tex(numbering=None, label=False, **kwargs)[source]

Bases: Section

This is basically a Tex container as defined in Pylatex that can do nothing but contain Tex stuff.

dumps()[source]

Represent the section as a string in LaTeX syntax.

Returns:
str
packages = OrderedSet()[source]