pythontikz.base_classes.command¶
This module implements a class that implements a latex command.
This can be used directly or it can be inherited to make an easier interface to it.
-
class
pythontikz.base_classes.command.Parameters(*args, **kwargs)[source]¶ Bases:
pylatex.base_classes.command.ParametersThe base class used by
OptionsandArguments.This class should probably never be used on its own and inhereting from it is only useful if a class like
OptionsorArgumentsis needed again.Parameters: - *args – Positional parameters
- **kwargs – Keyword parameters
-
class
pythontikz.base_classes.command.Options(*args, **kwargs)[source]¶ Bases:
pylatex.base_classes.command.Options,pythontikz.base_classes.command.ParametersShallow Wrapper class to enable inheritance from overridden parameters class, with otherwise same behaviour as
pylatex.base_classes.command.OptionsA class implementing LaTex options for a command.It supports normal positional parameters, as well as key-value pairs. Options are the part of a command located between the square brackets (
[]). The positional parameters will be outputted in order and will appear before the key-value-pairs. The key value-pairs won’t be outputted in the order in which they were enteredExamples
>>> args = Options('a', 'b', 'c').dumps() '[a,b,c]' >>> Options('clip', width=50, height='25em', trim='1 2 3 4').dumps() '[clip,trim=1 2 3 4,width=50,height=25em]'
Parameters: - *args – Positional parameters
- **kwargs – Keyword parameters
-
class
pythontikz.base_classes.command.SpecialOptions(*args, **kwargs)[source]¶ Bases:
pylatex.base_classes.command.SpecialOptions,pythontikz.base_classes.command.ParametersA class that sepparates the options with ‘][‘ instead of ‘,’.
Parameters: - *args – Positional parameters
- **kwargs – Keyword parameters
-
class
pythontikz.base_classes.command.Arguments(*args, **kwargs)[source]¶ Bases:
pylatex.base_classes.command.Arguments,pythontikz.base_classes.command.ParametersA class implementing LaTex arguments for a command.
It supports normal positional parameters, as well as key-value pairs. Arguments are the part of a command located between the curly braces (
{}). The positional parameters will be outputted in order and will appear before the key-value-pairs. The key value-pairs won’t be outputted in the order in which they were enteredExamples
>>> args = Arguments('a', 'b', 'c').dumps() '{a}{b}{c}' >>> args = Arguments('clip', width=50, height='25em').dumps() >>> args.dumps() '{clip}{width=50}{height=25em}'
Parameters: - *args – Positional parameters
- **kwargs – Keyword parameters