由于 eqnarray、脚注、表格或标题而出现错误消息?

由于 eqnarray、脚注、表格或标题而出现错误消息?

我知道这不是一个最小示例,但我必须有这么多代码,才能产生我的错误。我已经多次遇到过这个错误,但我无法摆脱它?!我不知道问题出在哪里。对齐和脚注有些不正确,至少这似乎是我的原因?

这是我的代码:

\documentclass[a4paper, 
        12pt,                               
        bibliography=totoc,     
        index=totoc,    
        abstracton,     
        headsepline,    
        ]{scrreprt}
\usepackage{latexsym}           
\usepackage[latin1]{inputenc}   
\usepackage[ngerman,english]{babel}   
\usepackage{amsmath} 
\usepackage{subfig}     
\usepackage{float}      
\usepackage{graphicx}       
\usepackage{rotating}   
\usepackage{mathrsfs}
\usepackage{eurosym,bm,amsmath,amssymb,verbatim}
\usepackage{listings}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage [round,authoryear] {natbib}
\usepackage{amsthm}
\usepackage{graphicx,eso-pic,lipsum}
\usepackage{url}
\usepackage{tikz}
\usepackage{tocstyle}
\usetocstyle{allwithdot} 
\usepackage[bookmarksopen,hyperfootnotes=false,pdftitle=test, pdfauthor=test,pdfsubject=test]{hyperref}
\usepackage{fancyhdr}
\usepackage{listings} 
\usepackage{remreset} 
\makeatletter
\@removefromreset{footnote}{chapter}
\makeatother
\usepackage{dblfnote} 
\usepackage{booktabs} 
\KOMAoption{footnotes}{multiple} 
\usepackage[top=2cm,bottom=2cm]{geometry}
 \usepackage{cleveref} 


\definecolor{headercolor}{rgb}{0,0,0}
\definecolor{white2}{rgb}{255,255,255}



\begin{document}                    



\begin{titlepage}
test

\end{titlepage}

\onehalfspacing 

\fancypagestyle{plain}{%
  %% Clear all headers and footers
  \fancyhf{}
\fancyhead[L]{\hspace{5.5mm}\textcolor{white2}{\leftmark}\\ \text{ }\textcolor{white2}{\hspace{0.4cm}\rightmark}\hfill\textcolor{white2}{}\hspace{2mm}}
\renewcommand{\headrule}{\vspace{-\headheight}\textcolor{white2}{\vrule height \headheight width 2pt\relax\rule{\textwidth}{2pt}\vrule height \headheight width 2pt\relax}}
\fancyfoot[C]{-\thepage -}
}

\pagestyle{fancy}
\fancyhf{}
%\renewcommand{\chaptername}{}
\renewcommand{\chaptermark}[1]{%
\markboth{\MakeUppercase{\thechapter. \hspace{1.5mm} \  #1}}{}}


\fancyhead[L]{\hspace{5.5mm}\textcolor{headercolor}{\leftmark}\\ \text{ }\textcolor{headercolor}{\hspace{0.4cm}\rightmark}\hfill\textcolor{headercolor}{}\hspace{2mm}}
\renewcommand{\headrule}{\vspace{-\headheight}\textcolor{headercolor}{\vrule height \headheight width 2pt\relax\rule{\textwidth}{2pt}\vrule height \headheight width 2pt\relax}}
\fancyfoot[C]{-\thepage -}

\begin{appendix}
\clearpage
\chapter{Appendix}


\subsection[Text]{Text}
\label{parameterestimation}
text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[pp. 7-8]{Author1:1993}}. text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. 4]{Author2:2002}}.

\subsubsection[Textn]{Text}
text texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. 4] {Hazewinkel:2002}}.
\paragraph{ML}\footnote{Text \citep[p. 12-13]{A:2006}}
text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text
\begin{align*}
54=54
\end{align*}
and the log likelihood by
\begin{align*}
54=54
\end{align*}
vtext texttext texttext texttext texttext texttext text
\begin{align*}
54=54
\end{align*}
text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[p. 3] {Author1:2006} text texttext text}. text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. Details] {Author2}}. text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. Details] {RDocumentationoptim}} text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. Details] {RDocumentationfitdistr}}). \\ \newline
text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[p. 53] {Ruppert:2004}}:
\begin{align*}
54 = 45
\end{align*}
text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[p. 7] {Steenbergen:2006}}:

  \end{appendix}



\clearpage
\fancyhead[L]{\hspace{4mm}\textcolor{headercolor}{}\text{ }\textcolor{headercolor}{\rightmark}\hfill\textcolor{headercolor}{}\hspace{2mm}}
\renewcommand{\headrule}{\vspace{-\headheight}\textcolor{headercolor}{\vrule height \headheight width 2pt\relax\rule{\textwidth}{2pt}\vrule height \headheight width 2pt\relax}}
\fancyfoot[C]{-\thepage -}

\end{document}  

我收到错误:

!$$ 内的 \halign 不正确。\halign

这不是由于特定的对齐环境造成的,例如对齐环境中的拼写错误,我的整个论文中都存在这个问题!

答案1

这不是一个答案,但是......我把你的代码压缩为

\documentclass[12pt]{scrreprt}
\usepackage{setspace}
\usepackage{dblfnote}
\usepackage{booktabs}

%------------------------------------------------------------------------

\textheight245mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\onehalfspacing

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\footnote{text}
\begin{table}[h]
\begin{tabular}{llr}
\toprule
a & b & c \\
a & b & c \\
a & b & c \\
a & b & c \\
a & b & c \\
a & b & c \\
a & b & c \\
\bottomrule
\end{tabular}
\end{table}
test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text 
text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text 
text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test 
test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text 
text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text 
text test test test test text text text test test test test 
text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text.
\subsection{Sec}

test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text
\footnote{text}
\footnote{text}
\begin{eqnarray}
a & = & b
\end{eqnarray}
test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text\footnote{text} text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text test test test test text text text.
\footnote{text}
\begin{eqnarray}
a & = & b
\end{eqnarray}
\end{document}

除了\textheight手动设置之外,这看起来没什么问题。更改任何细节都会让错误消失,所以我猜这里一定有什么可疑之处。我为其他人提供这个作为更好的起点。

答案2

这不是一个完整的答案,但它包含所需的 MWE 和一些注释。另外,请注意,由于该错误消息而到达此处的其他人可能会有兴趣查看:修改 \everydisplay 导致 align* 环境停止工作

以下是 MWE 和一些有关它的注释。

\documentclass{scrreprt}
\usepackage{dblfnote}
\begin{document}
  This seems to be a irrelevant\footnote{footnote one}

  \vspace*{20cm}

  \hspace*{14cm} text text\footnote{footnote two}\footnote{footnote three}
\begin{eqnarray}
a & = & b
\end{eqnarray}
\end{document}

上述代码会产生错误。我猜想这与页面末尾附近的换行符、软件包dblfnoteeqnarray环境有关。让我们看看。

将“text text”替换为“xxxxxxxxxxx”,代码将编译时不会出错,即使对于任何其他值也是如此hspace。但是,更改可以连字符的“text text”单词(如“important”)将导致错误。

更改\hspace*{14cm}\hspace*{13cm}不会产生错误,即使我们将 的值更改vspace为其他任何值(对于较大的值,文本将无法正确显示,但 LaTeX 不会抱怨)。另一方面,保持\hspace*{14cm}(或更大)并将\vspace值减小到\vspace*{20cm}不会产生错误。

这很令人费解...

相关内容