我正在使用 Texstudio 撰写论文,出现警告和错误,但我似乎找不到其来源。错误是Paragraph ended before \HyRef@autoref was complete
,Texstudio 说它在第 3 行:\usepackage{setspace}
。我不明白它怎么会出现在那里,除非hyperref
包造成了一些问题。我需要在包之前加载它吗setspace
?
警告是Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing '\gls'
,并且 Texstudio 引用了行{\scshape\LARGE Mechanical and Aerospace Engineering \par}
。这是什么意思?
以下是论文主页的完整代码:
\documentclass[10pt,twoside,a4paper]{report}
\usepackage{setspace}
\usepackage[hidelinks]{hyperref}
\usepackage[acronym,nopostdot,style=index,nonumberlist,nogroupskip,nomain]{glossaries-extra}
\usepackage{graphics}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{catoptions,booktabs,tabularx,ragged2e}
\usepackage{graphicx}
\usepackage{comment,array,url}
\usepackage{caption}
\usepackage[list=true]{subcaption}
\usepackage{siunitx}
\usepackage{multirow}
\usepackage{wrapfig}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage{framed}
\makeglossaries
\setabbreviationstyle[acronym]{long-short}
\loadglsentries{D:/Dropbox/NTU/Research/Resources/03_glossary.tex}
\graphicspath{{D:/Dropbox/NTU/Research/Resources/02_All_images/}{}}
\begin{document}
\glsunsetall
\pagenumbering{gobble}
\thispagestyle{empty}
\begin{titlepage}
\centering
\includegraphics[width=0.15\textwidth]{NTULogo.png}\par \vspace{1cm}
{\scshape\LARGE Mechanical and Aerospace Engineering \par}
\vspace{2.5cm}
{\huge\bfseries Investigation of coil springs made with additive manufacturing\par}
\vspace{2cm}
{\Large\itshape Enea Sacco\par}
\vfill
Supervised by\par
\textsc{Moon} Seung Ki (Asst. Prof)
\vfill
% Bottom of the page
{\large \today\par}
\end{titlepage}
\begin{comment}
\begin{abstract}
Blah blah blah
\end{abstract}
\end{comment}
%\section*{Acknowledgements}
%\addcontentsline{toc}{section}{Acknowledgement}
%\pagenumbering{roman}
\tableofcontents
\newpage
\listoffigures
\listoftables
\printglossary[type=\acronymtype]
\newpage
\setcounter{page}{1}
\pagenumbering{arabic}
\doublespacing
\glsresetall
\chapter{Introduction}\label{intro}
\include{intro}
\chapter{Literature review: 3D printing for the space sector}\label{3DP_for_space}
\include{3DP_for_space}
\chapter{Creation of an orthotropic model for PLA}\label{pla_testing}
\include{pla_testing}
\chapter{Multi-material finite element simulation of 3D printed materials}\label{fea_3dp_materials}
\include{fea}
\chapter{Exploration of 3D printed springs}\label{compression_springs}
\include{compression_springs}
\chapter{Strain oscillations in during slow tensile loading}\label{strain_oscillations}
\include{strain_oscillations}
\chapter{Derivation of an equation for the spring constant of 3D printed springs}\label{3dp_springs}
\include{3dp_springs}
\chapter{Conclusions and future work}\label{conc}
\include{conc}
\raggedright
\bibliography{D:/Dropbox/NTU/Research/Resources/01_General_bib}
\bibliographystyle{ieeetr}
\end{document}
答案1
好的,我查看了错误日志,发现我写的\autoref{bla)
不是\autoref{bla}
。这样就清除了所有错误和警告。阅读日志文件比查看 Texstudio 中的错误日志更有帮助。