From 69e5e9ee534f980762f073f6a7d6c611b6877b4c Mon Sep 17 00:00:00 2001 From: Bertrand Thierry Date: Tue, 10 Dec 2024 22:27:30 -0600 Subject: [PATCH] Doc: add mathtools to imglatex. Use latex_additional_files instead of loop --- src/conf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/conf.py b/src/conf.py index ee7fbe31a72..af920f8965f 100644 --- a/src/conf.py +++ b/src/conf.py @@ -264,6 +264,7 @@ # Additional stuff for the LaTeX preamble. latex_elements['preamble'] = '\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage[retainorgcmds]{IEEEtrantools}\n\\usepackage{mathtools}\n' +latex_additional_files = ['docs/sphinx/latex_macros.sty'] bibtex_bibfiles = ['docs/sphinx/biblio_wave.bib'] @@ -271,13 +272,11 @@ # add LaTeX macros f = open('docs/sphinx/latex_macros.sty') -imgmath_latex_preamble = "" +imgmath_latex_preamble = "\\usepackage{mathtools}" imgmath_image_format = 'svg' imgmath_font_size = 14 for macro in f: - # used when building latex and pdf versions - latex_elements['preamble'] += macro + '\n' # used when building html version imgmath_latex_preamble += macro + '\n'