Skip to content

Commit

Permalink
Use MathJax 3's SVG renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Jan 2, 2024
1 parent 43c9bff commit c23ba47
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
html_title = "Cabal {} User's Guide".format(release)
html_short_title = "Cabal %s User's Guide" % release
html_logo = 'images/Cabal-dark.png'
html_static_path = ['images']
html_static_path = ['_static', 'images']
html_css_files = ['css/custom.css']
# Convert quotes and dashes to typographically correct entities
html_use_smartypants = True
html_show_copyright = True
Expand Down Expand Up @@ -102,8 +103,21 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'CabalUsersGuide'

# MathJax to use HTML rendering by default (makes the text selectable, see #8453)
mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML'
# The SVG renders clearer and quicker than the HTML (with version 3 of MathJax).
# It is not selectable immediately (with either version 3 renderer unlike with
# version 2's HTML renderer), but can be selected through the context menu, see
# #8453.
mathjax_path = 'https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-mml-svg.js'
mathjax3_config = {
'tex': {
# Avoid a false positive infinite loop detection by increasing the buffer size.
'maxBuffer': 1024 * 1024
},
'svg': {
'scale': 0.8,
'displayAlign': 'left',
}
}


# -- Options for LaTeX output ---------------------------------------------
Expand Down

0 comments on commit c23ba47

Please sign in to comment.