pyexlatex.layouts package¶
Submodules¶
pyexlatex.layouts.base module¶
- class pyexlatex.layouts.base.LayoutBase(content, **kwargs)[source]¶
Bases:
pyexlatex.models.section.base.TextAreaMixin
,pyexlatex.models.item.ItemBase
- content: Any = None¶
pyexlatex.layouts.grid module¶
- class pyexlatex.layouts.grid.CellLayout(content, grid_shape, **kwargs)[source]¶
Bases:
pyexlatex.layouts.base.LayoutBase
Lay content out in a grid where each cell is arbitrarily sized
- __init__(content, grid_shape, **kwargs)[source]¶
- Args:
content: grid_shape: list of list of tuples of (width, height), e.g. [
[(0.3, 0.4), (0.7, 0.4)], [(0.3, 0.6), (0.7, 0.6)],
] would create a 2x2 grid with 40% of height in the first row, 60% in the second row. 30% width in the first column, 70% width in the second column.
**kwargs:
- class pyexlatex.layouts.grid.GridLayout(content, **kwargs)[source]¶
Bases:
pyexlatex.layouts.grid.CellLayout
Evenly spaced grid layout.
Creates a CellLayout, automatically setting widths and heights as an even split based on the shape of the content passed to make a grid
- __init__(content, **kwargs)[source]¶
- Args:
content: grid_shape: list of list of tuples of (width, height), e.g. [
[(0.3, 0.4), (0.7, 0.4)], [(0.3, 0.6), (0.7, 0.6)],
] would create a 2x2 grid with 40% of height in the first row, 60% in the second row. 30% width in the first column, 70% width in the second column.
**kwargs:
pyexlatex.layouts.multicol module¶
pyexlatex.layouts.spaced module¶
- class pyexlatex.layouts.spaced.HorizontallySpaced(content, pad_ends=False)[source]¶
Bases:
pyexlatex.layouts.spaced.SpacedBase
Inserts horiztonal spacing between items until they fill the content area
- class pyexlatex.layouts.spaced.SpacedBase(content, vertically_space, pad_ends)[source]¶
Bases:
pyexlatex.models.template.Template
Base class for VerticallySpaced and HorizontallySpaced. Handles the logic of adding VFill and HFill between and around items.
- property spacer: Union[pyexlatex.models.format.fills.VFill, pyexlatex.models.format.fills.HFill]¶
- class pyexlatex.layouts.spaced.VerticallySpaced(content, pad_ends=False)[source]¶
Bases:
pyexlatex.layouts.spaced.SpacedBase
Inserts vertical spacing between items until they fill the content area