From a5e79307f5f90232cf64efd997519ab93c1e8d34 Mon Sep 17 00:00:00 2001 From: Rantaharju Jarno Date: Wed, 25 Jun 2025 15:47:43 +0300 Subject: [PATCH] Use imgmath for pdf output --- .github/workflows/sphinx.yml | 2 +- content/conf.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 24247ce3..9f64c441 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -101,7 +101,7 @@ jobs: if: ${{ env.GENERATE_PDF == 'true' }} run: | pip install https://github.com/rkdarst/sphinx_pyppeteer_builder/archive/refs/heads/main.zip - make pyppeteer + make SPHINXOPTS="-t pdf" pyppeteer mv _build/pyppeteer/*.pdf _build/dirhtml/${PDF_FILENAME} # Stage all deployed assets in _gh-pages/ for simplicity, and to diff --git a/content/conf.py b/content/conf.py index 7f231eb2..24361636 100644 --- a/content/conf.py +++ b/content/conf.py @@ -39,6 +39,11 @@ "sphinx_coderefinery_branding", ] + +if 'pdf' in tags: + # Use imgmath for PDF output + extensions.append("sphinx.ext.imgmath") + # Settings for myst_nb: # https://myst-nb.readthedocs.io/en/latest/use/execute.html#triggering-notebook-execution nb_execution_mode = "cache"