Skip to content

Commit 956461c

Browse files
authored
docs: added mathjax for rendering tex format as imgmath needs latex engine to run (#316)
1 parent cbbea35 commit 956461c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/ci_docs.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ jobs:
3939
- name: Install Texlive & tree
4040
run: |
4141
sudo apt-get update --fix-missing
42-
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
43-
sudo apt-get install -y cmake tree pandoc texlive-latex-extra dvipng texlive-pictures
42+
sudo apt-get install -y cmake tree pandoc
4443
4544
- name: Install dependencies
4645
run: |

.github/workflows/docs-deploy.yml

-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ jobs:
5555
mkdir -p ${PATH_DATASETS}
5656
sudo apt-get update --fix-missing
5757
sudo apt-get install -y cmake pandoc
58-
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
59-
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
6058
pip install -q -r _requirements/docs.txt -f ${TORCH_URL}
6159
pip list
6260
shell: bash

_docs/source/conf.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
"sphinx.ext.intersphinx",
6464
"sphinx.ext.todo",
6565
"sphinx.ext.napoleon",
66-
"sphinx.ext.imgmath",
6766
"sphinx.ext.githubpages",
6867
"nbsphinx",
6968
"myst_parser",
7069
"sphinx_paramlinks",
7170
"pt_lightning_sphinx_theme.extensions.lightning",
71+
"sphinx.ext.mathjax",
7272
]
7373

7474
# Add any paths that contain templates here, relative to this directory.
@@ -205,6 +205,11 @@
205205
),
206206
]
207207

208+
# MathJax configuration
209+
mathjax3_config = {
210+
"tex": {"packages": {"[+]": ["ams", "newcommand", "configMacros"]}},
211+
}
212+
208213
# -- Options for Epub output -------------------------------------------------
209214

210215
# Bibliographic Dublin Core info.

0 commit comments

Comments
 (0)