[Tex/LaTex] Punctuation in equations

equationsmath-modepunctuationspacing

My document will contain a lot of equations, and as usual in that case I would like to use "punctuation" in the equations, like commas, colons, periods/full stops, semicolons, etc.

Is there a special way to correctly do that? Now I just type these characters at the end of the equations, but as it's in math mode maybe there is a better way that improve the spacing, etc.

I also read about \colon, \ldotp. What do they do that the normal "characters" don't?

Best Answer

No, you can key in the punctuations marks as usual. As Seamus writes in his comment, macros like \colon are for punctuation marks that are being used as mathematical relations rather than punctuation.

Sentence punctuation should not appear inside of inline mathematics. For displayed mathematics, I think it's safe to say it's a matter of style. See "For formal articles, should a displayed equation be followed by a punctuation to conform to the language grammar?" I'm in the camp of no sentence punctuation in display math; it's just distracting. De gustibus non est disputandum.

So for example:

If $a$ and $b$ are the lengths of the legs of a right triangle 
and $c$ is the length of the hypotenuse, then $a^2 + b^2 = c^2$, or:
\[
   c = \sqrt{a^2 + b^2}
\]
This amazing relation is known as the \textbf{Pythagorean Theorem}.