書籤導致錯誤的部分/頁面

書籤導致錯誤的部分/頁面

我是乳膠新手。我目前正在用背頁寫論文,由於某種原因,自動生成的書籤沒有指向相應的部分。以下是我的論文格式與標準論文格式之間的一些主要差異:

  1. 我的大學有特殊的封面/扉頁格式。其字體為 Verdana。我手動建立了封面和標題頁的 pdf 並將其插入到我的論文中,而不是讓 Latex 為我產生一個。

  2. 對於摘要、致謝、目錄、圖表等,我的大學需要羅馬頁碼,而對於正文,我的大學需要阿拉伯頁碼。

  3. 對於非正文部分,我的大學不允許使用運行標題,但正文需要運行標題。

  4. 這就是為什麼我使用 fancyhf 在不同頁面格式之間切換的原因。但不幸的是,除了我的結果部分之外,我文件中的所有其他部分都由於某種原因導致我的封面。

我已嘗試根據以下答案解決\phantomsection \addcontentsline{toc}{section}{Summary}\renewcommand{\summaryname}{Summary}問題連結未指向正確的頁面書籤連結到不正確的頁面,雖然書籤可以指向正確的部分,但會失去部分標題。此外,我不知道這種方法是否適用於小節和段落。

我可以用你的大腦來解決這個問題嗎?為什麼結果部分的書籤是唯一具有功能的書籤?太感謝了!

\usepackage{graphicx}
\usepackage{hyperref} 
\hypersetup{
    colorlinks=true,
    linkcolor=black,
    filecolor=magenta,
    urlcolor=black,
    citecolor=black,
}
\usepackage{bookmark}
\usepackage[english]{babel}
\usepackage[ansinew]{inputenc}
\usepackage{csquotes}
\usepackage[tocbib,bibnewpage]{apacite} 
\usepackage{multicol}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage[table,xcdraw]{xcolor}
\usepackage{fancyhdr}
\usepackage{lineno}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{geometry}
\usepackage{pdfpages}
\usepackage{rotating} % <-- HERE
\usepackage{lscape}
\usepackage{caption}
\usepackage{ltablex}
\usepackage[referable]{threeparttablex}
\usepackage{threeparttable}[normal]
\usepackage{tabularx}



%\documentclass{article}
\usepackage{fontspec}%déjà chargé par luatextra
\defaultfontfeatures{Ligatures=TeX} % to have the automatics ligatures of TeX




\pagestyle{fancy}
\fancyhf{}
\rhead{\thepage}
\lhead{}


\fancypagestyle{main}{
\fancyhf{}
\lhead{\small\small THESIS}
\rhead{\thepage} 
}

\geometry{
    left=2.5cm,
    right=2.5cm,
    top=2.5cm,
    bottom=2.5cm
}

% only necessary to change shorttitle as it is part of the header
\title{title}
\shorttitle{THESIS}
\author{name}
\affiliation{XXX UNIVERSITY}
\course{Masterthesis}
\professor{professor}
\duedate{\today}
\usepackage{titlesec}

    \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
    \titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
    \titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

\begin{document}
\setstretch{1.5}  % 1.5 line spacing
\setromanfont{Verdana}


% --------------COVER------------------------

\thispagestyle{empty}

% --------------COVER PAGE------------------------

\begin{coverpage}
\includepdf{cover}
\end{coverpage}

%\vspace*{0cm}

% --------------BLANK PAGE------------------------

 \clearpage\null\thispagestyle{empty}\clearpage
 
% --------------BLANK PAGE------------------------

 \clearpage\null\thispagestyle{empty}\clearpage

% --------------BLANK PAGE------------------------

 \clearpage\null\thispagestyle{empty}\clearpage
   
% --------------TITLE PAGE------------------------
% insert pdf due to special title page formatting

\begin{titlepage}
\includepdf{cover}
\end{titlepage}


% --------------BLANK PAGE------------------------

 \clearpage\null\thispagestyle{empty}\clearpage
 
 \clearpage
 

 \setromanfont{Times New Roman}
\pagenumbering{Roman}
 \pagestyle{fancy}
\Some {\fontsize{11}{15}\selectfont % font size 11
 \setstretch{1.5}} % line spacing 1.5

\section{Summary}
\section{Acknowledgements}

\pdfbookmark[section]{\contentsname}{toc}
\renewcommand\contentsname{Table of Contents}
\tableofcontents
 
\phantomsection
\addcontentsline{toc}{section}{List of Tables}
\listoftables

\clearpage
\pagestyle{main}

  \pagenumbering{arabic}
    \setcounter{page}{1}
    \pagestyle{main}
    %\fancyhf{}
    %\fancyhead[R]{\thepage}
   \setlength{\parskip}{0.1mm}
    \raggedbottom
    \nopagebreak

\section{1. Introduction}
\section{2. Methods}
\section{3. Results}
\section{4. Discussion}
\section{5. Conclusion}

\end{document}```

相關內容