diff --git a/src/pyladoc/__init__.py b/src/pyladoc/__init__.py index c057caf..76a8e48 100644 --- a/src/pyladoc/__init__.py +++ b/src/pyladoc/__init__.py @@ -709,10 +709,9 @@ class DocumentWriter(): True if the PDF file was successfully created """ content = self.to_latex(font_family, table_renderer, figure_scale) - latex_code = inject_to_template({'CONTENT': content}, + latex_code = inject_to_template({'CONTENT': content} | fields_dict, latex_template_path, - internal_template = 'templates/default_template.tex', - fields_dict = fields_dict) + internal_template='templates/default_template.tex') if font_family == 'sans-serif': latex_code = latex.inject_latex_command(latex_code, '\\renewcommand{\\familydefault}{\\sfdefault}') diff --git a/tests/test_template_functions.py b/tests/test_template_functions.py index 9f513b9..220453f 100644 --- a/tests/test_template_functions.py +++ b/tests/test_template_functions.py @@ -28,6 +28,7 @@ def test_inject_to_template_html(): assert "" in result # Keep unrelated HTML comments assert "