当我添加包时模板不起作用

当我添加包时模板不起作用

我正在使用我的学校模板(你可以在这里找到它:https://www.overleaf.com/project/62f50d65cfee1198bb5f2e7e)。这很完美,我可以填写所有内容并将我的文本粘贴到其中,它看起来很好。

但是当我添加我正在使用的包时,什么都没有显示(主页上没有图片,没有布局,什么都没有)

我将这样的包添加到文档中:

\documentclass[a4paper,12pt]{book}

% Load the VUB package.
% This has many options, please read the documentation at
% https://gitlab.com/rubdos/texlive-vub
\usepackage{bruface}
\usepackage[utf8]{inputenc}
\usepackage{titling}
\usepackage{amsmath}
\usepackage{graphicx}
\graphicspath{ {./img/} }
\usepackage{todonotes}
\usepackage[
  separate-uncertainty = true,
  multi-part-units = repeat
]{siunitx}
\usepackage{cite}
\usepackage{natbib}
\usepackage{caption}
\usepackage{float}

% Some highly suggested packages, please read their manuals.
%\usepackage{cleveref}
%\usepackage[natbib,style=apa]{biblatex}
%\addbibresource{bibliography.bib}


\title{mytitle}
\pretitle{\flushleft{Graduation thesis submitted in partial fulfilment of the requirements for the degree of engineering sciences: Applied Sciences and Engineering: Applied Computer Science }}
\author{name}
\date{2021-2022}
\supervisor{Prof.blabla}
\programme{Applied Sciences and Engineering: Applied Computer Science}

% Pick one:
% \programme{Architectural Engineering}
%\programme{Chemical and Materials Engineering}
%\programme{Civil Engineering}
%\programme{Electrical Engineering}
%\programme{Electromechanical Engineering}

\begin{document}
\frontmatter
\maketitle%

\chapter{Abstract}
etc....
Your abstract would go here.

\tableofcontents%

\mainmatter%
\part{First part}%

Optionally, you use parts, and those parts contain chapters.

\part{Second Part}%

Optionally, you use parts, and those parts contain chapters.

\backmatter%
\chapter{Conclusion}

%\printbibliography%
\end{document}

错误如下:

  • LaTeX 错误:命令 @pretitle 已定义。(我检查过,它只定义了一次)

  • LaTeX 错误:缺少 \begin{document} 但我已经定义了它,并且同样,无需使用我添加的以下内容,它就可以正常工作:

\usepackage[utf8]{inputenc}
\usepackage{titling}
\usepackage{amsmath}
\usepackage{graphicx}
\graphicspath{ {./img/} }
\usepackage{todonotes}
\usepackage[
  separate-uncertainty = true,
  multi-part-units = repeat
]{siunitx}
\usepackage{cite}
\usepackage{natbib}
\usepackage{caption}
\usepackage{float}

有谁知道这可能是什么原因造成的?

答案1

@David Carlisle 和 @John Kormylo 两位用户都说得对。我删除了重复的 \documentclass 语句以及不兼容的包titling,现在一切都正常了。

相关内容