书目和附录的书签级别低于章节级别?

书目和附录的书签级别低于章节级别?

在我的论文中,我将内容分成两部分,方便读者阅读。例如,我使用\part{1st Part}\part{2nd Part}来设置它们的标题。在论文的最后,我还添加了参考书目和附录,分别用\bibliography{}\begin{appendices}\end{appendices}来表示。

目录显示没问题。但是书签出现了一点小问题。\part因为零件级别、参考书目和附录见部分级别,因此参考书目及附录的书签均包含在第2部分书签中。

也许有人可以解决这个问题,以便参考书目和附录的书签不包含在第二部分的书签中?

下面展示了针对我的问题的一个小模板。

\documentclass[english,cd=nocolor]{tudscrreprt}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{adieresis={ä},germandbls={ß}}

\usepackage[ngerman,main=english]{babel}
\usepackage{bookmark}
\usepackage{blindtext}
\usepackage[title,toc,page]{appendix}

% start document
\begin{document}
\pagenumbering{roman}
\title{text}
\maketitle

\TUDoption{abstract}{section,multiple,notoc}

% new command is set to get the correct anchor of abstract in bookmark. The issure will be solved in the new release of tudscrreprt.
\newcommand*\tempheading{}
\begingroup
\begin{otherlanguage}{ngerman}
    \xdef\tempheading{\abstractname/}
\end{otherlanguage}
\xdef\tempheading{\tempheading\abstractname}
\endgroup

\phantomsection\addchaptertocentry{}{\tempheading}
\begin{abstract}[ngerman,pagestyle=plain]
    \blindtext
    \nextabstract[english]
    \blindtext
\end{abstract}

% Inhaltsverzeichnis
\tableofcontents

\cleardoubleemptypage
\pagenumbering{arabic}

% content
\chapter{ Introduction }
    \par This is the introduction.
    \section{ Motivation }
        \par This is motivation.
    \section{ Thesis outline }
        \par This is outline.

\part{1st Part}
    \chapter{ 1st chapter of 1st Part }
    \chapter{ 2nd chapter of 1st Part }
\part{2nd Part}
    \chapter{ 1st chapter of 2nd Part }
    \chapter{ 2nd chapter of 2nd Part }

%Bibliography
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{IEEEtran} %Durchnummeriert
\bibliography{reference}

%Appendices
\begin{appendices}
    This is the appendices
\end{appendices}


\end{document}

目录看起来很正常(但也不正确,因为目录之间没有换行符5.第二部分第二章参考书目

在此处输入图片描述

书签显示如下

在此处输入图片描述

提前致谢。

小迪

答案1

您可以使用

\bookmarksetup{startatroot}

\bibliography

补充说明:使用选项bibliography=totoc为参考书目添加目录条目。请勿手动添加条目。

在此处输入图片描述

代码:

\begin{filecontents*}{example-bib.bib}
@book{aristotle:physics, 
  author       = {Aristotle}, 
  title        = {Physics}, 
  date         = 1929, 
  translator   = {Wicksteed, P. H. and Cornford, F. M.}, 
  publisher    = {G. P. Putnam}, 
  shorttitle   = {Physics}, 
} 
\end{filecontents*}

\documentclass[english,cd=nocolor,
  bibliography=totoc% <- added
]{tudscrreprt}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{adieresis={ä},germandbls={ß}}

\usepackage[ngerman,main=english]{babel}
\usepackage{bookmark}
\usepackage{blindtext}
\usepackage[title,toc,page]{appendix}

% start document
\begin{document}
\pagenumbering{roman}
\title{text}
\maketitle

\TUDoption{abstract}{section,multiple,notoc}

%new command is set to get the correct anchor of abstract in bookmark. The issure will be solved in the new release of tudscrreprt.
\cleardoublepage
\newcommand*\tempheading{}
\begingroup
\begin{otherlanguage}{ngerman}
    \xdef\tempheading{\abstractname/}
\end{otherlanguage}
\xdef\tempheading{\tempheading\abstractname}
\endgroup
\phantomsection\addchaptertocentry{}{\tempheading}
\begin{abstract}[ngerman,pagestyle=plain]
    \blindtext
    \nextabstract[english]
    \blindtext
\end{abstract}
% Inhaltsverzeichnis
\tableofcontents
\cleardoubleemptypage
\pagenumbering{arabic}
% content
\chapter{ Introduction }
    \par This is the introduction.
    \section{ Motivation }
        \par This is motivation.
    \section{ Thesis outline }
        \par This is outline.
\part{1st Part}
    \chapter{ 1st chapter of 1st Part }
    \chapter{ 2nd chapter of 1st Part }
\part{2nd Part}
    \chapter{ 1st chapter of 2nd Part }
    \chapter{ 2nd chapter of 2nd Part }
%Bibliography
\nocite{aristotle:physics}
\bookmarksetup{startatroot}% <- added
\bibliographystyle{IEEEtran} %Durchnummeriert
\bibliography{example-bib}
%Appendices
\begin{appendices}
    This is the appendices
\end{appendices}
\end{document}

相关内容