2

How to write this equation in 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)}$$

I wrote this, but couldn't get it.

enter image description here

Henam
  • 323

4 Answers4

5

This is my proposal

\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}

enter image description here

Please do not use $$ for display equations!

4

Output

\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}
M. Al Jumaily
  • 4,035
  • 2
  • 11
  • 26
3

A variant with some improvements – in particular medium-size fractions from nccmath and the normal spacing for the + sign:

\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}

enter image description here

Bernard
  • 271,350
2

EDIT:

My proposal with the tag is this:

enter image description here

\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}

or you could use also tikz-cd, used to typeset commutative diagrams and also for other things....

enter image description here

\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} 
Sebastiano
  • 54,118