\documentclass[preview,border=12pt,varwidth]{standalone}
\usepackage[a4paper,margin=1cm]{geometry}
\usepackage{mathtools}
\begin{document}
\abovedisplayskip=0pt\relax
\begin{align}
\begin{multlined}[b][7cm]
\framebox[5cm]{Top LHS}\\
\framebox[5cm]{Middle LHS}\\
\framebox[5cm]{Bottom LHS}
\end{multlined}
&= \begin{multlined}[t][7cm]
\framebox[5cm]{Top RHS 1}\\
\framebox[5cm]{Middle RHS 1}\\
\framebox[5cm]{Bottom RHS 1}
\end{multlined}\\
&= \begin{multlined}[t][7cm]
\framebox[5cm]{Top RHS 2}\\
\framebox[5cm]{Middle RHS 2}\\
\framebox[5cm]{Bottom RHS 2}
\end{multlined}
\end{align}
\end{document}
[Tex/LaTex] How to move the equation numbers to bottom lines
equations
Best Answer
Usually the baseline of the equation number is aligned with the base line of the equation. The
multlined
with optiont
is just a box with a large depth.You want to move the equation number down to the "bottom line", but this is not well defined:
multlined
environments with different bottom base lines.\substack
, used as subscript of an integral/sum operator.Therefore I think, it depends on the equation, where the best place for the equation number is. The following example defines
\tagvpos
that sets a position label to mark the vertical position, where the equation tag should go:amsmath
(e.g.gather
,align
, notequation
).zref-savepos
for the position label that uses a feature of pdfTeX that is available in both modes PDF and DVI and that is also supported by XeTeX and LuaTeX.amsmath
has the feature that it moves the equation tag down, if the equation is too wide. In the latter case, the equation number is not additionally moved via\tagvpos
.Example file:
Remarks:
The internal position labels are automatically named using a counter. The labels are written to the main
.aux
file only to keep the uniqueness of the label names, if\include
files are involved (\let\@auxout\@mainaux
). Also the counter for the label names is not reset in.aux
files for\include
files (this is the purpose of the local\let\@addtoreset\@gobbletwo
right before\newcounter
).Shift detection for too wide equations: Environment
gather
uses a switch, whereasalign
stores the shift state in a list for all rows.