From 0c35ff9b3e75699fef5980f46ea0fb64ee359bb4 Mon Sep 17 00:00:00 2001 From: hirwa Date: Wed, 20 Mar 2024 13:56:37 +0530 Subject: [PATCH 1/2] added mathjax for rendering tex format imgmath needs latex engine --- .pre-commit-config.yaml | 2 +- _docs/source/conf.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 39eb394bd..dfcdeef4b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ default_language_version: - python: python3.8 + python: python3 ci: autofix_prs: true diff --git a/_docs/source/conf.py b/_docs/source/conf.py index 5d489f2bb..2b1daf720 100644 --- a/_docs/source/conf.py +++ b/_docs/source/conf.py @@ -71,6 +71,7 @@ "myst_parser", "sphinx_paramlinks", "pt_lightning_sphinx_theme.extensions.lightning", + "sphinx.ext.mathjax", ] # Add any paths that contain templates here, relative to this directory. @@ -207,6 +208,11 @@ ), ] +# MathJax configuration +mathjax3_config = { + "tex": {"packages": {"[+]": ["ams", "newcommand", "configMacros"]}}, +} + # -- Options for Epub output ------------------------------------------------- # Bibliographic Dublin Core info. From ecdbbcef0e9e1a65f6e9abc579031fd095f31212 Mon Sep 17 00:00:00 2001 From: hirwa Date: Wed, 20 Mar 2024 17:18:35 +0530 Subject: [PATCH 2/2] remove latex installation step from workflow --- .github/workflows/ci_docs.yml | 3 +-- .github/workflows/docs-deploy.yml | 2 -- _docs/source/conf.py | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index 3ec1d24dd..d373abd61 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -44,8 +44,7 @@ jobs: - name: Install Texlive & tree run: | sudo apt-get update --fix-missing - # install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux - sudo apt-get install -y cmake tree pandoc texlive-latex-extra dvipng texlive-pictures + sudo apt-get install -y cmake tree pandoc - name: Install dependencies run: | diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 265b66c73..d0a8e80bf 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -33,10 +33,8 @@ jobs: - name: Install dependencies run: | mkdir -p ${PATH_DATASETS} - # install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux sudo apt-get update sudo apt-get install -y cmake pandoc - sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures pip --version pip install --quiet --requirement _requirements/docs.txt pip list diff --git a/_docs/source/conf.py b/_docs/source/conf.py index 2b1daf720..dcde3a179 100644 --- a/_docs/source/conf.py +++ b/_docs/source/conf.py @@ -65,7 +65,6 @@ "sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx.ext.napoleon", - "sphinx.ext.imgmath", "sphinx.ext.githubpages", "nbsphinx", "myst_parser",