错误!使用表环境时,\@firstoftwo 的参数有一个额外的 }

错误!使用表环境时,\@firstoftwo 的参数有一个额外的 }

我有一个主文件论文:

\documentclass{report}

在此文件中,我加载了由我的大学制作的用于设置的软件包。我还加载了其他标准软件包。

此外,我使用以下命令在主文件论文中加载一个名为 chptr1 的子文件:

\input{chptr1}

在子文件 chptr1 中,我有一个章节标题、几个章节和一个包含以下表格的段落:

\chapter{Chapter 1}

This is chapter 1

\section{Section 1}

This is section 1
\begin{itemize}
\item
... 
\end{itemize}

\subsection{Subsection 1}

\subsubsection{Subsubsection 1}

\paragraph{Paragraph 1}

This is Paragraph 1

\begin{itemize}
\item
...
\end{itemize}

\begin{table}[t] 

  \begin{center} 

   \begin{tabular}{|l|l|l|l|} % error occurs here!

       A & B & C & D  \\
       \hline
       1 & 2 & 3 & 4  \\
       \hline  
   \end{tabular}

  \end{center}

\caption{This is the Caption for Table 1}

\end{table}

This is equation \ref{eqtn: 1}. 

\begin{equation}
\label{eqtn: 1}
\end {equation}

\begin{itemize}
\item
...
\end{itemize}

\paragrpah{Paragraph 2}

This is paragraph 2

因此,当使用此代码在段落中设置表格时,我总是收到以下错误:

  • ! \@firstoftwo 的参数有一个额外的 }
! Argument of \@firstoftwo has an extra }.
<inserted text>
\par
l.50 \begin{tabular} {|c|c|c|c|}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Runaway argument?
  • !段落在 \@firstoftwo 完成之前结束。
! Paragraph ended before \@firstoftwo was complete.
<to be read again>
\par
l.50 \begin{tabular} {|c|c|c|c|}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
  • ! \reserved@b 的参数有一个额外的 }。
! Argument of \reserved@b has an extra }.
<inserted text>
\par
l.50 \begin{tabular} {|c|c|c|c|}
I've run across a `}' that doesn't seem to match anything.  
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Runaway argument?
{\@xtabularcr }\futurelet \@let@token \@ifnch \\ Zonder voorafgaande \ETC.
  • ! 段落在 \reserved@b 完成之前结束。
! Paragraph ended before \reserved@b was complete.
<to be read again>
\par
l.50 \begin{tabular} {|c|c|c|c|}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
)
  • ! 不完整 \iffalse;第 50 行之后的所有文本均被忽略。\fi\input{hfdst2}
! Incomplete \iffalse; all text was ignored after line 50.
<inserted text>
\fi
l.95 \input{hfdst2}
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.
)
  • ! 不完整 \iffalse;第 24 行之后的所有文本均被忽略。\fi<>thesis.tex
! Incomplete \iffalse; all text was ignored after line 50.
<inserted text>
\fi
<*> thesis.tex
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

这些错误与代码中指示的行有关。

我也尝试将表格复制粘贴到主文件,但仍然出现相同的错误。所以我认为问题不一定与代码直接相关?

如何解决这个问题?

相关内容