does the align environment allow to merge columns (not all over of
course but only in certain lines)?
Thanks a lot for your help!
Regards
pkg
Something like that:
\halign{\tabskip0pt $#$\;&$#$\tabskip26pt &&\tabskip0pt
$#$\;&$#$\tabskip26pt \cr
\alpha &=\beta & \gamma &= \delta & \epsilon &=\zeta & \eta &=
\theta \cr
\omit\span\omit\span\omit\span\omit\span\omit\span \alpha = \beta &
\eta &=\theta \cr
}
I'm not sure ams provides that...
Thanks!
> I'm not sure ams provides that...
Yes, would be fine to have something like \multicolumn ...
pkg
what for? I do not really see the need or use of this
/daleif
--
/daleif (remove RTFSIGNATURE from email address)
Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
Suppose you have something like this:
\begin{align}
a & = b && [\text{by Lemma 1}]\\
& = c && [\text{by Lemma 2}]\\
& = d && [\text{by Lemma 3}]\\
& = eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee .
\end{align}
You would then like the explanations in brackets to be aligned.
Without the last line this can be achieved by inserting &&. But if the
very long last line is added, everything behind && skips out of the
range of \textwidth. I admit that this is kind of a peculiar situation
but nevertheless it occurs from time to time.
Regards
pkg
align is actually not a tabular like array (I don't speak about tabu
ouf !)
align is a AMS-formatted \halign. You can use the \halign tools:
\begin{align}
a & = b && [\text{by Lemma 1}]\\
& = c && [\text{by Lemma 2}]\\
& = d && [\text{by Lemma 3}]\\
&= eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
\span\omit\span\omit
\end{align}
>
> You would then like the explanations in brackets to be aligned.
> Without the last line this can be achieved by inserting&&. But if the
> very long last line is added, everything behind&& skips out of the
Well after all, \omit is even not necessary. I put it here because the
"LaTeX line" is so strong that it hides TeX...
\begin{align}
a & = b && [\text{by Lemma 1}]\\
& = c && [\text{by Lemma 2}]\\
& = d && [\text{by Lemma 3}]\\
&= eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee \span\span
\end{align}
does it well .
pkg
Interesting, I've never dared working with \halign, so I do not know
about its inner workings
how many \span's are needed in a general situation?
\span spans the current column with the next one. Here "eeeeeee"
extends on three columns: \span\span spans the first column with
the following two.
I've not studied all in details but \omit\span eeee \span and
\omit\span\omit\span eeee
and \omit\span\span eeeee
would not lead to the same alignments. I've thought about using
such a feature in tabu but it requires more knowledge ;-)
The idea behind was to provide a kind of \multicolumn that does
not \omit the column preamble: vertical leaders, alignments etc.
can be kept. But a lot of new problems arise:
. which spanned column preamble should be used ?
The first ? The last ? one in the middle ?
Is it possible to provide a simple interface ? difficult...
. if the used preamble (not omitted) is p{4cm} such a
"\multicolumn" will be typeset in a parbox whose width
is obviously not interesting. Vertical rules will be at
the wrong place unless a glue is inserted on purpose...
Finally, I came to the conclusion that this was not designed for
a tabular. A tabular uses \halign for alignments but cannot be
considered to be a kind of "\halign" environment.
Yours sincerely.
it might be an useful addition to mathtools, we already have several odd
little macros in it. One would just need a good interface for it and a
good explanation