# Temporary vertical rule for equations' alignment purpose

How can I obtain a vertical rule like the red one in the figure? Here's the LaTeX code (without the rule):

\begin{align}\label{62}
\begin{split}
\delta_{\chi} \theta_{A} & = \mathcal{L}_{Y} \theta_{A}-2 \kappa \partial_{A} T, \hspace{1 cm}  \delta_{\chi} \Omega_{AB} =\mathcal{L}_{Y}\Omega_{AB} , \\
\delta_{\chi} \lambda_{AB}  & = \mathcal{L}_{Y} \lambda_{AB} + \theta_{A} \partial _{B} T+ \theta_{B} \partial _{A} T - 2 \bar{\nabla}_{A}\bar{\nabla}_{B} T,
\end{split}
\\
\label{63}
\begin{split}
\delta_{\chi} \psi_{v} & = \mathcal{L}_{Y} \psi_{v}, \hspace{2.85 cm}  \delta_{\chi} \varphi_{A} =\mathcal{L}_{Y}\varphi_{A}+ \varphi_{v} \partial_{A} T+ \partial_{A} \hat{\lambda}, \\
\delta_{\chi} \psi_{A}  & = \mathcal{L}_{Y} \psi_{A} + \psi_{v} \partial_{A} T + \Omega^{BC} \left( \partial_{A} \varphi_{B}-\partial_{B} \varphi_{A} \right) \partial_{C}T,
\end{split}
\end{align}

• \rlap{\smash{\rule[-10cm]{0.1pt}{20cm}}} save it as a macro and place it before the first =. Other that that a screen ruler is very handy (btw I probably got the order of the two main arguments in rule wrong) – daleif Apr 22 '18 at 11:30

You can add a \vrule in red but enclose it in a \smash and fix up the categories by using the following at the =, replacing the symbol:

\mathrel{\llap{\smash{\color{red}\vrule depth 3cm height 1ex}}{=}} You may adjust 3cm to the depth you need.

\documentclass{article}

\usepackage{amsmath,color}

\begin{document}

\begin{align}\label{62}
\begin{split}
\delta_{\chi} \theta_{A}
&= \mathcal{L}_{Y} \theta_{A}-2 \kappa \partial_{A} T, \hspace{1
cm}  \delta_{\chi} \Omega_{AB} \mathrel{\llap{\smash{\color{red}\vrule
depth 3cm height 1ex}}{=}} \mathcal{L}_{Y}\Omega_{AB} , \\
\delta_{\chi} \lambda_{AB}
& = \mathcal{L}_{Y} \lambda_{AB} + \theta_{A} \partial _{B} T+
\theta_{B} \partial _{A} T - 2 \bar{\nabla}_{A}\bar{\nabla}_{B}
T,
\end{split}
\\
\label{63}
\begin{split}
\delta_{\chi} \psi_{v}
& = \mathcal{L}_{Y} \psi_{v}, \hspace{2.85 cm}  \delta_{\chi}
\varphi_{A} =\mathcal{L}_{Y}\varphi_{A}+ \varphi_{v}
\partial_{A} T+ \partial_{A} \hat{\lambda}, \\
\delta_{\chi} \psi_{A}
& = \mathcal{L}_{Y} \psi_{A} + \psi_{v} \partial_{A} T +
\Omega^{BC} \left( \partial_{A} \varphi_{B}-\partial_{B}
\varphi_{A} \right) \partial_{C}T,
\end{split}
\end{align}

\end{document}


The works as follows:

• \vrule produces a vertical rule, height and depth are specified via the following words height or depth
• \smash makes the contents appear to have height and depth zero
• \llap puts the contents in a box of width zero, with the contents sticking out the lefthand side (the rule is not very wide, but this makes a small difference)
• {=} treats = as an ordinary character, not a relation
• \mathrel treats its whole construct as a relation, reinstating the standard latex spacing.

If drawing the rule on + then use \mathbin instead of \mathrel, if on ordinary character, then \mathord (or no macro) is appropriate.

A solution wich ensures the alignment of the various = signs, so you don't need to control the spacings found by trial and error yield a correct alignment. I use two aligned environments nested in align, \mathrlap from mathtools and eqparbox. Also I defined a \barnabla command for a nicer bar accent on nabla:

\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{mathtools}
\usepackage{eqparbox}

\newcommand\leqmathbox[M]{\eqmakebox[#1][r]{$\displaystyle#2$}}
\newcommand\reqmathbox[R]{\eqmakebox[#1][l]{$\displaystyle#2$}}

\newcommand{\barnabla}{\mkern1mu\overline{\mkern-1mu\nabla\mkern-1mu}\mkern1mu}

\begin{document}

\begin{align}\label{62}
& \begin{aligned}\leqmathbox{\delta_{\chi} \theta_{A}} & = \mathcal{L}_{Y} \theta_{A}-2 \kappa \partial_{A} T, \\
\leqmathbox{\delta_{\chi} \lambda_{AB}} & = \mathrlap{\mathcal{L}_{Y} \lambda_{AB} + \theta_{A} \partial _{B} T+ \theta_{B} \partial _{A} T - 2\barnabla\!_A\barnabla\!_{B} T,}
\end{aligned}
& \begin{aligned}
\delta_{\chi} \Omega_{AB} & = \reqmathbox{\mathcal{L}_{Y}\Omega_{AB} ,} \\ {}
\end{aligned}
\\[1ex]
\label{63}
& \begin{aligned} \leqmathbox{\delta_{\chi} \psi_{v}} & = \mathcal{L}_{Y} \psi_{v}, \\
\leqmathbox{\delta_{\chi} \psi_{A}} & = \mathrlap{\mathcal{L}_{Y} \psi_{A} + \psi_{v} \partial_{A} T + \Omega^{BC} \left( \partial_{A} \varphi_{B}-\partial_{B} \varphi_{A} \right) \partial_{C}T,}
\end{aligned}
& \begin{aligned}
\delta_{\chi} \varphi_{A} & = \reqmathbox{\mathcal{L}_{Y}\varphi_{A}+ \varphi_{v} \partial_{A} T+ \partial_{A} \hat{\lambda},} \\ {}
\end{aligned}
\end{align}

\end{document} This does not sound like a good job for tex, but there are many programs that will easily show you guide lines on your screen to help align things.

One example for mac: XScope • Rlap+smash+rule is your friend – daleif Apr 22 '18 at 11:31
• @daleif I never doubted that it is possible in tex (everything is possible in tex), I just think it is not the job of tex to display such lines – samcarter_is_at_topanswers.xyz Apr 22 '18 at 11:33
• It is very useful if you suspect there is something wrong in an alignment. Good thing about this is that it follows along if you zoom in. It edit a fair bit and users do strange stuff. – daleif Apr 22 '18 at 11:34