make \AA macro available in :math: for HTML and PDF

use the (newly redefined) \AA macro for Angstrom symbol throughout
instead of either \mathring{A} or AA
This commit is contained in:
Axel Kohlmeyer
2022-10-01 20:23:32 -04:00
parent 69ca7105ef
commit 39ea6ef30e
23 changed files with 55 additions and 47 deletions

View File

@ -159,7 +159,6 @@ pygments_style = 'default'
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
@ -264,8 +263,18 @@ else:
html_math_renderer = 'mathjax'
# use relative path for mathjax, so it is looked for in the
# html tree and the manual becomes readable when offline
# html tree and the manual becomes readable when offline
mathjax_path = 'mathjax/es5/tex-mml-chtml.js'
# hack to enable use of \AA in :math:
rst_prolog = r"""
.. only:: html
:math:`\renewcommand{\AA}{\text{Å}}`
"""
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
@ -278,6 +287,7 @@ latex_elements = {
# Additional stuff for the LaTeX preamble.
'preamble': r'''
\setcounter{tocdepth}{2}
\renewcommand{\AA}{\mbox{\textrm{\r{A}}}}
'''
}