pyexlatex.tools package¶
- pyexlatex.tools.csv_to_raw_latex(infile, csvstring=False, missing_rep=' - ', formatstr='{:.3f}', skipfix=None)[source]¶
Takes a CSV text file and converts it to a LaTeX formatted list, with each line of the LaTeX file as an item in the list.
- Required options:
infile: Full file path of CSV (include r before quotes)
- Optional options:
csvstring: True to pass a CSV string to infile rather than load from file missing_rep: Representation for missing numbers, default ” - ” formatstr: Python string for number formatting, for example ‘{:.3f}’ with quotes skipfix: String or list of strings of fixes to skip, options are [’&’,’%’,’_’]
- pyexlatex.tools.date_time_move_latex(tablename, filepath, folder_name='Tables')[source]¶
Takes a LaTeX tex and PDF after the PDF’s been created by pdflatex and moves it into a table folder with the date, checking if the table was just previously created. If it’s the same as before, it just deletes the file.
- Required arguments:
tablename: operating system name of the table, without extensions filepath: full filepath of table, without table name. put r before quotes as follows: r’C:UsersFolder’
- pyexlatex.tools.replace_missing_csv(csv_list, missing_rep)[source]¶
Replaces missing items in a CSV with a given missing representation string.