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.

In the code for a table below, there is an error indicated by the red marker in the line starting with "Not protest" after compilation, although the output seems pretty much okay. Can you pinpoint the mistake please?

\documentclass{article}
%\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{calc}
\usepackage{tabu}
\begin{document}

\begin{table}[h]

\centering

\begin{tabular}{|c|c|c|}

\hline
 & $N^{e}$ \textless $K_i$ & $N^{e} \geq T_i$\\
\hline
 Not protest & $ -\Delta U $ & $(1-\gamma) \cdot \Delta U}$ \\
\hline
Protest & $-(k/N^{e})-\Delta$ U& $\Delta U - (k/N^{e})$\\
\hline

\end{tabular}

\caption{Payoff matrix}

\end{table}

\end{document}
share|improve this question
1  
It's becuse you have a close bracket without the open pair after \Delta in line 22. –  OSjerick May 20 '12 at 20:43
1  
It'd be nice if the people who downvoted and voted to close left a quick explanatory note here .. (not saying I agree or disagree, just general polite policy) –  doncherry May 20 '12 at 21:38
    
@doncherry As also I voted to close. The closing reason below usually tells it: it's unlikely that the question would help any future visitors. Here, it's just a missing brace in some specific code. Addition for the OP: no additional answers (beside one comment and two answers, all telling the same) are needed, about that brace, so we close. –  Stefan Kottwitz Aug 20 '12 at 10:52
add comment

closed as too localized by egreg, Marco Daniel, percusse, Martin Schröder, Stefan Kottwitz Aug 20 '12 at 10:45

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 4 down vote accepted

You have a bracket too much after the \Delta in the line you mentioned (the one starting with 'Not protest'.

\begin{table}[h]
\centering

\begin{tabular}{|c|c|c|}

\hline
 & $N^{e} < K_i$ & $N^e \geq T_i$\\
\hline
 Not protest & $ -\Delta U $ & $(1-\gamma) \cdot \Delta U$ \\
\hline
Protest & $-(k/N^{e})-\Delta U$ & $\Delta U - (k/N^e)$\\
\hline

\end{tabular}
\caption{Payoff matrix}
\end{table}
share|improve this answer
1  
Andreas, you should correct the other mistakes in the code. I mean the over-usage of math mode / text mode. The correct first line is & $N^{e} < K_i$ & $N^{e} \geq T_i$\\ and the last line Protest & $-(k/N^{e})-\Delta U$ & $\Delta U - (k/N^{e})$\\ –  tohecz May 20 '12 at 20:52
    
And I don't agree on "forgot to open the bracket" -- he forgot to remove the bracket. Posting half-answers is not a good way to improve the LaTeX knowledge of its unexperienced users. As well, answers should be kept clean from sentences like "Next time you should ..." since these should be comments to the question. –  tohecz May 20 '12 at 20:59
    
I was going over it again and changed that, thanks –  Andreas Wallner May 20 '12 at 21:03
    
Thanks, my friends! –  Abhimanyu Arora May 20 '12 at 21:10
    
@Abhimanyu Arora: btw. since you are already using booktabs, you might want to try the table with the commands provided by it, it seems to me to be much more readable (using \toprule, etc. as mentioned in the booktabs documentation) –  Andreas Wallner May 20 '12 at 21:13
add comment

an error?

TeX says

! Extra }, or forgotten $.
l.22 ... -\Delta U $ & $(1-\gamma) \cdot \Delta U}
                                                  $ \\
? h
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

How much clearer do you want TeX to be? Learn to read the log file, please.

share|improve this answer
    
Thanks Martin, do you suggest a link where I could learn to read and understand errors, warnings etc in a log file? –  Abhimanyu Arora May 20 '12 at 21:28
    
@AbhimanyuArora: Any reasonable introduction to LaTeX? The LaTeX manual by Lamport has a section on the error messages by LaTeX, but this one is produced by TeX directly. You could try the TeXbook, but I don't recommend that if you are mainly using high-level LaTeX. –  Martin Schröder May 20 '12 at 21:31
add comment

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