pyexlatex.table.models.texgen package

Submodules

pyexlatex.table.models.texgen.alignment module

class pyexlatex.table.models.texgen.alignment.ColumnAlignment(align_str)[source]

Bases: mixins.repr.ReprMixin, pyexlatex.models.item.ItemBase

Alignment of a single column in a table

__init__(align_str)[source]
property col_length: int
Return type

int

repr_cols: List[str] = ['align']
class pyexlatex.table.models.texgen.alignment.ColumnsAlignment(aligns=None, num_columns=None)[source]

Bases: mixins.repr.ReprMixin, pyexlatex.models.containeritem.ContainerItem

A set of column alignments, usually for the whole table

__init__(aligns=None, num_columns=None)[source]
classmethod from_alignment_str(align_str, num_columns=None)[source]
repr_cols: List[str] = ['aligns']

pyexlatex.table.models.texgen.environments module

class pyexlatex.table.models.texgen.environments.TableEnvironment[source]

Bases: pyexlatex.models.environment.Environment

__init__()[source]
name = 'table'
class pyexlatex.table.models.texgen.environments.TabularEnvironment[source]

Bases: pyexlatex.models.environment.Environment

__init__()[source]
name = 'tabular'
class pyexlatex.table.models.texgen.environments.ThreePartTableEnvironment[source]

Bases: pyexlatex.models.environment.Environment

__init__()[source]
name = 'threeparttable'

pyexlatex.table.models.texgen.items module

class pyexlatex.table.models.texgen.items.LTable(three_part_table, centering=True, landscape=False, position_str=None)[source]

Bases: pyexlatex.table.models.texgen.items.Table

name = 'ltable'
class pyexlatex.table.models.texgen.items.Table(three_part_table, centering=True, landscape=False, position_str=None)[source]

Bases: pyexlatex.models.section.base.TextAreaBase, mixins.repr.ReprMixin

__init__(three_part_table, centering=True, landscape=False, position_str=None)[source]
classmethod from_panel_collection(panel_collection, *args, tabular_kwargs={}, three_part_table_kwargs={}, **kwargs)[source]
classmethod from_table_model(table, *args, **kwargs)[source]
name = 'table'
repr_cols: List[str] = ['caption']
class pyexlatex.table.models.texgen.items.TableDocument(content, packages=None, landscape=False)[source]

Bases: pyexlatex.models.document.Document

__init__(content, packages=None, landscape=False)[source]
Parameters
  • content (Table) –

  • packages (Optional[List[Package]]) –

  • pre_env_contents

  • data_cleanup_func – should accept DocumentSetupData and modify it in place. This is called just before using the data.

  • pre_output_func – function which modifies the latex string before outputting it. The function should accepts a single argument which is a string of the entire latex contents, and it should return a string which will be used as the latex contents for output.

classmethod from_panel_collection(panel_collection, *args, tabular_kwargs={}, three_part_table_kwargs={}, table_kwargs={}, **kwargs)[source]
classmethod from_table_model(table, *args, **kwargs)[source]
class pyexlatex.table.models.texgen.items.TableNotes(contents)[source]

Bases: pyexlatex.models.section.base.TextAreaBase, mixins.repr.ReprMixin

__init__(contents)[source]
name = 'tablenotes'
class pyexlatex.table.models.texgen.items.Tabular(content, align=None)[source]

Bases: pyexlatex.models.containeritem.ContainerItem, pyexlatex.models.item.Item, mixins.repr.ReprMixin, pyexlatex.table.models.texgen.tabularbase.BaseTabular

The main part of a LaTeX table which contains the rows and columns.

__init__(content, align=None)[source]
classmethod from_df(df, align=None, **dt_from_df_kwargs)[source]
classmethod from_panel_collection(panel_collection, align=None, mid_rules=True)[source]
name = 'tabular'
repr_cols: List[str] = ['align']
class pyexlatex.table.models.texgen.items.ThreePartTable(table_content, caption=None, below_text=None, label=None)[source]

