This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
forked from jem/jemdoc
-
Notifications
You must be signed in to change notification settings - Fork 9
/
latex.jemdoc
executable file
·64 lines (56 loc) · 2.14 KB
/
latex.jemdoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# jemdoc: menu{MENU}{latex.html}, showsource
= jemdoc -- latex equations
jemdoc includes support for LaTeX equations. LaTeX source embedded in jemdoc
files is processed by calling [http://www.latex-project.org/ +latex+] and
[http://www.nongnu.org/dvipng/ +dvipng+] (which must both be available for this
feature). Resulting PNG images are then placed on the web page. Equations are
typeset using pure LaTeX.
~~~
jemdoc equation support relies on several pieces, any of which may break. No
guarantees! Support may be limited.
~~~
== Inline equations
The conjugate function $f^\star(y) = \sup_{x \in X}(y^Tx - f(x))$ appears here
inline, and is in the variable $y$. Dollar signs (+\$+) surround the LaTeX
equation in the jemdoc source.
~~~
{Syntax}{}
The sample function $f^\star(y) = \sup_{x \in X}(y^Tx - f(x))$
appears here inline, and is in the variable $y$.
~~~
== Equations on separate lines
To render an equation on its own line, use backslash-escaped round brackets
(+\\(+ and +\\)+). For example, the identity
\(
(I + XY)^{-1} = I - X(I + YX)^{-1}Y
\)
is typeset on its own line. Yes, round brackets instead of square
brackets---this is to avoid a conflict with ordinary square brackets that are
escaped to avoid being a link. Sorry.
~~~
{Syntax}{}
The identity
\(
(I \+ XY)^{-1} = I - X(I \+ YX)^{-1}Y
\)
is typeset on its own line.
~~~
Here, the line breaks (and other whitespace) are ignored. As always, the exact
formatting details can be adjusted using CSS.
== Notes
- The baseline is carefully adjusted. The sequences m$m$m and y$y$y (+m\$m\$m+
and +y\$y\$y+), for example, should be neatly aligned (modulo bad browsers).
- Definition by cases will work as expected, for example, $f(x)$, where
\(
f(x) = \left\{
\begin{array}{ll}
3, & x \leq 0 \\
5, & x > 0. \\
\end{array}\right.
\)
(You can view the [latex.jemdoc jemdoc source] for this page.)
- A random inequality might look like $3x + 2y^{4k + 6} \geq z$.
- This page takes about 0.7 seconds to process on an average machine, including
making all the equations from scratch.
- There are several configuration options for equations. They are detailed on
the [modelines.html modelines] page.