Skip to content

Commit 50d5481

Browse files
committed
Updated mathjax examples in documentation
1 parent 4c62ef7 commit 50d5481

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

exampleSite/content/shortcodes/mathjax.en.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,11 @@ The probability of getting \(k\) heads when flipping \(n\) coins is:
126126

127127
```
128128
{{</*mathjax*/>}}
129-
\[P(E) = {n \choose k} p^k (1-p)^{ n-k} \]
129+
130+
\[P(E) = {n \choose k} p^k (1-p)^{ n-k} \]
131+
130132
{{</*/mathjax*/>}}
133+
131134
```
132135

133136
renders as
@@ -143,11 +146,15 @@ renders as
143146
An Identity of Ramanujan
144147

145148
```
146-
\[
147-
\frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} =
148-
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
149-
{1+\frac{e^{-8\pi}} {1+\ldots} } } }
150-
\]
149+
{{</*mathjax*/>}}
150+
151+
\[
152+
\frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} =
153+
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
154+
{1+\frac{e^{-8\pi}} {1+\ldots} } } }
155+
\]
156+
157+
{{</*/mathjax*/>}}
151158
```
152159

153160
renders as
@@ -168,11 +175,16 @@ renders as
168175
In-line Mathematics
169176

170177
```
178+
{{</*mathjax*/>}}
179+
171180
Finally, while display equations look good for a page of samples, the
172181
ability to mix math and text in a paragraph is also important. This
173182
expression $\sqrt{3x-1}+(1+x)^2$ is an example of an inline equation. As
174183
you see, MathJax equations can be used this way as well, without unduly
175184
disturbing the spacing between lines.
185+
186+
{{</*/mathjax*/>}}
187+
176188
```
177189

178190
renders as

0 commit comments

Comments
 (0)