Bases: pyexlatex.models.section.base.TextAreaBase, mixins.repr.ReprMixin

__init__(table_content, caption=None, below_text=None, label=None)[source]
classmethod from_panel_collection(panel_collection, *args, tabular_kwargs={}, **kwargs)[source]
name = 'threeparttable'
repr_cols: List[str] = ['caption']

pyexlatex.table.models.texgen.lines module

class pyexlatex.table.models.texgen.lines.BottomRule[source]

Bases: pyexlatex.table.models.texgen.lines.TableLine

A line which can be added at the bottom of a table

class pyexlatex.table.models.texgen.lines.MidRule[source]

Bases: pyexlatex.table.models.texgen.lines.TableLine

A line which can be added in the middle of a table

class pyexlatex.table.models.texgen.lines.TableLine[source]

Bases: pyexlatex.models.mixins.StringAdditionMixin, mixins.repr.ReprMixin

class pyexlatex.table.models.texgen.lines.TableLineOfSegments(segments, num_columns=None)[source]

Bases: pyexlatex.table.models.mixins.addvalues.row.RowAddMixin, pyexlatex.table.models.texgen.lines.TableLine

__init__(segments, num_columns=None)[source]
classmethod from_list_of_ints(int_list, num_columns=None)[source]
property is_spacer
property num_columns
pad(length, direction='right')[source]

Method is here to avoid errors when adding rows together through TableSection.__add__ No padding is actually necessary for these rows as they are not in the tabular format, these lines only specify the columns which need to be underlined.

However when padding left, we just need to shift the values rather than creating padding

repr_cols: List[str] = ['values', 'num_columns']
shift(shift)[source]

Increments col_from and col_to by int for all segments within this line of segments :param _sphinx_paramlinks_pyexlatex.table.models.texgen.lines.TableLineOfSegments.shift.shift: :return:

class pyexlatex.table.models.texgen.lines.TableLineSegment(col_from, col_to=None, align='lr')[source]

Bases: pyexlatex.models.mixins.StringAdditionMixin, mixins.repr.ReprMixin, pyexlatex.table.models.mixins.addvalues.row.RowAddMixin

A table line which does not need to stretch to the full length of the table

__init__(col_from, col_to=None, align='lr')[source]
classmethod from_list_of_ints(int_list)[source]
property is_spacer
repr_cols: List[str] = ['col_from', 'col_to']
shift(shift)[source]

Increments col_from and col_to by int. Used to shift underlines as tables are combined :return:

class pyexlatex.table.models.texgen.lines.TopRule[source]

Bases: pyexlatex.table.models.texgen.lines.TableLine

A line which can be added on the top of a table

pyexlatex.table.models.texgen.newcolumntype module

class pyexlatex.table.models.texgen.newcolumntype.NewColumnType[source]

Bases: str

class pyexlatex.table.models.texgen.newcolumntype.NewColumnTypes[source]

Bases: pyexlatex.models.mixins.StringAdditionMixin

__init__()[source]

pyexlatex.table.models.texgen.packages module

pyexlatex.table.models.texgen.tabularbase module

class pyexlatex.table.models.texgen.tabularbase.BaseTabular[source]

Bases: object

pyexlatex.table.models.texgen.tabularstar module

class pyexlatex.table.models.texgen.tabularstar.TabularStar(content, align=None, width=None, fill_between=True)[source]

Bases: pyexlatex.models.containeritem.ContainerItem, pyexlatex.models.item.Item, mixins.repr.ReprMixin, pyexlatex.table.models.texgen.tabularbase.BaseTabular

tabular* environment, allows for controlling width. Gives additional column alignment X to fill available area

__init__(content, align=None, width=None, fill_between=True)[source]
name = 'tabular*'
repr_cols: List[str] = ['align']