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

Yes, I know of the existence of breqn, and I am very excited about this package.

I am trying to write a mathematics paper, that will be typeset in two different styles (different page sizes, and different textblocks, &c).

At some point I have to typeset a long exact sequence, which looks approximately like

\[ 1 \to A \to B \to C \to D \to E \to F \to \ldots \]

In my paper, all these letters are actually longer mathematical expressions (cohomology groups). In one paper, this sequence fits nicely on the page, but in the other, I get an hbox overflow error.

I immediately thought of breqn, but the result of using

  1 \to A \to B \to C \to D \to E \to F \to \ldots

is that I get a linebreak at every \to. This is not what I want. There should be just 1 linebreak (if needed), and it should automatically be chosen at the \to between C and D.

How do I accomplish this?

share|improve this question
I do not see how that will help. If I use split, the formula will not be on 1 line in the document where line-breaking is not necessary. – jmc Sep 21 '12 at 2:13
up vote 4 down vote accepted
\usepackage[textwidth=5cm]{geometry}% just for the example


 {1 \to A \to B \to C} \to {D \to E \to F \to \ldots}


enter image description here

share|improve this answer
Wow, thanks! That looks good. One question: Can it be done even more automatic? Suppose I want 5 different textwidths... /I realize this is more difficult question, focussing on a general solution. But I think general solutions are important./ – jmc Sep 21 '12 at 2:24
@jmc perhaps it can be done, but I think it requires too much work, specially since the requirement for the breaking point in this special case might not be the optimal one in other situations. The problem is the determination of the breaking point more than the textwidth. – Gonzalo Medina Sep 21 '12 at 2:27

If you use inline rather than display math it would break automatically without needing any packages.

enter image description here



\def\tst{ 1 \to A \to B \to C \to D \to E \to F \to \ldots }

\fbox{\parbox{2cm}{$\displaystyle \tst $}}

\fbox{\parbox{3cm}{$\displaystyle \tst $}}

\fbox{\parbox{4cm}{$\displaystyle \tst $}}

\fbox{\parbox{5cm}{$\displaystyle \tst $}}

\fbox{\parbox{6cm}{$\displaystyle \tst $}}

\fbox{\parbox{7cm}{$\displaystyle \tst $}}

share|improve this answer
Hi David. Thanks for this answer. I have been disconnected from the internet for half a year. I will consider this. I think the \displaystyle is very useful, and I did not know of it yet. Thanks again! – jmc Feb 15 '13 at 13:25

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.