在等式中标记向下箭头

在等式中标记向下箭头

如何用 LaTex 写出这个方程式?

$$y_t^s=\underset{\underset{\scriptstyle\text{Output of firms with one year old contracts}{\scriptstyle\downarrow}}{\frac{1}{2}(P_t-w_t(t-1)+u_t)}+\underset{\underset{\scriptstyle\text{Output of firms with two year old contracts}{\scriptstyle\downarrow}}{\frac{1}{2}(P_t-w_t(t-2)+u_t)}$$

我写了这个,但却无法得到它。

在此处输入图片描述

答案1

输出

\documentclass[border = 1cm]{standalone}
\usepackage{amsmath} % For \text{...}
\begin{document}
  {$\arraycolsep=2ex
  \begin{array}{ccc}
    \dfrac{1}{2}[P_t - w_t(t-1) + u_t]              & + & \dfrac{1}{2}[P_t-w_t(t-2)+u_t]\\
    \Bigg\downarrow                                 &   & \Bigg\downarrow\\
    \text{\scriptsize Output of firms with workers} &   & \text{\scriptsize Output of firms with workers}\\
    \text{\scriptsize on one-year old contract}     &   & \text{\scriptsize on two-year (expiring) contract}\\
  \end{array}
  $}
\end{document}

答案2

这是我的建议

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[y_t=\underbrace{\frac{1}{2}[P_t-w_t(t-1)+u_t]}
_{\substack{\text{Output of firms with workers}\\\text{on one-year old contract}}}+
\underbrace{\frac{1}{2}[P_t-w_t(t-2)+u_t]}
_{\substack{\text{Output of firms with workers}\\\text{on two-year (expiring) contract}}}\]
\end{document}

在此处输入图片描述

不要用于$$显示方程式!

答案3

一种具有一些改进的变体 — — 特别是中等大小的分数nccmath和标志的正常间距+

\documentclass{article}
\usepackage{mathtools, nccmath}

\begin{document}

\[ y_t=\underset{\mathclap{\substack{ \rule{0.4pt}{2em}\\ \strut\text{Output of firms with workers}\\\text{on one-year old contract}}}}{\mfrac{1}{2}\bigl[P_t-w_t(t-1)+u_t\bigr]}
+
\underset{\mathclap{\substack{\rule{0.4pt}{2em}\\ \strut\text{Output of firms with workers}\\\text{on two-year (expiring) contract}}}}{\mfrac{1}{2}\bigl[P_t-w_t(t-2)+u_t\bigr]}
 \]

\end{document}

在此处输入图片描述

答案4

编辑

我的建议是tag这样的:

在此处输入图片描述

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools,graphicx}
\begin{document}
\[
y_t=\underset{\underset{\substack{\text{Output of firms with workers} \\ \text{on one-year old contract}}}{\rotatebox{-90}{$\xrightarrow{\makebox[1cm]{}}$}}}{\dfrac{1}{2}[P_t - w_t(t-1) + u_t]}+\underset{\underset{\substack{\text{Output of firms with workers} \\ \text{on two-year (expiring) contract}}}{\rotatebox{-90}{$\xrightarrow{\makebox[1cm]{}}$}}}{\dfrac{1}{2}[P_t-w_t(t-2)+u_t]}
\] 
\end{document}

或者您也可以使用tikz-cd,用于排版交换图以及用于其他事物......

在此处输入图片描述

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd,mathtools}
\begin{document}
\begin{tikzcd}[column sep=-.4cm]
{y_t=\dfrac{1}{2}[P_t - w_t(t-1) + u_t]}+ \arrow[d] & {\dfrac{1}{2}[P_t-w_t(t-2)+u_t]} \arrow[d] \\
\substack{\text{Output of firms with workers} \\ \text{on one-year old contract}} & \substack{\text{Output of firms with workers} \\ \text{on two-year (expiring) contract}}
\end{tikzcd}
\end{document}
cument} 

相关内容