pyexlatex package¶
Create LaTeX documents using only Python. Rather than building a direct Python API to LaTeX, this package has its own, simpler API to creating documents. It is focused on creating professional-looking documents with little styling effort. It currently supports documents, presentations, graphics, letters, and resumes.
Subpackages¶
- pyexlatex.constants package
- pyexlatex.figure package
- pyexlatex.graphics package
- Subpackages
- Submodules
- pyexlatex.graphics.arrow module
- pyexlatex.graphics.modified_picture module
- pyexlatex.graphics.rectangle module
- pyexlatex.graphics.shape module
- pyexlatex.layouts package
- pyexlatex.letter package
- pyexlatex.logic package
- Subpackages
- pyexlatex.logic.extract package
- pyexlatex.logic.format package
- pyexlatex.logic.output package
- Subpackages
- pyexlatex.logic.output.api package
- Subpackages
- Submodules
- pyexlatex.logic.output.api.formats module
- pyexlatex.logic.output.api.main module
- pyexlatex.logic.output.errors package
- pyexlatex.logic.output.api package
- Submodules
- pyexlatex.logic.output.fileops module
- pyexlatex.logic.output.main module
- pyexlatex.logic.output.sources module
- pyexlatex.logic.output.to_file module
- Subpackages
- Submodules
- pyexlatex.logic.builder module
- pyexlatex.logic.tools module
- pyexlatex.logic.type_check module
- Subpackages
- pyexlatex.models package
- Subpackages
- pyexlatex.models.boxes package
- pyexlatex.models.commands package
- pyexlatex.models.control package
- Subpackages
- pyexlatex.models.control.documentclass package
- Subpackages
- Submodules
- pyexlatex.models.control.documentclass.documentclass module
- pyexlatex.models.control.documentclass package
- Submodules
- pyexlatex.models.control.and_ module
- pyexlatex.models.control.extrafloats module
- pyexlatex.models.control.filecontents module
- pyexlatex.models.control.group module
- pyexlatex.models.control.maxdeadcycles module
- pyexlatex.models.control.mode module
- pyexlatex.models.control.newcounter module
- pyexlatex.models.control.newpage module
- pyexlatex.models.control.setcounter module
- pyexlatex.models.control.setlength module
- pyexlatex.models.control.value module
- Subpackages
- pyexlatex.models.credits package
- pyexlatex.models.format package
- Subpackages
- pyexlatex.models.format.code package
- pyexlatex.models.format.paragraph package
- pyexlatex.models.format.text package
- Subpackages
- Submodules
- pyexlatex.models.format.text.bold module
- pyexlatex.models.format.text.italics module
- pyexlatex.models.format.text.linespacing module
- pyexlatex.models.format.text.monospace module
- pyexlatex.models.format.text.nohyphens module
- pyexlatex.models.format.text.smallcaps module
- pyexlatex.models.format.text.text module
- pyexlatex.models.format.text.underline module
- Submodules
- pyexlatex.models.format.adjustbox module
- pyexlatex.models.format.breaks module
- pyexlatex.models.format.captionsetup module
- pyexlatex.models.format.centering module
- pyexlatex.models.format.fills module
- pyexlatex.models.format.hangindent module
- pyexlatex.models.format.hline module
- pyexlatex.models.format.hspace module
- pyexlatex.models.format.join module
- pyexlatex.models.format.noindent module
- pyexlatex.models.format.nolinebreak module
- pyexlatex.models.format.nopagebreak module
- pyexlatex.models.format.paragraphindent module
- pyexlatex.models.format.raw module
- pyexlatex.models.format.rule module
- pyexlatex.models.format.sectionnum module
- pyexlatex.models.format.vspace module
- Subpackages
- pyexlatex.models.lists package
- pyexlatex.models.page package
- pyexlatex.models.references package
- Subpackages
- pyexlatex.models.references.bibtex package
- Subpackages
- Submodules
- pyexlatex.models.references.bibtex.addresource module
- pyexlatex.models.references.bibtex.article module
- pyexlatex.models.references.bibtex.base module
- pyexlatex.models.references.bibtex.generic module
- pyexlatex.models.references.bibtex.manual module
- pyexlatex.models.references.bibtex.misc module
- pyexlatex.models.references.bibtex.printbib module
- pyexlatex.models.references.bibtex package
- Submodules
- pyexlatex.models.references.bibliography module
- pyexlatex.models.references.citations module
- Subpackages
- pyexlatex.models.section package
- pyexlatex.models.sizes package
- pyexlatex.models.title package
- Submodules
- pyexlatex.models.blindtext module
- pyexlatex.models.caption module
- pyexlatex.models.containeritem module
- pyexlatex.models.datastore module
- pyexlatex.models.date module
- pyexlatex.models.document module
- pyexlatex.models.documentitem module
- pyexlatex.models.documentsetup module
- pyexlatex.models.environment module
- pyexlatex.models.environmenttemplate module
- pyexlatex.models.equation module
- pyexlatex.models.footnote module
- pyexlatex.models.hyperlinks module
- pyexlatex.models.item module
- pyexlatex.models.jinja module
- pyexlatex.models.label module
- pyexlatex.models.landscape module
- pyexlatex.models.latex module
- pyexlatex.models.mixins module
- pyexlatex.models.model module
- pyexlatex.models.package module
- pyexlatex.models.ref module
- pyexlatex.models.standalone module
- pyexlatex.models.template module
- pyexlatex.models.toc module
- Subpackages
- pyexlatex.presentation package
- Subpackages
- pyexlatex.presentation.beamer package
- Subpackages
- pyexlatex.presentation.beamer.columns package
- pyexlatex.presentation.beamer.control package
- pyexlatex.presentation.beamer.frame package
- pyexlatex.presentation.beamer.overlay package
- Subpackages
- Submodules
- pyexlatex.presentation.beamer.overlay.next module
- pyexlatex.presentation.beamer.overlay.offset module
- pyexlatex.presentation.beamer.overlay.overlay module
- pyexlatex.presentation.beamer.overlay.overlay_param module
- pyexlatex.presentation.beamer.overlay.range module
- pyexlatex.presentation.beamer.overlay.until_end module
- pyexlatex.presentation.beamer.templates package
- pyexlatex.presentation.beamer.theme package
- Submodules
- pyexlatex.presentation.beamer.block module
- pyexlatex.presentation.beamer.colorbox module
- Subpackages
- pyexlatex.presentation.beamer package
- Submodules
- pyexlatex.presentation.presentation module
- Subpackages
- pyexlatex.resume package
- pyexlatex.table package
- Subpackages
- pyexlatex.table.logic package
- pyexlatex.table.models package
- Subpackages
- pyexlatex.table.models.data package
- pyexlatex.table.models.labels package
- pyexlatex.table.models.mixins package
- pyexlatex.table.models.panels package
- pyexlatex.table.models.spacing package
- pyexlatex.table.models.table package
- pyexlatex.table.models.texgen package
- Submodules
- pyexlatex.table.models.texgen.alignment module
- pyexlatex.table.models.texgen.environments module
- pyexlatex.table.models.texgen.items module
- pyexlatex.table.models.texgen.lines module
- pyexlatex.table.models.texgen.newcolumntype module
- pyexlatex.table.models.texgen.packages module
- pyexlatex.table.models.texgen.tabularbase module
- pyexlatex.table.models.texgen.tabularstar module
- Submodules
- pyexlatex.table.models.interfaces module
- Subpackages
- Subpackages
- pyexlatex.texgen package
- pyexlatex.texparser package
- pyexlatex.tools package
Submodules¶
pyexlatex.df module¶
- pyexlatex.df.df_to_pdf_and_move(dflist, outfolder, outname='table', tabular_string='', string_format='', above_text='', below_text='', font_size=12, caption='', missing_rep=' - ', landscape=False, panel_names=None, colname_flags=None, as_document=True, outmethod='pandas')[source]¶
Takes a dataframe or list of dataframes as input and outputs to a LaTeX formatted table with multiple panels, creates a PDF, and moves the LaTeX file and PDF to a dated folder.
- Required options:
dflist: Dataframe or list of dataframes. outfolder: Output folder for LaTeX file and PDF. Inside of this folder, a folder called Tables will be created,
inside of which the two files will be put inside another folder with the date.
- Optional options:
outname: Name of output table, default is table tabular_string: Can take any string that would normally used in tabular (i.e. rrr for three columns right aligned
as well as L{<width>), C{<width>}, and R{<width>} (i.e. L{3cm}) for left, center, and right aligned fixed width. Additionally . aligns on the decimal. Default is first column left aligned, rest center aligned.
- string_format: String or list of format of numbers in the table. Please see Python number formats. Pass a blank
string to leave formatting untouched (the default).
above_text: String of text to display above table below_text: String of text to display below table font_size: Font size, default 12 caption: Title of table missing_rep: Representation for missing numbers, default ” - ” landscape: Boolean. True to switch table to landscape output instead of portrait. panel_names: Python list of names of each panel, to go below column names, e.g. [‘Table’,’Other Table’] colname_flags: Python list of yes or no flags for whether to display column names for each panel. Default is to
display column names only for the first panel, as usually the panels have the same columns. The default input for a three panel table would be [‘y’,’n’,’n’]
- as_document: Boolean. True to output latex wrappers for table to be a standalone document. False to write
only table wrappers so that table can be included in another document
- outmethod: String, ‘pandas’ or ‘csv’. If ‘pandas’, uses pandas’ built in df.to_latex() to build latex. If
‘csv’, uses df.to_csv() and then pyexlatex.df.raw_csv_to_latex(). The latter case is useful when the table itself contains latex expressions.