在我的文件的 PDF 版本中,当我单击目录的第一个条目时,它会转到标题页。如何解决此问题?
这是我的标题页:
\thispagestyle{empty}
\begin{titlepage}
\hspace{-1.5cm}
\centering
\vspace{1cm}
{\LARGE\noindent \textbf{TITLE OF MY WORK} \par}
\vspace{0.5cm}
%Thesis subtitle
{\Large\noindent \par}
\vspace{2cm}
\vspace{1cm}
{\Large
by}
\vspace{1cm}
{\LARGE\noindent MY NAME \par}
\vspace{1cm}
{\Large \noindent Submitted in partial fulfillment of the requirements for the degree of Master of Applied Science \par
\vspace{1cm}
April 2023}
\vfill
\hrule
\vspace{0.3cm}
{\Large\noindent \textcopyright Copyright by .....}
\end{titlepage}
\cleardoublepage
下面是我的目录(表格列表)第一个条目的代码:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%TABLE OF CONTENTS
\cleardoublepage
\pagenumbering{gobble}
\tableofcontents
\addtocontents{toc}{\textbf{\contentsname}\dotfill\thepage\par}
\cleardoublepage
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LIST OF TABLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
\thispagestyle{plain}
\addcontentsline{toc}{chapter}{List of Tables}{\pagestyle{plain}}
\pagenumbering{roman}
\setcounter{page}{1}
\setlength{\cftparskip}{1.5\baselineskip}
\listoftables
\cleardoublepage
答案1
\phantomsection
在前面添加\addcontentsline{toc}{chapter}{List of Tables}
,使链接指向表格列表页面。
试试这个代码:
\documentclass[12pt]{report}
\usepackage{tocloft}
\setlength{\cftparskip}{1.5\baselineskip}
\usepackage{hyperref} % added <<<<<<<<<<<<<
\hypersetup{%
colorlinks=true,
linkcolor=blue,
}
\begin{document}
\thispagestyle{empty}
\begin{titlepage}
\centering
\vspace{1cm}
{\LARGE\noindent \textbf{TITLE OF MY WORK} \par}
\vspace{0.5cm}
%Thesis subtitle
{\Large\noindent \par}
\vspace{2cm}
\vspace{1cm}
{\Large
by}
\vspace{1cm}
{\LARGE\noindent MY NAME \par}
\vspace{1cm}
{\Large \noindent Submitted in partial fulfillment of the requirements for the degree of Master of Applied Science \par
\vspace{1cm}
April 2023}
\vfill
\hrule
\vspace{0.3cm}
{\Large\noindent \textcopyright\ Copyright by .....}
\end{titlepage}
\cleardoublepage
\pagenumbering{roman} % added <<<<<<<<<<<<<
\tableofcontents
\cleardoublepage
\phantomsection % added <<<<<<<<<<<<<
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\cleardoublepage
\pagenumbering{arabic} % added <<<<<<<<<<<<<
\chapter{One}
Some text.
\begin{table}[ht!]
\caption{Artic Shipping Routes.}
\end{table}
\begin{table}[ht!]
\caption{Unique ships entering the Polar Code area 2013 and 2019. Source: adapted from PAME (2020)}
\end{table}
\chapter{Two}
Some more text.
\begin{table}[ht!]
\caption{Sea Ice Extent.}
\end{table}
\begin{table}[ht!]
\caption{Canadian Artic Classes and Ice type related to each of them. Source: Transport Canada (2017)}
\end{table}
\begin{table}[ht!]
\caption{Shipping Safety Control Zones.}
\end{table}
\chapter{Three}
Some text.
\begin{table}[ht!]
\caption{Artic Shipping Routes.}
\end{table}
\begin{table}[ht!]
\caption{Unique ships entering the Polar Code area 2013 and 2019. Source: adapted from PAME (2020)}
\end{table}
\chapter{Four}
Some more text.
\begin{table}[ht!]
\caption{Sea Ice Extent.}
\end{table}
\begin{table}[ht!]
\caption{Canadian Artic Classes and Ice type related to each of them. Source: Transport Canada (2017)}
\end{table}
\begin{table}[ht!]
\caption{Shipping Safety Control Zones.}
\end{table}
\end{document}