Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

If I write

If $x \rightarrow y$, then $y \rightarrow z$.

it looks fine. But if the sentence is more involved and formulas longer, I tend to change $...$ to \[...\]. In many cases I think the result is ok, especially if there's only one equation in the end of the sentence.

However, in the above example it would be like:


If

     x→y

, then

     y→z

.


The comma and period doesn't look very nice.

Sure, I could break it up and say If formula (1) holds, then formula (2) holds, but this is usually an overkill in my opinion.

TL;DR: What do you do with periods after sentences ending with a \[...\]-equation?

share|improve this question
2  
The question as to whether you should do this or not is ... contentious. Take a look at tex.stackexchange.com/questions/11821/punctuation-in-equations and follow the links. –  Loop Space Oct 27 '11 at 8:54

2 Answers 2

up vote 17 down vote accepted

You insert the period as part of the equation and therefore also in math mode, as opposed to putting it outside the equation.

enter image description here

\documentclass{article}
\begin{document}
If \[x\rightarrow y,\] then \[y\rightarrow z.\]
\end{document}

Naturally, this may lead to a slightly off-center spacing due to the punctuation (albeit marginally visible). However, to correct for this, you can use \phantom{<punct>} on the opposite side:

\documentclass{article}
\begin{document}
If \[\phantom{,}x\rightarrow y,\] then \[\phantom{.}y\rightarrow z.\]
\end{document}
share|improve this answer
    
Ok, yea, that's obviously an option. You know for sure that this common practice? –  aioobe Oct 27 '11 at 8:00
1  
Since equations (or mathematics in general, whether in-line \textstyle or in \displaystyle) form part of the textual flow, it is my opinion that they can include punctuation. If you want to correct for the possible centered misalignment, see my updated answer. –  Werner Oct 27 '11 at 8:09
1  
Nice update :-) –  aioobe Oct 27 '11 at 8:14

Punctuation in displayed formulas should stay within the formula:

If
\[
x\to y,
\]
then
\[
y\to z.
\]

Somebody leaves a space before the punctuation (I don't); others completely suppress punctuation in displayed formulas, on the basis that the display is doing the work and the reader can infer commas or periods from the context.

Which style to use is a question of personal taste; the most important thing is to be coherent along the document.

share|improve this answer
    
+1, nice answer. I like the "reader can infer commas" part :-) (seems slightly nastier to let the reader infer periods though) –  aioobe Oct 27 '11 at 8:06
    
@aioobe That's why I always use punctuation also in displayed formulas; in rare cases this needs rephrasing in order to avoid ambiguities in formulas, but I prefer to be consistent. In the "no punctuation" style, the presence of a period can be inferred by a following capital letter. –  egreg Oct 27 '11 at 8:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.