problem with align nested within gather

210 views
Skip to first unread message
Message has been deleted

chemist

unread,
May 4, 2009, 12:46:13 AM5/4/09
to LaTeX Users Group
Hmmm, I hope I'm not imposing by asking two questions in a row...

Anyways, I have several sets of equations of the form:

a=b+c
= TALL math stuff, (1.1)
with
a=d (1.1a)

I'd like the equals signs within 1.1 to be aligned (easy enough, with
align or split), and for the (1.1) to either be on the second row (as
pictured here) (use align, with \notag on the first row), or centered
between the two lines of eq. 1.1 (in principle, split is supposed to
do this). Here's the problem:

When I use split, the (1.1) visually looks too low, and I don't know
how to raise it (sorry, made the following example as minimal as I
could, but needed to put in some TALL math); also the \intertext{with}
leaves too much vertical space on top and bottom (N.B.: the following
code requires the amsmath package):

\begin{gather}
\begin{split}
E(d;L)&=E_{\text{int}} +E_{\text{bend}}\\
&=stufffffffff+\frac{stuff}{\sqrt{s}tuff}\int\limits_{A}^{B} {dr} \frac
{\sqrt {STUFF}}{stuff}\text{,}
\label{eq:salt2}
\end{split}
\intertext{with}
R1=\sqrt{STU\left(\frac{STUFF}{stuff}\right)^{2/3}}.
\label{eq:salt2a}
\tag{\ref{eq:salt2}a}
\end{gather}

When I instead use align, I have the same problem with \intertext
{with}, but in addition it hangs (though eventually compiles), giving
me the following error message about my labels: " !Package amsmath
Error: Multiple \label's: label 'eq:salt3' will be lost .... \end
{gather}":

\begin{gather}
\begin{align}
E(d;L)&=E_{\text{int}} +E_{\text{bend}}\notag\\
&=stufffffffff+\frac{stuff}{\sqrt{s}tuff}\int\limits_{A}^{B} {dr} \frac
{\sqrt {STUFF}}{stuff}\text{,}
\label{eq:salt3}
\end{align}
\intertext{with}
R1=\sqrt{STU\left(\frac{STUFF}{stuff}\right)^{2/3}}.
\label{eq:salt3a}
\tag{\ref{eq:salt3}a}
\end{gather}



So, can you please tell me:
1. What's the preferred way to reduce vertical spacing around the
\intertext line? I've played with \\[-x em], etc. above and below
\intertext, but it would be nice if there were some way a little less
manual and hack-ish -- say, a single command that reduced the vertical
space around the \intertext line symmetrically (or, if not that, then
a command that sets the absolute vertical spacing between \intertext
and each eqn., rather than one that subtracts from the existing
vertical spacing).
2. Is there a way to get align to work here and/or to adjust the
height of the numbering in split?

Thanks!

chemist

unread,
May 4, 2009, 3:53:01 PM5/4/09
to LaTeX Users Group
OK, here's my solution for manually moving the numbering on split; the
reason the numbering wasn't visually centered is because the top and
bottom lines of the split equation are diff. heights. So you trick
latex into thinking they're the same heights by appending, to the
first line, \vphantom{TALL MATH}, where "TALL MATH" is arbitrarily
chosen to be a math expression with large vertical dimensions --
comparable to those in the second line. But then you have to
compensate with \\[-(some no.)em]. And if you are using these
commands, you also need to append \notag to each -- otherwise you get
mutltiple equation numbers overwritten on top of each other (the same
applies for adjusting vert space around \intertext, see below). So
there's a lot of manual adjustment, which is not ideal if you have
many equations of this form.

The nicest thing would be to use align, but there seems to be an
incompatibility between it and \tag that I've not been able to
resolve.

Again, note that you need the amsmath pkg to compile this:

\begin{gather}
\begin{split}
E(d;L)&=E_{\text{int}} +E_{\text{bend}}
\vphantom{\int\limits_{\int}^{\int}}\\
\\[-2.8em]
&=\sqrt{3} F_o (c^2+cd)L\exp (-d/c)+\frac{4\pi \xi k_{\text{B}T}}
{\sqrt 3 d^2}\int\limits_{R_{\text{in}} }^{R_o } {dr} \frac{\sqrt
{R_o^2-r^2}}{r}\text{,}
\label{eq:salt3}
\end{split}
\\[-2.2em]\notag
\intertext{with}\notag
\\[-2.7em]\notag
R_{\text{in}} =\sqrt{R_o^2-\left(\frac{3 \sqrt{3} d^2 L}{8 \pi }\right)
Reply all
Reply to author
Forward
0 new messages