Skip to content
Snippets Groups Projects
Commit 948d6d53 authored by Thomas Kluyver's avatar Thomas Kluyver Committed by Karim Ahmed
Browse files

Use xelatex instead of pdflatex for generating PDF reports

parent 144e95bb
No related branches found
No related tags found
1 merge request!984Try updating to Python 3.11 & update all deps
...@@ -249,15 +249,16 @@ def make_report(run_path: Path, cal_work_dir: Path, project: str, ...@@ -249,15 +249,16 @@ def make_report(run_path: Path, cal_work_dir: Path, project: str,
mf.write("latex_logo = '{}/{}'\n".format(module_path, mf.write("latex_logo = '{}/{}'\n".format(module_path,
logo_path)) logo_path))
mf.write("latex_additional_files = ['titlepage.tex.txt']\n") mf.write("latex_additional_files = ['titlepage.tex.txt']\n")
mf.write("latex_engine = 'xelatex'\n")
# Set name of the .tex file & thus also the .pdf output # Set name of the .tex file & thus also the .pdf output
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_documents # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_documents
latex_doc = ('index', f'{report_name}.tex', tex_escape(project), latex_doc = ('index', f'{report_name}.tex', tex_escape(project),
tex_escape(author), 'manual', False) tex_escape(author), 'manual', False)
mf.write(f"latex_documents = [{latex_doc!r}]\n") mf.write(f"latex_documents = [{latex_doc!r}]\n\n")
for var in l_var: for var in l_var:
if var in ['latex_elements', 'latex_logo', if var in ['latex_elements', 'latex_logo', 'latex_engine'
'latex_additional_files', 'latex_documents']: 'latex_additional_files', 'latex_documents']:
continue continue
mf.write(f'{var} = {getattr(conf, var, None)!r}\n') mf.write(f'{var} = {getattr(conf, var, None)!r}\n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment