diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 74a2ec2..5b32e68 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -8,7 +8,7 @@ on: [ push, pull_request ] jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: python-version: [3.8, 3.9] @@ -35,5 +35,9 @@ jobs: run: poetry run doc8 - name: Build html docs for Read the Docs run: poetry run make -C doc html + - name: Instal IDE docs dependencies + run: | + sudo apt-get update + sudo apt-get install dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra - name: Build html docs for Pybricks Code IDE run: poetry run make -C doc html SOURCEDIR=ide diff --git a/doc/ide/conf.py b/doc/ide/conf.py index 867edef..5acd7e0 100644 --- a/doc/ide/conf.py +++ b/doc/ide/conf.py @@ -19,6 +19,14 @@ html_show_copyright = False html_show_sphinx = False html_css_files = ['css/ide.css'] +imgmath_image_format = 'svg' +imgmath_use_preview = True # requires Sphinx v3 +imgmath_latex_preamble = r''' +\usepackage{newtxsf} +''' + exec(open(os.path.abspath("../common/conf.py")).read()) +extensions.remove('sphinx.ext.mathjax') # noqa F821 +extensions.append('sphinx.ext.imgmath') # noqa F821 html_theme_options['prev_next_buttons_location'] = None # noqa F821