我怎样才能获得像图中红色那样的垂直线?
以下是 LaTeX 代码(不含规则):
\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}
答案1
您可以添加\vrule
红色的但将其括在中,\smash
并使用以下内容修复类别=
,替换符号:
\mathrel{\llap{\smash{\color{red}\vrule depth 3cm height 1ex}}{=}}
您可以调整3cm
到您需要的深度。
\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}
作品如下:
\vrule
产生垂直规则,高度和深度通过以下词语指定height
或depth
\smash
使内容看起来高度和深度为零\llap
将内容放在宽度为零的框中,内容从左侧伸出(规则不是很宽,但这会产生细微的差别){=}
视为=
普通字符,而不是关系\mathrel
将其整个构造视为一种关系,恢复标准乳胶间距。
如果在 上绘制规则,+
则使用\mathbin
而不是\mathrel
,如果在普通字符上,则\mathord
(或不使用宏)是合适的。
答案2
解决方案确保各种符号对齐=
,因此您无需控制通过反复试验找到的间距即可获得正确的对齐。我使用aligned
嵌套在align
、\mathrlap
来自mathtools
和的两个环境eqparbox
。此外,我还定义了一个\barnabla
命令,以便在 nabla 上使用更好的小节重音:
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{mathtools}
\usepackage{eqparbox}
\newcommand\leqmathbox[2][M]{\eqmakebox[#1][r]{$\displaystyle#2$}}
\newcommand\reqmathbox[2][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}