章节中引用了错误的附录。应引用 A.1,而应引用 A。

章节中引用了错误的附录。应引用 A.1,而应引用 A。

我的问题是,当我引用附录中的一份文件时,它在章节内容中引用了错误的文件。例如,在“A”中引用了 blah blah。而它应该是“A.1”。附录中的每个文件相对于我作品的主要内容都落后 1。然而,奇怪的是,addtocontentsmain.tex文件中它按顺序显示。A.1、A.2、A.3 等。但就像我说的,它应该从 A.1 开始,而不是像我的目录页中显示的那样从 A 开始。

%----------------------------------------------------------------------------------------
%   DISSERTATION CONTENT - CHAPTERS
%----------------------------------------------------------------------------------------

\mainmatter % Begin numeric (1,2,3...) page numbering

\pagestyle{fancy} % Return the page headers back to the "fancy" style

% Include the chapters of the dissertation as separate files from the Chapters folder
% Uncomment the lines as you write the chapters

\input{Chapters/Chapter1}

%---------------------------------------------------------------------
%   DISSERTATION CONTENT - APPENDICES
%----------------------------------------------------------------------------------------

\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics

\appendix % Cue to tell LaTeX that the following 'chapters' are Appendices

% Include the appendices of the dissertation as separate files from the Appendices folder
% Uncomment the lines as you write the Appendices

\input{Appendices/AppendixA}
%\input{Appendices/AppendixB}
%\input{Appendices/AppendixC}

\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics

\backmatter

我还有一个单独的 .cls 文件,其中包含某些命令。与附录相关,如下所示:

\newcommand{\aref}[1]{Appendix~\ref{#1}}

我的 main.tex 中的示例:

\documentclass[11pt, a4paper, oneside]{Thesis}
%All my packages included here

\begin{document}
%All the contents and fancy thesis layout set here. Such as setting the title page, contents page, figures page, table page, chapter, appendices etc. Which will automatically appear.
\end{document}   

我的 Chapter1.tex 是这样开始的:

\chapter{Analysis}
\label{Analysis}
\lhead{Chapter 2. \emph{Analysis}}

\section{Overview}
The purpose of the Analysis chapter is to analyse different \ref{Web}...

该命令 \ref{} 自动查看我的 SupplementaryA.tex 文件以引用相关附录。

我的 appendiceA.tex 的开头是这样的:

% Appendix A
\vspace{2.0em}
\chapter{Appendix} % Main appendix title


\lhead{\emph{Terms of Reference}} % This is for the header on each page perhaps a shortened title

\label{TermsofReference} % Change X to a consecutive letter; for referencing this appendix elsewhere, use \ref{AppendixX}

\section{Terms of Reference}

因此我使用该\ref{}命令并将相关内容粘贴在命令的括号内\label{}

有人能帮我吗?这真的很烦人。当有人阅读我的作品时,他们总是会看我附录中的错误文档。抱歉,我对此很陌生,LaTeX并使用了论文模板来帮助我。

答案1

如果你想参考职权范围,放置标签 \section{Terms of Reference}

相关内容