Skip to content

Latest commit

 

History

History
93 lines (65 loc) · 2.67 KB

mathematics.rst

File metadata and controls

93 lines (65 loc) · 2.67 KB
topic

Mathematics

triple: Sphinx; Syntax; Mathematics

Mathematics

In you can include inline math x ← y xy x − y (as role :math:`x\leftarrow y\ x\forall y\ x-y`) or display math as directive block which is able to cross-referencing equations:

$$W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[ \frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right ]$$

Recent versions of include built-in support for math. There are three flavors:

  • :pysphinx:sphinx.ext.imgmath: uses dvipng to render the equation
  • :pysphinx:sphinx.ext.mathjax: renders the math in the browser using Javascript
  • :pysphinx:sphinx.ext.jsmath: it's an older code, but it checks out

Additionally, there are special extensions provided by matplotlib that has its own math support for writing mathematical expressions and inserting automatically-generated plots:

  • matplotlib.sphinxext.mathmpl
  • :pymplref:matplotlib.sphinxext.plot_directive

See ../extensions/matplotlib for more details about the matplotlib extensions with examples.

\clearpage\phantomsection