编译错误-要报告的文章

编译错误-要报告的文章

以下给出了编译错误 - 请帮忙。(当我将文档类型设为报告而不是文章,并且相应地将章节设为章节而不是节,将节设为小节等时,不会出现错误。)

    \documentclass[12pt]{article}
    \usepackage[english]{babel}
    \usepackage{natbib}
    \usepackage{url}
    \usepackage[utf8x]{inputenc}
    \usepackage{graphicx}
    \graphicspath{{images/}}
    \usepackage{parskip}
    \usepackage{fancyhdr}
    \usepackage{vmargin}
    \setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
    \usepackage{amsmath, amsthm, amsfonts, amssymb, gensymb}
    \usepackage{graphics,color}
    \usepackage{bm}

    \title{Rotating laser level - article}          % Title
    \author{G.V Bunge }             % Author
    \date{\today}                                           % Date

    \makeatletter
    \let\thetitle\@title
    \let\theauthor\@author
    \let\thedate\@date
    \makeatother

    \pagestyle{fancy}
    \fancyhf{}
    \rhead{\theauthor}
    \lhead{\thetitle}
    \cfoot{\thepage}

    \begin{document}

    \begin{titlepage}
\centering
\vspace*{0.5 cm}
\includegraphics[scale = 0.75]{UCT.jpg}\\[1.0 cm]   % University Logo
\textsc{\LARGE University of Cape Town}\\[2.0 cm]   % University Name
\textsc{\Large APG4003Z}\\[0.5 cm]              % Course Code
\textsc{\large Research Project}\\[0.5 cm]              % Course Name
\rule{\linewidth}{0.2 mm} \\[0.4 cm]
{ \huge \bfseries \thetitle}\\
\rule{\linewidth}{0.2 mm} \\[1.5 cm]

\begin{minipage}{0.4\textwidth}
    \begin{flushleft} \large
        \emph{Author:}\\
        \theauthor
        \end{flushleft}
        \end{minipage}~
        \begin{minipage}{0.4\textwidth}
        \begin{flushright} \large
        \emph{Student Number:} \\
        BNGGER001                               % Your Student Number
    \end{flushright}
\end{minipage}\\[2 cm]

{\large \thedate}\\[2 cm]

\vfill

    \end{titlepage}

    \pagenumbering{gobble}
    \tableofcontents
    \newpage
    \pagenumbering{Roman}

    \section*{Declaration of Authorship}
    \addcontentsline{toc}{chapter}{Declaration of Authorship}

    \section*{Ethics Form}
    \addcontentsline{toc}{chapter}{Ethics Form}

    \section*{Acknowledgements}
    \addcontentsline{toc}{chapter}{Acknowledgements}

    \section*{Abstract}
    \addcontentsline{toc}{chapter}{Abstract}

    \section*{List of Terms}
    \addcontentsline{toc}{chapter}{List of Terms}

    \section*{List of Figures}
    \addcontentsline{toc}{chapter}{List of Figures}

    \section*{List of Tables}
    \addcontentsline{toc}{chapter}{List of Tables}

    \cleardoublepage

    \pagenumbering{arabic}

    \section{Introduction}

    \subsection{Background to Research}

    \subsection{Objective of Research}

    \subsection{Research Question}

    \subsection{Research Methods}

    \subsection{Scope of Research}

    \section{Literature Review}
    \subsection{Instruments}
    \subsubsection{Precise Level}
    \subsubsection{Dumpy Level}
    \subsubsection{Theodolite}
    \subsubsection{Rotational Laser Level}
    \subsubsection{Stabila LAR 350 Rotational Laser Level}
    \subsection{Refraction}
    \subsubsection{Atmospheric Pressure}
    \subsubsection{Temperature}

    \subsection{Signals}
    \subsubsection{Infra-red Light}
    \subsubsection{Visible Light}

    \subsection{Experimental Method}

    \section{Theory}
    \subsection{Instruments}
    \subsubsection{Precise Level}
    \subsubsection{Dumpy Level}
    \subsubsection{Theodolite}
    \subsubsection{Rotational Laser Level}
    \subsubsection{Stabila LAR 350 Rotational Laser Level}
    \subsection{Refraction}
    \subsubsection{Atmospheric Pressure}
    \subsubsection{Temperature}

    \subsection{Signals}
    \subsubsection{Infra-red Light}
    \subsubsection{Visible Light}

    \subsection{Experimental Method}


    \section{Methodology of Research}
    \subsection{Instruments}
    \subsubsection{Precise Level}
    \subsubsection{Dumpy Level}
    \subsubsection{Theodolite}
    \subsubsection{Rotational Laser Level}
    \subsubsection{Stabila LAR 350 Rotational Laser Level}
    \subsection{Refraction}
    \subsubsection{Atmospheric Pressure}
    \subsubsection{Temperature}

    \subsection{Signals}
    \subsubsection{Infra-red Light}
    \subsubsection{Visible Light}

    \subsection{Experimental Method}


    \section{Results}


    \section{Analysis}


    \section{Conclusion}


    \cite{bibtex}

    \section{Appendices}


    \bibliographystyle{bibstyle}

    \bibliography{biblist}


    \end{document}

答案1

您正在手动添加目录,但为未定义的级别\section*添加它们chapterarticle

    \addcontentsline{toc}{chapter}{Declaration of Authorship}
                          ^^^^^^^^

这需要section

相关内容