MathJax: LaTeX in Markdown

NOTE: Not sure of the best way to organize the relationship between MathJax and LaTeX. For now, I'm separating MathJax and LaTeX into separate notes. In the future it might be best to make MathJaX a sub-section of LaTeX.

Introduction

MathJax to Wikipedia:

MathJax is a cross-browser JavaScript library that displays mathematical notation in web browsers, using MathML, LaTeX and ASCIIMathML markup.

So essentially it takes a subset of the LaTeX syntax, namely the parts related to mathematical expressions, and renders it in the browser or on documents in the server, just like LaTeX does.

Blocks

MathJax or LaTeX blocks are enclosed using curly braces {}. They are essentially function parameters where each brace is a parameter.

The \frac function is an example of a function that takes two parameters, first is the numerator and the second is the denominator. This is a necessary syntax because sometimes it's hard to serially express mathemtical expressions in a single line, like with large fractions.

This can also apply to simple operators like the superscript operator ^. For example, raising a symbol by a negative power creates a problem of interpretation.

e^-i\pi + 1 = 0

The above expression makes it hard to interpret the actual expression which is Euler's identity. This is because the - is interpreted as a subtraction operator, so to fix this we need to enclose the exponential parts in braces {}.

e^{ -i\pi } + 1 = 0

Which results in this expression:

eiπ+1=0

Arithmetic Operators

Greek Letters

Letter (lower) Command (lower) Letter (Upper) Command (Upper)
α \alpha A A
β \beta B B
γ \gamma Γ \Gamma
δ \delta Δ \Delta
ϵ \epsilon E E
ζ \zeta Z Z
η \eta H H
θ \theta Θ \Theta
ι \iota I I
κ \kappa K K
λ \lambda Λ \Lambda
μ \mu M M
ν \nu N N
ξ \xi Ξ \Xi
ο \omicron O O
π \pi Π \Pi
ρ \rho P P
σ \sigma Σ \Sigma
τ \tau T T
υ \upsilon Υ \Upsilon
ϕ \phi Φ \Phi
χ \chi X X
ψ \psi Ψ \Psi
ω \omega Ω \Omega

NOTE: The uppercase letters in some Greek letters are the same as their Latin counterparts. Because of this the LaTeX command for uppercase Greek letters that are the same as Latin letters are merely those letters in uppercase. When a Greek capital letter is different than its Latin counterpart, you use the same command as the lowercase version, but the first letter capitalized.

Accents and Diacritical Marks

Miscellaneous

Cheat Sheet

There's a fantastic cheat sheet post about MathJax syntax.

TODO: Add a summary of the cheat sheet here.

References

Web Links

Note Links