Skip to content

Commit

Permalink
Confirming mathjax v2 for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmoosh committed Nov 18, 2023
1 parent 17aa375 commit f96ab44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
14 changes: 2 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'sphinx.ext.napoleon',
'sphinxcontrib.apidoc',
'sphinxcontrib.matlab',
'sphinx.ext.imgmath',
'sphinx.ext.mathjax',
'myst_parser']
source_suffix = ['.rst', '.md']
mathjaxVer = 2
Expand Down Expand Up @@ -78,6 +78,7 @@
# This block is used when the sphinx.ext.mathjax extension is loaded
latex_packages = ['upgreek', 'mhchem']
if mathjaxVer == 3:
# Does not support STIX fonts as of v3.2.
mathjax_path='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js'
mathjax3_config = {
'loader': {'load': [f'[tex]/{pkg}' for pkg in latex_packages]},
Expand All @@ -92,14 +93,3 @@
'TeX': {'extensions': [f'{pkg}.js' for pkg in latex_packages], 'Macros': upgreekDefs},
'HTML-CSS': {'fonts': ['STIX-Web']}
}

# This block is used when the sphinx.ext.imgmath extension is loaded. A package error prevents use
# of the stix package.
imgmath_image_format = 'svg'
imgmath_use_preview = True
imgmath_latex_preamble = r'\usepackage[notextcomp]{stix}' + \
r'\usepackage[version=4]{mhchem}' + \
r'\usepackage{siunitx}' + \
r'\usepackage{upgreek}' + \
r'\sisetup{group-separator={\,}, group-minimum-digits={5}, ' + \
'group-digits={integer}}'
1 change: 1 addition & 0 deletions modelCoeffs/printIGRFcoeffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def printIGRFcoeffs(fNameIn='IGRF13.shc', fNameOut='coeffsEarthIGRF13', datDir='
datDir : str
Relative directory path where fNameIn is found and to which fNameOut will be printed
"""

fPathIn = os.path.join(datDir, fNameIn)
fPathOut = os.path.join(datDir, fNameOut)

Expand Down

0 comments on commit f96ab44

Please sign in to comment.