TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use an inline equation to list bunch o tuples. However, I it does not automatically go to next line. I am doing it manually, but this time it looks ugly. By the way I am writing in a two column template, so I have limited space at each line. Here is what I do:

${x_i,\;y_i }$= $ {{60,45},\; {60,90},\;{60,135},\;{60,180},\;{60,225},\; \ {100,90},\; {100,160},\;{100,225}} $

Is there a way to automatically do this?

share|improve this question
up vote 5 down vote accepted

You have to distinguish which commas are eligible for breaks; so I suggest a command for it:

\newcommand{\bc}{,\penalty0 \;}

$x_i,y_i=60,45\bc 60,90\bc 60,135\bc 60,180\bc 60,225\bc 100,90\bc 100,160\bc 100,225$

enter image description here

Don't overuse \; (it's wrong between x_i and y_i) and also braces: the ones you have in your example are all useless.

share|improve this answer
the \; before the penalty will leave a space at the end of the line if it's broken there. it would be better to put the penalty before the space. (tested; space at the beginning of line is ignored after break.) – barbara beeton Sep 30 '12 at 13:03
@barbarabeeton You're right, of course. – egreg Sep 30 '12 at 13:05

Your Answer


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.