Latex functions
As a big goal of DMT is pretty printing of reports and publications LaTeX can be directly used from DMT.core.plot and also for reports written using PyLaTeX.
The functions to directly interact with LaTeX are:
DMT supplied build latex command
- DMT.external.latex.build_png(full_path_to_file, wait=True)[source]
Builds a tex file to png graphic.
- Parameters:
- full_path_to_file
str
oros.Pathlike
- full_path_to_file
- DMT.external.latex.build_svg(full_path_to_file, wait=True)[source]
Builds a tex file to scalable vector graphic.
- Parameters:
- full_path_to_file
str
oros.Pathlike
- full_path_to_file
- DMT.external.latex.build_tex(full_path_to_file, additional_compiler=None, wait=False, extension=None)[source]
Builds a tex file
- Parameters:
- full_path_to_file
str
oros.Pathlike
- additional_compiler: (str , [str])
If a additional tex compiler should be used, supply it here. It will be tried as first compiler. The additional compiler must be given in this argument with (<call_of_compiler>, List of compiler arguments). For example ‘latexmk’ looks like: (‘latexmk’, [’–interaction=nonstopmode’, ‘–shell-escape’, ‘–pdf’])
- wait
Boolean
,False
Wait for the build to complete.
- extension
None
,optional
If None, assumed extension of Tex file to build is “tex”, else the given string is used. Example: extension=”tikz”
- full_path_to_file
- DMT.external.latex.clean_tex_files(directory, file_name, keep=('.tex', '.pdf'), regex=False)[source]
Deletes all intermediate files in the directory with name file_name except the tex and pdf.