我的报告中有很多附录 (pdf)。我想将它们称为 A.1、A.2.....等等。对于 A、B 和 C 来说,它们都运行正常,但是当我引用 C 下的任何附录时,输出 pdf 中的引用会打印为 C.3。
在我使用的代码中\ref{appendix:....}
\newpage
\pagenumbering{roman}
\appendix
\addtocontents{toc}{\protect\setcounter{tocdepth}{1}}
\noappendicestocpagenum
\renewcommand{\appendixtocname}{Vedlegg}
\addappheadtotoc
\includepdf[pages=1, pagecommand={\section{A}\label{appendix:A}},linktodoc=true]{A.pdf}
\newpage
\includepdf[pages = 1, scale = 0.72, fitpaper=true, pagecommand ={\section{B}\label{appendix:B}}, linktodoc = true]{B.pdf}
\newpage
\section{C}
\subsection{C.1}
\label{appendix:C.1}
\includegraphics[scale = 2]{C.1.jpg}
\newpage
\subsection{C.2}
\label{appendix:C.2}
\begin{center}
\includegraphics[scale = 0.8]{C.2.jpg}
\end{center}
\newpage
\subsection{C.3}
\includegraphics[scale = 0.9]{C.3.jpg}\label{appendix:C.3}
\newpage
\includepdf[pages = 1, scale = 0.65, fitpaper=true, pagecommand ={\section{D}\subsection{D.1}\label{appendix:D.1}}, linktodoc = true]{D.1.pdf}
\newpage
\includepdf[pages = 1, scale = 0.72, fitpaper=true, pagecommand ={\subsection{D.2}}\label{appendix:D.2}, linktodoc = true]{D.2.pdf}
答案1
我把标签贴在外面了\pagecomand{...}
。问题解决了!