pylatex.basic

This module implements several classes that represent basic latex commands.

class NewPage[source]

Bases: pylatex.base_classes.command.CommandBase

A command that adds a new page to the document.

class LineBreak[source]

Bases: pylatex.basic.NewPage

A command that adds a line break to the document.

class NewLine[source]

Bases: pylatex.basic.NewPage

A command that adds a new line to the document.

class HFill[source]

Bases: pylatex.basic.NewPage

A command that fills the current line in the document.

class HugeText(data=None)[source]

Bases: pylatex.base_classes.containers.Environment

An environment which makes the text size ‘Huge’.

Parameters:data (str or LatexObject) – The string or LatexObject to be formatted.
omit_if_empty = False
class LargeText(data=None)[source]

Bases: pylatex.basic.HugeText

An environment which makes the text size ‘Large’.

Parameters:data (str or LatexObject) – The string or LatexObject to be formatted.
omit_if_empty = False
class MediumText(data=None)[source]

Bases: pylatex.basic.HugeText

An environment which makes the text size ‘large’.

Parameters:data (str or LatexObject) – The string or LatexObject to be formatted.
omit_if_empty = False
class SmallText(data=None)[source]

Bases: pylatex.basic.HugeText

An environment which makes the text size ‘small’.

Parameters:data (str or LatexObject) – The string or LatexObject to be formatted.
omit_if_empty = False
class FootnoteText(data=None)[source]

Bases: pylatex.basic.HugeText

An environment which makes the text size ‘footnotesize’.

Parameters:data (str or LatexObject) – The string or LatexObject to be formatted.
omit_if_empty = False
class TextColor(color, data)[source]

Bases: pylatex.base_classes.containers.ContainerCommand

An environment which changes the text color of the data.

Parameters:
  • color (str) – The color to set for the data inside of the environment.
  • data (str or LatexObject) – The string or LatexObject to be formatted.
omit_if_empty = False