pygacity.generate.latexcompiler module

LaTeX compilation functions for pygacity

class pygacity.generate.latexcompiler.LatexCompiler(build_specs: dict, searchdirs: list = [])[source]

Bases: object

LaTeX compiler class for building documents.

specs

build specifications

Type:

dict

latexmk

path to latexmk executable

Type:

str

pythontex

path to pythontex executable

Type:

str

searchdirs

list of directories to search for included files (each prefixed with -include-directory=)

Type:

list of str

output_dir

output directory for compiled files (prefixed with -output-directory=)

Type:

str

cache_dir

cache directory for temporary files

Type:

str

job_name

base job name for output files (prefixed with -jobname=)

Type:

str

working_job_name

current working job name for output files

Type:

str

FC

file collector for tracking generated files

Type:

FileCollector

build_commands(document: Document = None)[source]

Builds the list of commands needed to compile the document.

Parameters:

document (Document, optional) – the Document instance to compile (default is None)

Returns:

list of Command instances to run for compilation

Return type:

list of Command

build_document(document: Document = None, cleanup: bool = False)[source]

Builds the specified document by running the necessary commands.

Parameters:
  • document (Document, optional) – the Document instance to compile (default is None)

  • cleanup (bool, optional) – if True, deletes intermediate files after build (default is False)