6

Basic version of my question: Consider the fragment of some text bla bla $x_1,x_2,x_3$ bla. Is this correctly type-setted, or is bla bla $x_1$, $x_2$, $x_3$ bla better ?

Advanced version: Cf. the "Chicago Manual of Style", 16th printed ed, on pp. 589, in 12.19 it is recommended that typesetting lists of mathematical symbols, e.g. $x_1,x_2,x_3$ that medium spaces between commas should be used. Does LaTeX insert these automatically ? If not, should I use $x_1\:,x_2,\:x_3$ rather than $x_1$, $x_2$, $x_3$ ? It appears that these strings differ slightly in length, when the document is compiled to pdf.

  • 11
    It matters greatly what the three items x_1, x_2, and x_3 -- or, say, a, b, and c -- denote: Are they just any three distinct elements, or do they form a sequence? In the former case, you should write ... $x_1$, $x_2$, $x_3$ ...: the commas are parts of the sentence rather than parts of the formulas. In the latter case, you should definitely write $... x_1, x_2, x_3 ...$, as the commas are now a part of the overall math expression. If they form a sequence, you may also want to encase them in curly braces, i.e., write $\{x_1, x_2, x_3\}$. – Mico Sep 23 '15 at 10:45
  • 1
    @Mico Sounds like an answer? – Gonzalo Medina Sep 23 '15 at 15:03
  • @GonzaloMedina - Done. :-) – Mico Sep 23 '15 at 15:43
8

It matters greatly what the three items x_1, x_2, and x_3 -- or a, b, and c -- denote. Are they just any three distinct elements, or do they form a structured entity such as a sequence?

In the former case, you should write, say,

The sum of $x_1$, $x_2$, $x_3$, etc.\ diverges because ...

Don't include the commas in the math terms, because the commas are parts of the sentence rather than components of formulas. With this setup, line breaks can occur (if needed) after the commas.

In the latter case, though, you should definitely write

$... x_1, x_2, x_3 ...$

because the commas are now parts of some larger math expression. And, if x_1, x_2, and x_3 form, say, a three-element set, you may want to encase them in curly braces, i.e., write

$\{x_1, x_2, x_3\}$

TeX will, in general, not insert line breaks after math-mode commas. If you must allow a line break in the formula and if the commas are sensible break-points, you'll need to tell TeX about this fact, by inserting judiciously placed \allowbreak directives, say,

$\{a_1,a_2,\dots,a_n,\allowbreak a_{n+1}, \dots, a_{n+m}\}$
| improve this answer | |
  • you might also want to mention that, when entered as separate math strings, a line can break after one of the commas, but if it's a single math expression, it won't break at the end of a line. – barbara beeton Sep 23 '15 at 16:05
  • @barbarabeeton - Good idea. :-) I'll add a sentence or two to this effect. – Mico Sep 23 '15 at 16:13
  • First: To such a complete and carefully crafted answer, I cannot give anything but a thankful +1! Second: In the text I'm writing, $x_1$ to $x_3$ are something in between unrelated items and a structured entity: I'm dividing a line in three segments, called $A_1$, $A_2$ and '$A_3$ and I constantly have to mention things like "On the segments $A_1$, $A_2$ happens X"; "in contrast, on the segment $A_2$, $A_3$` we have to deal with the problem Y"; "when looking at $A_1$, $A_2$ and '$A_3$` together we can see Z". Would you agree that I should write them apart, as I just did ? – l7ll7 Sep 24 '15 at 13:54
  • [...] Although, they do form an entity, as they are a partition of a line, which makes me somewhat unsure. – l7ll7 Sep 24 '15 at 13:56
  • 1
    @user10324 - I'd write the segments as separate formulas, i.e., on the segments $A_1$ and $A_2$, $X$ happens.... On the other hand, I'd also write Let $(A_1,A_2,A_3)$ be an exhaustive, ordered, and non-overlapping partition of the line segment $A$. – Mico Sep 24 '15 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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