我在用普林斯顿论文模板我想将我大学的 LOGO 添加到首页。我在 thesis.tex 文件的第 89 行添加了以下代码
\begin{center}
\includegraphics[width=0.3\textwidth]{figures/Logo_UzK_colour}
\end{center}
它可以工作,但是有错误
LaTeX Error: Missing \begin{document}.
但如果我使用
\begin{document}
latex 甚至无法编译该作业。我想我必须在puthesis.cls
文件中的某个地方定义徽标,但我对 latex 还很陌生,我不知道如何编写它。
答案1
您可以重新定义标题页以包含图像:
\makeatletter
\renewcommand{\maketitlepage}{{
\thispagestyle{empty}
\sc
\vspace*{0in}
\begin{center}% <- new
\includegraphics[width=0.3\textwidth]{example-image}% <- new
\end{center}% <- new
\begin{center}
\LARGE \@title
\end{center}
\vspace{.6in}
\extravspace{.6in}
\begin{center}
\@author
\end{center}
\vspace{.6in}
\extravspace{.6in}
\begin{center}
A Dissertation \\
Presented to the Faculty \\
of Princeton University \\
in Candidacy for the Degree \\
of Doctor of Philosophy
\end{center}
\vspace{.3in}
\extravspace{.3in}
\begin{center}
Recommended for Acceptance \\
by the \@deptpref \\
\@dept \\
Adviser: \@adviser
\end{center}
\vspace{.3in}
\extravspace{.3in}
\begin{center}
\@submitted
\end{center}
\clearpage
}}
\makeatother