表中出现未知错误

表中出现未知错误

在下面表格的代码中,编译后,在以“Not protest”开头的行中出现了红色标记的错误,尽管输出看起来还不错。你能指出错误所在吗?

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

答案1

在您提到的行 (以 'Not protest' 开头的行) 中,\Delta 后面的括号太多了。

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

答案2

一个错误

TeX 说

! 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$}'.

您希望 TeX 有多清晰?请学会阅读日志文件。

相关内容