pylatex.position¶
This module implements the classes that deal with positioning.
Positions various elements on the page.
-
class
HorizontalSpace(size, *, star=True)[source]¶ Bases:
pylatex.base_classes.command.CommandBaseAdd/remove the amount of horizontal space between elements.
Parameters:
-
class
VerticalSpace(size, *, star=True)[source]¶ Bases:
pylatex.position.HorizontalSpaceAdd the user specified amount of vertical space to the document.
Parameters:
-
class
Center(*, options=None, arguments=None, start_arguments=None, **kwargs)[source]¶ Bases:
pylatex.base_classes.containers.EnvironmentCentered environment.
Parameters: -
omit_if_empty= False¶
-
-
class
FlushLeft(*, options=None, arguments=None, start_arguments=None, **kwargs)[source]¶ Bases:
pylatex.position.CenterLeft-aligned environment.
Parameters: -
omit_if_empty= False¶
-
-
class
FlushRight(*, options=None, arguments=None, start_arguments=None, **kwargs)[source]¶ Bases:
pylatex.position.CenterRight-aligned environment.
Parameters: -
omit_if_empty= False¶
-
-
class
MiniPage(*, width=NoEscape(textwidth), pos=None, height=None, content_pos=None, align=None, fontsize=None, data=None)[source]¶ Bases:
pylatex.base_classes.containers.EnvironmentA class that allows the creation of minipages within document pages.
Parameters: - width (str) – width of the minipage
- pos (str) – The vertical alignment of the minipage relative to the baseline (center(c), top(t), bottom(b))
- height (str) – height of the minipage
- content_pos (str) – The position of the content inside the minipage (center(c), bottom(b), top(t), spread(s))
- align (str) – alignment of the minibox
- fontsize (str) – The font size of the minipage
- data (str or
LatexObject) – The data to place inside the MiniPage element
-
omit_if_empty= False¶
-
class
TextBlock(width, horizontal_pos, vertical_pos, *, indent=False, data=None)[source]¶ Bases:
pylatex.base_classes.containers.EnvironmentA class that represents a textblock environment.
Make sure to set lengths of TPHorizModule and TPVertModule
Parameters: - width (float) – Width of the text block in the units specified by TPHorizModule
- horizontal_pos (float) – Horizontal position in units specified by the TPHorizModule
- indent (bool) – Determines whether the text block has an indent before it
- vertical_pos (float) – Vertical position in units specified by the TPVertModule
- data (str or
LatexObject) – The data to place inside the TextBlock element
-
omit_if_empty= False¶