# align with text

I have some equations into the aligning environment and i want below them to write something. But in the same time also want those to be aligned. In particular Imagine that I want or i could do this

\begin{align}
\mathrm{E_{0}\sum_{t=0}^{\infty}} & \beta^t U(c_{it}) \;\;  \\
c_{it} + d_{it+1} + x_{it} & = y_{it} - w_tl_{it} + (1+r_t)d_{it}  \\
\text{The budget constraint & of the entrepreneur} \nonumber \\
y_{it} & = f(k_{it}, l_{it}, z_{it})  \\
\text{The technology that &  the entrepreneur operates} \nonumber \\
k_{it+1} & = x_{it} - (1-\delta)k_{it}  \\
\text{the linear technology &that transforms final goods to investment goods} \nonumber\\
d_{it} & \leq \theta k_{it} \\
\text{collateral & constraint} \nonumber \\
z_{it} & \sim \text{exogenous random process drawn from} \;\; \psi(z)
\end{align}


of course latex gives me errors since i have the & inside the \text{}. Can someone propose an alternative that latex can produce ?

-
Tried splitting up the \text{} segments? e.g.: \text{The budget constraint} & \text{of the entrepreneur} – 1010011010 Aug 7 '14 at 16:57
Good idea, yes it works. thx – user17880 Aug 7 '14 at 17:04

Are you sure using the \intertext (or \shortintertext) command is not preferable? I don't see what has to be aligned in your texts. Anyway this is what I propose:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{align}
\mathrm{E_{0}\sum_{t=0}^{\infty}}  &  \beta^t U(c_{it}) \;\;  \\
c_{it} + d_{it+1} + x_{it} & = y_{it} - w_tl_{it} + (1+r_t)d_{it}  \\
\intertext{The budget constraint  of the entrepreneur}
y_{it} & = f(k_{it}, l_{it}, z_{it})  \\
\intertext{The technology that  the entrepreneur operates}
k_{it+1} & = x_{it} - (1-\delta)k_{it}  \\
\intertext{the linear technology that transforms final goods to investment goods}
d_{it} & \leq \theta k_{it} \\
\intertext{collateral constraint}
z_{it} & \sim \text{exogenous random process drawn from} \;\;\psi(z)
\end{align}

\end{document}


With \shortintertext:

-
This is great and actually what i was looking for. Thanks – user17880 Aug 7 '14 at 17:25

The \intertext command is what you want. You can keep the equations aligned at the = or ~ signs whereas the text goes between them. Here is a MWE to illustrate the usage of \intertext command:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
1 &=2\\
\intertext{aaa}
a+b&=c+d\\
\intertext{dont't forget that $$1=1$$}
0.5&=\frac{1}{2}
\end{align}

\end{document}


the output is then:

If it happens that you need the text to be centered also, just put \centering between the braces of \intertext{\centering .....}.

-

One way of solving this is to end the \text command before the & and start a new one after the &.

To get the space correct, start the new \text{} with a space. i.e. \text{ text}. Your code (tested with pdflatex) would then be like this:

\begin{align}
\mathrm{E_{0}\sum_{t=0}^{\infty}} & \beta^t U(c_{it}) \;\;  \\
c_{it} + d_{it+1} + x_{it} & = y_{it} - w_tl_{it} + (1+r_t)d_{it}  \\
\text{The budget constraint} &\text{ of the entrepreneur} \nonumber \\
y_{it} & = f(k_{it}, l_{it}, z_{it})  \\
\text{The technology that} &\text{ the entrepreneur operates} \nonumber \\
k_{it+1} & = x_{it} - (1-\delta)k_{it}  \\
\text{the linear technology} &\text{ that transforms final goods to investment goods} \nonumber\\
d_{it} & \leq \theta k_{it} \\
\text{collateral} &\text{ constraint} \nonumber \\
z_{it} & \sim \text{exogenous random process drawn from} \;\; \psi(z)
\end{align}

-