I know this is not a minimal example, but I have to have this much code, in order to create my error. I had this error already several times and I cannot get rid of it?! I don't know where the problem is. Something is not correct with align and footnotes, at least this seems to be the reason for me?
Here is my code:
\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}
I get the error:
! Improper \halign inside $$'s. \halign
This is NOT due to a specific align environment, e.g. a typo error in an align environment, I have this problem throughout my complete thesis!
So it starts with an message like this and the number in the [] increases, it runs endless, what is my mistake?
– Stat Tistician Mar 15 '13 at 11:40