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.

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 not sure which one is correct when using \intertext or \shortintertext. Adding \\ before them or not.

\section*{Without a line break }
E = mc^2
\intertext{Multiply both side by 2, we have}
2E = 2mc^2

\section*{With a line break}
E = mc^2\\
\intertext{Multiply both side by 2, we have}
2E = 2mc^2

enter image description here

I don't see any differences. Or there is something wrong with my eyes. So the question is: Is it necessary to give a \\ before \intertext or \shortintertext?

share|improve this question
According to amsmath documentation: "\intertext may only appear right after a \\ or \\* command", but it seems to work without as well... – karlkoeller Nov 10 '13 at 6:44
@karlkoeller: That is why I am always confused with it when writing... – kiss my armpit Nov 10 '13 at 6:48
up vote 7 down vote accepted

For \intertext to work, it has to be in vertical mode, which means it should follow \\. However, \intertext does a check to see whether this is the case (...\ifvmode\else\\\@empty\fi...). If not, it attempts to insert it. As such, the use of it may be considered cautiously optional.

From the amsmath documentation (p 33 onward):

The \intertext command is used for inserting text between the rows of an alignment. It might better be done as an environment, but the \begingroup from \begin would cause the \noalign to fail.


\intertext@ is called by all environments that allow the use of the \intertext command.


If current mode is not vmode, the most likely reason is that the writer forgot the \\ that is supposed to precede \intertext. All right, then, let's try adding it our ownself. But, to be slightly careful: \\ does a futurelet, and it's slightly dangerous to allow a letted token to barge around loose in our internal code when it has been let to a conditional token like \fi. So let's interpose something in front of the \fi for the futurelet to take instead. (And careful again: it has to be something evanescent, not (e.g.) \relax which would cause the next halign cell to fire up and keep \noalign from working.)


We need to do something extra if the outside environment is a list environment. I don't see offhand an elegant way to test "are we inside any list environment" that is both easy and reliable (for example, checking for zero \@totalleftmargin wouldn't catch the case where \@totalleftmargin is zero but \linewidth is less than \columnwidth), so it seems to me checking \linewidth is the best practical solution.

         \else \parshape\@ne \@totalleftmargin \linewidth
share|improve this answer

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.