# What is the relation between Latex and MathJax?

What is the relation between Latex and MathJax ? I find this reference very useful for writing questions on mathematics site and I also came across this site for Latex symbols which seems very similar to me . So I want to understand the relation here .

As other answers have already explained, LaTeX and MathJax are related markup languages for preparing mathematical documents. In particular, MathJax is designed to be readily usable by people who know LaTeX. However, MathJax does not support the full power of LaTeX because (1) doing so would be very computationally intensive (2) doing so would be incompatible with supporting Markdown and basic HTML (3) doing so would open math.SE to malicious code insertion, since LaTeX is a Turing compete language.

As a first approximation, you can assume that LaTeX constructions you are familiar with will work in MathJax.

As a second approximation, you can assume that mathematical symbols and commands closely related to them will work, but commands related to page layout, document structure and macro programming may not.

For the details, see here.

• your last link doesn't work. – Geek Sep 21 '12 at 4:38
• Works for me at the moment (Friday, Sept 21, 10:08 AM Eastern Time). – David E Speyer Sep 21 '12 at 14:09
• Definining macros actually is supported. – celtschk Sep 22 '12 at 9:26
• Defining macros is supported, in the sense that MathJax contains \def and \newcommand. I don't think (but could be wrong) that the full power of LaTeX's macro language is supported. – David E Speyer Sep 22 '12 at 13:04
• holy crap LaTeX is turing complete?! to paraphrase the great teddy roosevelt: speak softly and surreptitiously learn languages that are turing complete – franklin Apr 7 '13 at 16:54
• Would it be possible to define a macro and use it in a question on this site? – MickG Apr 25 '14 at 13:40
• Simple \def and \newcommand definitely work, including with arguments; I use them regularly. I'm not sure how much of the full power of the TeX macro language is available – David E Speyer Apr 25 '14 at 13:43

MathJax is simply code that allows mathematical expressions in $\LaTeX$ format to be rendered on a webpage. The MathJax site has much more information.

$\LaTeX$ is a markup language for page description that heavily supports mathematical formulas.

• @MichaelHardy: I have clarified what I intended to make it more accurate. – robjohn Nov 25 '17 at 1:01

$\LaTeX$ is typesetting software that's not limited to mathematical notation. $\LaTeX$ keeps track of page numbers, section numbers, etc., and does everything MSWord can do, more efficiently and with less clutter. One types whole articles and books in $\LaTeX$. MathJax is a very stripped-down relative of $\LaTeX$ used for mathematical notation on web pages.

Here is an example of a document written entirely in $\LaTeX$ --- not just the parts that are in mathematical notation. Obviously MathJax could not do this.