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.
-
1$\begingroup$ MathJax uses LaTeX syntax. mathjax.org/resources/faqs/#problem-authoring $\endgroup$– PersonXSep 19, 2012 at 13:55
-
2$\begingroup$ Maybe Wikipedia might be a good start, where you could learn more about MathJax. $\endgroup$– Martin SleziakSep 19, 2012 at 13:58
3 Answers
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 complete 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.
-
1
-
1$\begingroup$ 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. $\endgroup$ Sep 22, 2012 at 13:04 -
$\begingroup$ holy crap LaTeX is turing complete?! to paraphrase the great teddy roosevelt: speak softly and surreptitiously learn languages that are turing complete $\endgroup$– franklinApr 7, 2013 at 16:54
-
$\begingroup$ Would it be possible to define a macro and use it in a question on this site? $\endgroup$– MickGApr 25, 2014 at 13:40
-
1$\begingroup$ 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 $\endgroup$ Apr 25, 2014 at 13:43
$\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.