1

I'm looking for a better way of using aligned equations in my documents that allows for pagebreaks and numbers only the bottom equation like this: enter image description here Although, I would prefer to be able to have the same sort of numbering as with the aligned environment where you can specify where the number of the equation goes (e.g., \begin{aligned}[c] places the number of the equation at the center of the aligned environment). So far the only solution I've made use of is defining a command that numbers the equation,

    \newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}

and using the align* environment as follows:

    \begin{align*}
      \grad^2\phi(\mathbf{r}) &= \frac{1}{r^2}\ud{}{r}\left(r^2\ud{}{r}\right)\frac{Ae^{-r/\lambda}}{r}\\
      &= -\frac{A}{r^2}\ud{}{r}\left(\frac{re^{-r/\lambda}}{\lambda}+e^{-r/\lambda}\right)\\
      &= -\frac{A}{r^2}\left(\frac{e^{-r/\lambda}}{\lambda}-\frac{re^{-r/\lambda}}{\lambda^2}-\frac{e^{-r/\lambda}}{\lambda}\right)\\
      &= \frac{Ae^{-r/\lambda}}{\lambda^2r}.
      \numberthis
    \end{align*}

I've tried looking all over the place and so far I haven't found something that does what I want without having to resort to inserting the number manually, which gets bothersome pretty quickly in a long document with a lot of aligned equations. I also tried defining a new environment called aligneq

    \newenvironment{aligneq}{\begin{align*}}{\numberthis\end{align*}}

which would give me a compile error. Is there already an existing environment that has these capabilities that I just haven't found yet?

  • 1
    i think what you may be looking for is the [tbtags] option to amsmath that places the equation number at the last line if the equation numbers are on the right, or at the top line if the numbers are on the left. – barbara beeton Apr 1 '16 at 0:14
  • Welcome to TeX.SX!! It is better to post a full minimal working example that starts with a \documentclass command, has a minimal preamble and then \begin{document}...\end{document}. Unless the problem is a compilation error, the code should compile and be as small as possible to demonstrate your problem. This makes it much easier for people to help you --- and much more likely that they will! – Andrew Apr 1 '16 at 4:13
  • Also remember amsmath has \allowdisplaybreaks – Andrew Swann Apr 1 '16 at 7:44
1

I think it's clearer to use a numbered display and supress the numbers on lines where you don't want a number.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\allowdisplaybreaks

\def\grad{G}
\def\ud{u}

\def\nl{\notag\\}

\begin{document}

Zzzz

\vspace{35\baselineskip}

zzzzzzz
   \begin{align}
      \grad^2\phi(\mathbf{r}) &= \frac{1}{r^2}\ud{}{r}\left(r^2\ud{}{r}\right)\frac{Ae^{-r/\lambda}}{r}\nl
      &= -\frac{A}{r^2}\ud{}{r}\left(\frac{re^{-r/\lambda}}{\lambda}+e^{-r/\lambda}\right)\nl
      &= -\frac{A}{r^2}\left(\frac{e^{-r/\lambda}}{\lambda}-\frac{re^{-r/\lambda}}{\lambda^2}-\frac{e^{-r/\lambda}}{\lambda}\right)\nl
      &= \frac{Ae^{-r/\lambda}}{\lambda^2r}.
    \end{align}

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.