6

Let say I have a set

\{ x \in A : first condition , second condition , third condition \},

or as a more explicit example

\{ x \in A : x > 0 , x^2 \in B , x^3 \notin C \}.

I find that the spacing around the commas are too small, and sometime it makes it hard to identify the different conditions. What would be a good practice to have nice spacing there?

I thought of \ , \. But I really does not like it, since the code is messy afterwards. An other solution I thought of is \mathbin{,} or \mathrel{,}. Does anyone has better suggestion or motivations for choosing one of these solutions over the others.

4
  • 3
    The punctuation should really be in text mode not math mode, try \text{ , } (note the spaces around the comma). Spaces are usually ignored in math mode. – ArTourter Jul 21 '16 at 13:03
  • @ArTourter I don't agree with half of your command, because there should not be a space before the comma, see for Example this answer on English.SE. Different rules might apply in other languages. – dadexix86 Jul 21 '16 at 13:11
  • If you feel a space is needed ,\ is usually enough. I agree with dadeix86 space in in front of , looks bad – daleif Jul 21 '16 at 13:13
  • @ArTourter At the moment, I find your comment the most satisfying answer. If you turn at as an answer I will accept (except if something new comes in, in the meanwhile). – Gilles Bonnet Jul 26 '16 at 16:53
3

Related to something I wrote recently, I would use ,\  in math mode, and just “text mode” when text is involved. I put “” because by text mode I don't mean \text.

\newcommand*\mathwords{\textnormal}
$\{ x \in A : \mathwords{first condition, second condition, third condition} \}$
$\{ x \in A : x > 0 ,\ x^2 \in B ,\ x^3 \notin C \}$

enter image description here

Something should be done so that TeX would break between lines and hyphenate the words in \mathwords, ideally. But here it's just an example.

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.