是否可以对齐所有下划线文本

是否可以对齐所有下划线文本

我的代码如下:

\documentclass{book}
\usepackage{amsmath}

\begin{document}


\begin{equation}
\underset{\text{consumption}}{\underset{\uparrow}{\underset{}{C_{t}^{j}}}%
}+\underset{\text{net financial savings}}{\underbrace{\underset{}{A_{t}%
^{j}-A_{t-1}^{j}}}}\ =\ \underset{\text{disposable income}}{\underbrace
{\underset{\text{asset income}}{\underbrace{\underset{}{r_{t-1}A_{t-1}^{j}}}%
}\ +\ \underset{\text{labor income}}{\underbrace{\underset{}{\frac{W_{t}%
}{P_{t}}L_{t}^{j}}}}-\underset{\text{taxes (minus transfers)}}{\underset
{\uparrow}{\underset{}{T_{t}^{j}}}.}}} \label{2 - CB}%
\end{equation}

\end{document}

输出如下:

在此处输入图片描述

我需要将括号下的所有文本对齐为标记。请提出建议...

答案1

一种可能性是采用 TiZ 和 tikzmark 就是这样的。

\documentclass{book}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,tikzmark,calc}
\begin{document}
\begin{equation}
\quad\tikzmark{1a} C_{t}^{j}\tikzmark{1b}\quad
+\quad\tikzmark{2a} A_{t}^{j}-A_{t-1}^{j}\tikzmark{2b}
\quad=\quad 
\tikzmark{3a}r_{t-1}A_{t-1}^{j}\tikzmark{3b}\quad
+\quad\tikzmark{4a}\frac{W_{t}}{P_{t}}L_{t}^{j}\tikzmark{4b}\qquad
-\qquad \tikzmark{5a}T_{t}^{j}\tikzmark{5b}\;.
\end{equation}
\begin{tikzpicture}[overlay,remember picture,decoration={brace}]
\draw[thick,decorate] ([yshift=-10pt]pic cs:2b) -- ([yshift=-10pt]pic cs:2a)
node[midway,below,font=\scriptsize](nfs){net financial savings};
\draw[thick,decorate] ([yshift=-10pt]pic cs:3b) -- ([yshift=-10pt]pic cs:3a)
node[midway,below,font=\scriptsize](ai){asset income};
\draw[thick,decorate] ([yshift=-10pt]pic cs:4b) -- ([yshift=-10pt]pic cs:4a)
node[midway,below,font=\scriptsize](li){labor income};
\path ($(pic cs:1a)!0.5!(pic cs:1b)$) coordinate (X1)
($(pic cs:5a)!0.5!(pic cs:5b)$) coordinate (X5);
\node[font=\scriptsize] at (X1|-nfs) (c) {consumption};
\node[font=\scriptsize] at (X5|-nfs) (t) {taxes (minus transfers)};
\draw[->] (c) -- ([yshift=-3pt]X1);
\draw[->] (t) -- ([yshift=-3pt]X5);
\draw[thick,decorate]  ([yshift=-2pt]t.south east) -- ([yshift=-2pt]ai.south
west)node[midway,below,font=\scriptsize](di){disposable income};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容