Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latex - \multicolumn within an align* environment [closed]

I would like to have a \multicolumn like effect within an align* environment, as shown in the code snippet (which doesn't work) below. I.e., I want the text to be aligned with the leftmost column, but it shouldn't affect the alignment characteristics of the equation otherwise. \intertext{...} unfortunately flushes everything to the left margin, even when the equation is centered.

    \begin{align*}
      1 & 2 & 3 & 4 & 5 \\
      \multicolumn{5}{l}{Some text that I want to appear here..} \\
      %\intertext{Some text that I want to appear here} \\
      7 & 8 & 9 & 10 & 11 & 12
    \end{align*}

How do I make this happen?

Many thanks in advance!

like image 371
ARV Avatar asked Oct 07 '10 13:10

ARV


2 Answers


\begin{align*}
  1 & 2 & 3 & 4 & 5 \\
  \omit\rlap{Some text that I want to appear here...}\\
  7 & 8 & 9 & 10 & 11 & 12
\end{align*}

Generally, as a replacement for \multicolumn within align-like environments, one could try to experiment with \multispan, but it seems to interfere badly with the alignment in this case.

like image 117
Emil Jeřábek Avatar answered Sep 30 '22 15:09

Emil Jeřábek


Apparently in math mode, the commands \llap and \rlap for horizontal alignment don't work. The package mathtools provides \mathllap and \mathrlap, which do work there.

Source: this post.

like image 31
p_a_c Avatar answered Sep 30 '22 15:09

p_a_c