![将项目水平对齐到上面的等式](https://linux22.com/image/469514/%E5%B0%86%E9%A1%B9%E7%9B%AE%E6%B0%B4%E5%B9%B3%E5%AF%B9%E9%BD%90%E5%88%B0%E4%B8%8A%E9%9D%A2%E7%9A%84%E7%AD%89%E5%BC%8F.png)
我有一个等式和一个解释下面符号的列表。
问题:我希望这些项的左边距与等式的左边距相同。请参见下面的图片和 MWE。
平均能量损失
\documentclass[10pt,usenames,dvipsnames]{beamer}
\usepackage{tabularray}
\usepackage{bbm}
\begin{document}
\begin{frame}{TWFE Specification}
\begin{equation}
y_{rt} = \sum_{t=2007}^{2019} \beta_t \times \mathbbm{1}[year=t] \times \mathbbm{1}[D=1] + \gamma_r + \lambda_t + \varepsilon_{rt}
\end{equation}
\bigskip
{
\small
\begin{tblr}{
colspec={
@{}
Q[
preto={\hspace*{\leftmargini}},
appto={}
]
X
@{}
}
}
$y_{rt}$ & Outcome \\
$D$ & $1$ treatment \\
$\lambda_t$ & Year fixed effects \\
$\gamma_r$ & Region fixed effects \\
$\varepsilon_{rt}$ & Error term\\
\end{tblr}
}
\end{frame}
\end{document}
答案1
既然您无论如何都要使用表格进行解释,为什么不将整个等式作为表格的一部分呢?
\documentclass[10pt,usenames,dvipsnames]{beamer}
\usepackage{tabularray}
\UseTblrLibrary{counter}
\usepackage{bbm}
\begin{document}
\begin{frame}{TWFE Specification}
\begin{tblr}{
colspec={
@{}
Q[
preto={\hspace*{\leftmargini}},
appto={}
]
@{}X
@{}
},
column{1} = {mode=math},
row{1} = {mode=math},
row{2-Z} = {font=\small}
}
y_{rt} = & \displaystyle \sum_{t=2007}^{2019} \beta_t \times \mathbbm{1}[\text{year}=t] \times \mathbbm{1}[D=1] + \gamma_r + \lambda_t + \varepsilon_{rt}\refstepcounter{equation}\hfill (\theequation)\\[1cm]
y_{rt} & Outcome \\
D & $1$ treatment \\
\lambda_t & Year fixed effects \\
\gamma_r & Region fixed effects \\
\varepsilon_{rt} & Error term\\
\end{tblr}
\end{frame}
\end{document}