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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to write a simple single line equation of this kind: a = b + c = d + e + f. However, when I try to add the second identity ( = ), everything on its right side does not appear in the results. Following a piece of code here I used the &= for either the second identity or both the first and the second. Still I am doing something wrong. Here follows the code I am trying to use

\hat{{\varphi}_{it} (i_{it}, k_{it})} &= \hat{y_{it}} - \hat{{\beta}_{l}} l_{it} - \hat{{\vartheta}_{1}} X_{it} - \hat{{\vartheta}_{2}} Z_{it} &= \hat{{delta_{0}} + \sum{\sum{{\delta}_{ij} k_{t}^{i} i_{t}^{j}}} - \hat{{\beta}_{l}}l_{it} - \hat{{\vartheta}_{1}} X_{it} - \hat{{\vartheta}_{2}} Z_{it}

I get the 3 following error messages exactly, attributed to the line after the command \end{equation}:

 Paragraph ended before \mathaccent\/ was complete
 Missing $ inserted
 Display math should end with $$
share|improve this question
Welcome to TeX.sx! Please try to give the minimal working example (MWE) in which your problem occurs. Creating it is the first step in debugging and helps us tremendously in pin-pointing where the issue may lie. In particular it should start with \documentclass and end with \end{document}. – canaaerus Feb 25 '14 at 11:55
remove the & (equation is not an alignment environment) – David Carlisle Feb 25 '14 at 12:04
ok, sorry and thanks – Bob Feb 25 '14 at 12:39
Suggestion: when you have a long equation to write, do it a little bit at a time and compile each time. Then it will be easier to locate errors. – Ethan Bolker Feb 25 '14 at 13:10
up vote 0 down vote accepted

Is this what you try to obtain? The first approach is a pure/simple math environment, the second is use of array environment, and the third approach is use of align environment. This solution simplifies the code.

Note: There was an extra \hat on the second equation right after = without an ending } and was removed. Also a backslash was missing for delta in the second equation.

enter image description here



% -- case 1

\hat{\varphi}_{it} (i_{it}, k_{it}) =\hat{y}_{it} - \hat{\beta_l} l_{it} - \hat{\vartheta}_1 X_{it} - \hat{\vartheta}_2 Z_{it} \\
= \delta_0+ \sum{\sum{\delta_{ij} k_{t}^{i} i_{t}^{j}}} - \hat{\beta_l} l_{it} - \hat{\vartheta}_{1} X_{it} - \hat{\vartheta}_{2} Z_{it}

% -- case 2

\hat{\varphi}_{it} (i_{it}, k_{it}) &=\hat{y}_{it} - \hat{\beta_l} l_{it} - \hat{\vartheta}_1 X_{it} - \hat{\vartheta}_2 Z_{it} \\
&= \delta_0+ \sum{\sum{\delta_{ij} k_{t}^{i} i_{t}^{j}}} - \hat{\beta_l} l_{it} - \hat{\vartheta}_{1} X_{it} - \hat{\vartheta}_{2} Z_{it}

% --- case 3

\hat{\varphi}_{it} (i_{it}, k_{it}) &= \hat{y}_{it} - \hat{\beta_l} l_{it} - \hat{\vartheta}_1 X_{it} - \hat{\vartheta}_2 Z_{it} \\
&= \delta_0+ \sum{\sum{\delta_{ij} k_{t}^{i} i_{t}^{j}}} - \hat{\beta_l} l_{it} - \hat{\vartheta}_{1} X_{it} - \hat{\vartheta}_{2} Z_{it}

share|improve this answer
Ok thanks. What am I instead supposed to do if I want to put everything on the same line ? – Bob Feb 25 '14 at 12:42
OK just remove the \\ on the first line and remove the second &. You will get a one line equation. But it may exceed the text width. – Jesse Feb 25 '14 at 12:44
Of course you could remove the array environment in the first case, for example, and all the & out of the equation and still get a one line equation. – Jesse Feb 25 '14 at 12:48
Yes, in equation environment & does not work and shows error. But the \\ (if any) does not work either, all will continue to be typeset. – Jesse Feb 25 '14 at 13:01

Your Answer


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.