Latex - \multicolumn within an align* environment [closed]
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this questionI 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 othe开发者_如何转开发rwise. \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!
\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.
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.
精彩评论