Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 ?

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

3 Answers 3

up vote 5 down vote accepted

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} 

enter image description here

With \shortintertext:

enter image description here

share|improve this answer
    
This is great and actually what i was looking for. Thanks –  user17880 Aug 7 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 \begin{equation}1=1\end{equation}}
0.5&=\frac{1}{2}
\end{align}

\end{document}

the output is then:

enter image description here

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

share|improve this answer

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} 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.