summaryrefslogtreecommitdiff
path: root/docutils/test/functional/input/data
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-10-25 08:02:43 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-10-25 08:02:43 +0000
commit159bad6d5b7aa801d69a7fc45202ef8be32121f1 (patch)
tree6c8928c8cd5bdfb2a683ec757e208e83fadcda1a /docutils/test/functional/input/data
parent1b3d5c3822ef96cd903099ee4f1bccb9103dec0e (diff)
downloaddocutils-159bad6d5b7aa801d69a7fc45202ef8be32121f1.tar.gz
Support mathematics with a "math" role and "math-block" directive.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6451 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional/input/data')
-rw-r--r--docutils/test/functional/input/data/math.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/docutils/test/functional/input/data/math.txt b/docutils/test/functional/input/data/math.txt
new file mode 100644
index 000000000..29cf33041
--- /dev/null
+++ b/docutils/test/functional/input/data/math.txt
@@ -0,0 +1,54 @@
+Testing Math
+------------
+
+Docutils supports inline math with the prefix or postfix ``:math:``
+role specificator, :math:`n! + \sin(x_n^2)` and `A_\text{c} =
+\frac{\pi}{4} d^2`:math:, as well as displayed math via the
+``math-block`` directive:
+
+.. math-block::
+
+ f(\epsilon) = \frac{1}{1 + \exp\left(\frac{\varepsilon}{k_\text{B}T}\right)}
+
+.. math-block::
+
+ N = \frac{\text{number of apples}}{7}
+
+.. math-block::
+
+ \mathbf{M} = \left(\begin{matrix}a&b\\c&d\end{matrix}\right)
+
+We have :math:`|\mathbf{M}| = ad - bc`.
+
+.. math-block::
+
+ \int_0^1 x^n dx = \frac{1}{n + 1}
+
+.. math-block::
+
+ \sum_{n=1}^m n = \frac{m(m+1)}{2}
+
+* tilde: :math:`\tilde{n}`
+* hat: :math:`\hat{H}`
+* bar: :math:`\bar{v}`
+
+Quantum mechanics:
+
+.. math-block::
+
+ -\frac{1}{2}\nabla^2 \psi + v \psi = \varepsilon \psi
+
+Math split over two lines:
+
+.. math-block: (this one currently fails)
+
+ g(\alpha) = & (1 + \alpha + \alpha^2 + \alpha^3 + \alpha^4\\
+ & + \alpha^5)
+
+.. math-block::
+
+ f(x) = \left\{
+ \begin{matrix}
+ 1 - x, & x < 1 \\
+ 0, & x > 1
+ \end{matrix}\right.