Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
plot_pre_code = ''
plot_formats = ['svg', 'pdf']

mathjax_config = {
'TeX': {
'extensions': ['newcommand.js', 'begingroup.js'], # Support for \gdef
},
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_template']

Expand Down
31 changes: 20 additions & 11 deletions doc/math-definitions.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
.. raw:: latex

\marginpar{% Avoid creating empty vertical space for the math definitions

.. rst-class:: hidden
.. math::
\newcommand{\dirac}[1]{\operatorname{\delta}\left(#1\right)}
\newcommand{\e}[1]{\operatorname{e}^{#1}}
\newcommand{\Hankel}[3]{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
\newcommand{\hankel}[3]{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
\newcommand{\i}{\mathrm{i}}
\newcommand{\scalarprod}[2]{\left\langle#1,#2\right\rangle}
\renewcommand{\vec}[1]{\mathbf{#1}}
\newcommand{\wc}{\frac{\omega}{c}}
\newcommand{\w}{\omega}
\newcommand{\x}{\vec{x}}
\newcommand{\n}{\vec{n}}

\gdef\dirac#1{\operatorname{\delta}\left(#1\right)}
\gdef\e#1{\operatorname{e}^{#1}}
\gdef\Hankel#1#2#3{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\hankel#1#2#3{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\i{\mathrm{i}}
\gdef\scalarprod#1#2{\left\langle#1,#2\right\rangle}
\gdef\vec#1{\mathbf{#1}}
\gdef\wc{\frac{\omega}{c}}
\gdef\w{\omega}
\gdef\x{\vec{x}}
\gdef\n{\vec{n}}

.. raw:: latex

}