0
$\begingroup$

I've noticed that different users have written LaTex code using either commands inside two $ signs or simply connected a single term to a & symbol. How many different ways are there of coding math symbols on stack exchange?

EDIT: I didn't mean for this to repeat what was said in the tutorial. I specifically asked it because I couldn't find this info in the tutorial. I meant to say "how many ways are there to write the same thing?" For instance, I noticed someone did a pi symbol (or something like it) using &pi or some other code. Is this another markup language? How come there is no reference to it in the tutorial? How many different ways are there to write each expression other than with standard Mathjax?

$\endgroup$
9
  • 1
    $\begingroup$ A really useful one to know is \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} (and everything else here works too). I don't know of any complete listing though. $\endgroup$ Sep 1, 2015 at 17:37
  • 4
    $\begingroup$ In my view, this is the single most useful LaTeX/MathJax reference for the purpose of formatting math in math.se. $\endgroup$
    – wltrup
    Sep 1, 2015 at 20:35
  • 2
    $\begingroup$ Could you add some examples. You mean something like a≥b obtained by *a≥b* vs. $a\geq b$ obtained by $a\geq b$? (Interestingly, the first one renders in a question/answer, but not in a comment. It was supposed to be a≥b.) $\endgroup$ Sep 2, 2015 at 10:37
  • 2
    $\begingroup$ IIRC using Unicode for writing math has been previously discussed on this site. For example here and here. It seems that using MathJax is preferable. $\endgroup$ Sep 2, 2015 at 10:43
  • 1
    $\begingroup$ @Martin Comments only have a restricted subset of markdown (e.g. headings are disabled), and this includes the HTML-like parts of markdown. For example one cannot make a subscript in a comment using <sub></sub>: <sub>example</sub>. In your case HTML entities are forbidden in comments.×Comments may only be edited for 5 minutes×Comments may only be edited for 5 minutes×Comments may only be edited for 5 minutes Cf. official help page. $\endgroup$ Sep 2, 2015 at 12:04
  • 5
    $\begingroup$ I see that somebody voted to close this as a duplicate of MathJax tutorial. I am not sure that this is what the OP wants to ask. (Although I think that they should clarify their question a bit.) In any case, I voted to leave open. $\endgroup$ Sep 3, 2015 at 5:52
  • $\begingroup$ I appreciate that! No, I didn't mean for this to repeat what was said in the tutorial. I specifically asked it because I couldn't find this info in the tutorial. I meant to say "how many ways are there to write the same thing?" For instance, I noticed someone did a pi symbol (or something like it) using &pi or some other code. Is this another language? How come there is no reference to it in the tutorial? How many different ways are there to write each expression other than with standard Mathjax? $\endgroup$
    – Jeff Strom
    Sep 3, 2015 at 6:34
  • 3
    $\begingroup$ The syntax &pi; is an HTML entity. They are allowed in questions and answers but not comments, and they're not specifically there to typeset math, for example &ndash; would give an en-dash '–'. It's more of a crutch than anything, because you can simply type in the corresponding unicode character and achieve the same result. As Martin said above it's preferable to use mathjax to produce math. $\endgroup$ Sep 3, 2015 at 8:28
  • $\begingroup$ To answer your question, there are infinitely many ways to get the same output. If only because $\pi$ and $\pi{}$ and $\pi{}{}$ and $\pi{}{}{}$ and, well you get the idea, all have the same output: $\pi$. $\endgroup$
    – Asaf Karagila Mod
    Sep 3, 2015 at 10:59

1 Answer 1

5
$\begingroup$

The tool to enter mathematics on the site MathJax, which has a syntax similar to LaTeX. This is the markup with dollar-symbols.

There is no other dedicated tool for typesetting mathematics made available on this site. Some basic typesetting of mathematics can be achieved using functionality of HTML, or also just standard and not so standard characters.

Entering &pi; will give π as this is, as explained in a comment, the HTML entity for this character. However, as also explained in a comment one can also just use this character directly like π (if one knows how to enter it, or copy-pastes it from somewhere).

One could also use HTML to get super-scripts like a<sup>2</sup> to get a2 and thus typeset "a squared" and so on.

Of course on can also just type out things like 2 + 3 = 5.

There are still other ways to insert mathematics, like embedding images and so on.

However, to reiterate the only dedicate tool to enter mathematics is MathJax; all other methods (to the best of my knowledge) are only usages of common HTML-functionality.

$\endgroup$
1
  • 4
    $\begingroup$ I'll add that $π$ is equivalent to $\pi$ because MathJax parses the Unicode equivalents of math symbols as if they were TeX commands. For another example, $∫_0^1$ produces the same output as $\int_0^1$. Only the second approach is TeX-compatible, though. $\endgroup$
    – user147263
    Sep 3, 2015 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .