# What preamble does math.stackexchange.com use?

I am trying to use Anki to create calculus flash cards. I use the input box on the math.stackexchange.com site since it is the easiest LaTex editor I know of to use for math equations. However, I spend a lot of time trying to fix errors because of differences in the way the code is compiled in Anki, which is probably due to differences in the preamble between Anki and math.stackexchange. Is there a way to find out what they use?

-
Math.SE uses MathJax which is not (La)TeX, although it uses mostly LaTeX syntax. There is no preamble nor any TeX processing of the input. –  egreg Jun 15 '13 at 23:04
Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. –  Heiko Oberdiek Jun 15 '13 at 23:34

As it has been already answered, math.SE uses MathJax in order to display math equations specified in a TeX notation.

It is possible to reuse codes from math.SE in your document, by loading the right packages. With a look into the math.SE source code, you can find the following line, which calls MathJaX:

<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>


As you can read in the MathJaX Documentation, the TeX-AMS_HTML option "allows math to be specified in TeX or LaTeX notation, with the AMSmath and AMSsymbols packages included".

You should be able to reuse any equation from math.SE by loading amsmath and amssymb packages in your preamble:

\usepackage{amsmath}
\usepackage{amssymb}


It also works with Anki: in Anki2, go into the Option button in the Manage note types dialog, and add those two packages in the preamble. In Anki1, you can change the preamble in Settings > Deck Properties.

-

## Installing and Testing MathJax

The easiest way to use MathJax is to link directly to the MathJax distributed network service (see Using the MathJax CDN). In that case, there is no need to install MathJax yourself, and you can begin using MathJax right away; skip this document on installation and go directly to Configuring MathJax.

MathJax can be loaded from a public web server or privately from your hard drive or other local media. To use MathJax in either way, you will need to obtain a copy of MathJax. There are three ways to do this: via git, svn, or via a pre-packaged archive. We recommend git or svn, as it is easier to keep your installation up to date with these tools.

...

More details, visit MathJax.

-
I got some reputations only by copying and pasting. A nice job for today. Thank you! –  kiss my armpit Jun 16 '13 at 11:28
that happens :) I got most votes for this answer of mine before I made the edit when it only contained a quote. –  clemens Jun 16 '13 at 13:07