File tree Expand file tree Collapse file tree 6 files changed +23
-30
lines changed Expand file tree Collapse file tree 6 files changed +23
-30
lines changed Original file line number Diff line number Diff line change 149149# If true, keep warnings as "system message" paragraphs in the built documents.
150150#keep_warnings = False
151151
152+ math_definitions = r"""
153+ \newcommand{\dirac}[1]{\operatorname{\delta}\left(#1\right)}
154+ \newcommand{\e}[1]{\operatorname{e}^{#1}}
155+ \newcommand{\Hankel}[3]{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
156+ \newcommand{\hankel}[3]{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
157+ \renewcommand{\i}{\mathrm{i}}
158+ \newcommand{\scalarprod}[2]{\left\langle#1,#2\right\rangle}
159+ \renewcommand{\vec}[1]{\mathbf{#1}}
160+ \newcommand{\wc}{\frac{\omega}{c}}
161+ """
162+
163+ rst_prolog = """
164+ .. only:: html
165+
166+ .. rst-class:: hidden
167+ .. math::
168+
169+ """ + ' ' .join (math_definitions .split ('\n ' ))
170+
152171
153172# -- Options for HTML output ----------------------------------------------
154173
@@ -251,7 +270,7 @@ def setup(app):
251270#'pointsize': '10pt',
252271
253272# Additional stuff for the LaTeX preamble.
254- # 'preamble': '' ,
273+ 'preamble' : math_definitions ,
255274
256275'printindex' : '' ,
257276}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- """Compute driving functions for various systems.
2-
3- .. include:: math-definitions.rst
4-
5- """
6-
1+ """Compute driving functions for various systems."""
72import numpy as np
83from numpy .core .umath_tests import inner1d # element-wise inner product
94from scipy .special import jn , hankel2
Original file line number Diff line number Diff line change 1- """Compute time based driving functions for various systems.
2-
3- .. include:: math-definitions.rst
4-
5- """
1+ """Compute time based driving functions for various systems."""
62import numpy as np
73from numpy .core .umath_tests import inner1d # element-wise inner product
84from .. import defs
Original file line number Diff line number Diff line change 22
33The Green's function describes the spatial sound propagation over time.
44
5- .. include:: math-definitions.rst
6-
75"""
86
97import numpy as np
Original file line number Diff line number Diff line change 1- """Various utility functions.
2-
3- .. include:: math-definitions.rst
4-
5- """
6-
1+ """Various utility functions."""
72import collections
83import numpy as np
94from scipy .special import spherical_jn , spherical_yn
You can’t perform that action at this time.
0 commit comments