7

How to set the numbering of an equation set to align bottom+right?

For example, in following code. The default numbering will be placed on the same row as S. But is it possible to change it to row 3 (the P = ??? row)?

\begin{equation}
\begin{split}
A &= 0011 0000 0_2\\
S &= 1101 0000 0_2\\
P &= 0000 1100 0_2
\end{split}
\end{equation}
7

Use the tbtags option to the amsmath package:

Sample output

tb stands for "top or bottom"; when the equation numbers are on the right the tag will be placed at the bottom of the block, when the numbering is on the left, the tags will be placed at the top. The opposite option is centertags. The split environment is defined by the amsmath package, but if you load mathtools instead you can write \usepackage[tbtags]{mathtools} which will pass the option on to amsmath when mathtools loads it.

\documentclass{article}

\usepackage[tbtags]{amsmath}

\begin{document}

\begin{equation}
  \begin{split}
    A &= 0011 0000 0_2\\
    S &= 1101 0000 0_2\\
    P &= 0000 1100 0_2
  \end{split}
\end{equation}

\end{document}
3

This can also be done with TABstacks.

EDITED for =& the TABstack norm, instead of &=, so as to get proper spacing around the =.

\documentclass{article}
\usepackage{amsmath,tabstackengine}
\stackMath
\begin{document}
\begin{equation}
\setstackgap{L}{15pt}
  \alignLongstack{
    A =& 0011 0000 0_2\\
    S =& 1101 0000 0_2\\
    P =& 0000 1100 0_2
  }
\end{equation}
\end{document}

enter image description here

Top numbering can be achieved with \alignLongunderstack. Inter-row spacing is adjusted before the invocation with \setstackgap{L}{<length>}.

0

I had the same problem and came up with a quick and dirty solution. I did the following:

\begin{align}
A &= 0011 0000 0_2 \nonumber \\
S &= 1101 0000 0_2 \nonumber \\
P &= 0000 1100 0_2 \nonumber \\[-0.5cm]
&
\end{equation}

You might have to tweak the spacing in between the last two lines to align the equation number with the last equation, but I worked for me.

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.