4
\begin{align}\label{abc}
    &f(x,y,z) = \begin{aligned}[t]
        & aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
        & + aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
        & - aaaaaaaaaaaaaaaaaaaaaaaaaaa,
    \end{aligned}\\\label{abcd}
    &g(x,y,z,w) = \begin{aligned}[t]
        & aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
        & + aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
        & - aaaaaaaaaaaaaaaaaaaaaaaaaaa,
    \end{aligned}
\end{align}
\eqref{abc} \eqref{abcd}

img

I want to change the position of (15) and (16) to where I want.

Is there any options like [t], [c], [b]?

The options [t] that I think imply that (15) is located the first line like the above figure.

The options [c] that I think imply that (15) is located the second line like the following figure.

enter image description here

The options [b] that I think imply that (15) is located the third line like the following figure.

enter image description here

  • 1
    Can you elaborate Where I want here? – subham soni Dec 6 '17 at 5:37
  • 1
    I've just added figures that I want. The figures are not from the LaTex. They are from the mspaint program. (I drew it.) – Danny_Kim Dec 6 '17 at 5:47
  • the positioning options for aligned are meant to position the aligned block itself relative to what it follows, not the position of the label. – barbara beeton Dec 6 '17 at 17:57
5

To influence the vertical position of the equation label associated with a given aligned environment, you mainly need to reorganize some of the material.

For instance, in order to achieve top-alignment of the equation number, don't write

\label{abc}
&f(x,y,z) = \begin{aligned}[t]
    & aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
    & + aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
    & - aaaaaaaaaaaaaaaaaaaaaaaaaaa,
\end{aligned}\\

Instead, you need to write

&\begin{aligned}[t] \label{abc}
f(x,y,z)   &= aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
              &\quad+ aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
              &\quad- aaaaaaaaaaaaaaaaaaaaaaaaaaa, 
\end{aligned}\\

The single most important change is the placement of \begin{aligned}[t]: instead of coming after f(x,y,z), it has to come before it.

By the way, the only real placement options are [t] and [b] (for top and bottom); any other letter, including (but not limited to) [c], is ignored, resulting in the default placement, which is centered.


Here's a full MWE (minimum working example) which places the equation labels on the bottom rows:

enter image description here

\documentclass{article}
\usepackage{amsmath,newtxtext,newtxmath}
\usepackage[colorlinks,linkcolor=blue]{hyperref} % just for this example
\begin{document}
\setcounter{equation}{14} % just for this example

\begin{align}
    &\begin{aligned}[b] \label{abc}
       f(x,y,z)   &= aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
                  &\quad+ aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
                  &\quad- aaaaaaaaaaaaaaaaaaaaaaaaaaa, 
    \end{aligned}\\[1ex] % some extra whitespace, for "visual grouping"
    &\begin{aligned}[b] \label{abcd}
       g(x,y,z,w) &= aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
                  &\quad + aaaaaaaaaaaaaaaaaaaaaaaaaaa\\
                  &\quad - aaaaaaaaaaaaaaaaaaaaaaaaaaa,
    \end{aligned}
\end{align}

\eqref{abc}, \eqref{abcd}
\end{document} 
  • 1
    I should have pondered more!.. I just thought that there exist some options or new environments that I do not know yet. However, what I want can be done with only align and aligned environments. Very thank you~ – Danny_Kim Dec 6 '17 at 6:26
4

It's far more convenient to use align as-is with appropriately placed \nonumber (or \notag):

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
  f(x,y,z) 
      &=  aaaaaaaaaaaaaaaaaaaaaaaaaaa \nonumber \\
      &\qquad {}+ aaaaaaaaaaaaaaaaaaaaaaaaaaa \nonumber \\
      &\qquad {}- aaaaaaaaaaaaaaaaaaaaaaaaaaa, \label{eqn:abc} \\
  g(x,y,z,w)
      &=  aaaaaaaaaaaaaaaaaaaaaaaaaaa \nonumber \\
      &\qquad {}+ aaaaaaaaaaaaaaaaaaaaaaaaaaa \nonumber \\
      &\qquad {}- aaaaaaaaaaaaaaaaaaaaaaaaaaa, \label{eqn:abcd}
\end{align}
See equations~\eqref{eqn:abc} and~\eqref{eqn:abcd}.

\end{document}

While the alignment above is different from what you've supplied, that can be changed.

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.