「摘要」在書籤中出現兩次

「摘要」在書籤中出現兩次

我用德語用英文寫論文。所以我應該寫一篇德國摘要,然後寫一篇英文版本。但是當我在書籤中添加它們時,“摘要”出現兩次,也是“Zusammenfassung”(德國“摘要”)。請看下圖。書籤中的第一個「摘要」將索引文件的扉頁,這是錯誤的。第二個「摘要」可以正確索引內容,即文件的摘要。因此,書籤中的第一個「摘要」是錯誤的,應該刪除。有人可以解決嗎?提前致謝。

在此輸入影像描述

我使用Texstudio作為介面,miktex是發行版,plattform是windos10。源碼的寫法如下。

% !TeX document-id = {72e5695d-c860-48d1-aaec-bdabcc82c0dd}
% !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]

\documentclass[english, cd=nocolor]{tudscrreprt}
\usepackage[ngerman,main=english]{babel}
\usepackage{bookmark}

\begin{document}
Title page

\selectlanguage{ngerman}
\pagenumbering{roman}
% abstract
\TUDoption{abstract}{section}%{section, multiple}
\begin{abstract}
\thispagestyle{plain} % for page number
\begin{otherlanguage}{ngerman}
\par Germany abstract.
\end{otherlanguage}
\nextabstract[english]
\par    English abstract.
\end{abstract}

\selectlanguage{english}
% Inhaltsverzeichnis
\tableofcontents

% Inhalt
\pagenumbering{arabic}
\chapter{ Introduction }
\par This is the introduction.
\section{ Motivation }
\par This is motivation.
\section{ Thesis outline }
\par This is outline.
\end{document}

答案1

該課程有一個tocmultiple選項,您可以選擇僅獲得一個目錄條目。即與

\TUDoption{abstract}{section,tocmultiple}

你得到

程式碼的輸出

% !TeX document-id = {72e5695d-c860-48d1-aaec-bdabcc82c0dd}
% !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]

\documentclass[english, cd=nocolor]{tudscrreprt}
\usepackage[ngerman,main=english]{babel}
\usepackage{bookmark}

\begin{document}
Title page

\selectlanguage{ngerman}
\pagenumbering{roman}
% abstract
\TUDoption{abstract}{section,tocmultiple}
\begin{abstract}
\thispagestyle{plain} % for page number
\begin{otherlanguage}{ngerman}
Germany abstract.
\end{otherlanguage}
\nextabstract[english]
English abstract.
\end{abstract}

\selectlanguage{english}
% Inhaltsverzeichnis
\tableofcontents

% Inhalt
\pagenumbering{arabic}
\chapter{ Introduction }
\par This is the introduction.
\section{ Motivation }
\par This is motivation.
\section{ Thesis outline }
\par This is outline.
\end{document}

相關內容