我已经尝试过以下链接,但没有帮助:
以下是我的 mwe:
\documentclass[%
english,
cdfont=false,
cdtitle=color,
cdfont=nodin
]{tudscrreprt}
\usepackage[T1]{fontenc}
\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,bookmarksopenlevel=0,bookmarksnumbered=true,
hypertexnames=false,colorlinks,linkcolor={blue},citecolor={blue},urlcolor={black},]{hyperref}
\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\usepackage{isodate}
\usepackage{blindtext}
\usepackage{tudscrsupervisor}
\usepackage{enumitem}\setlist{noitemsep}
\usepackage[parfill]{parskip}% for no indentation in paragraphs
\usepackage{graphicx}
\usepackage{placeins}% for floatbarrier
\usepackage{caption}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{tabularx}
% \newcolumntype{C}{>{\flushleft\arraybackslash}}
\usepackage{subcaption}
\usepackage{makecell}% for multi-line cells in table
\usepackage{multirow}
\usepackage{arydshln}% for \hdashline -----------------
% \usepackage{titlesec}
\usepackage[toc,page]{appendix}% for appendix
% \usepackage{subfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TO MARKUP
% \usepackage[color=blue!30]{pdfcomment}%to disable add option [final]
%usage: \pdfmarkupcomment[color=yellow]{New text}{Comment or old text or whatever}
\usepackage[disable]{todonotes}% USAGE : \todo{Don't forget to put a real introduction here.}
\newcounter{todocounter}% TO ENUMERATE TODO LIST
\newcommand{\todonum}[2][]
{\stepcounter{todocounter}\todo[inline,size=\small,#1]{\thetodocounter: #2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NEW COMMANDS FOR THE DESIGN
\newcommand{\vco}{\emph{vco\_S3 }}
\newcommand{\vtoi}{\emph{vco\_v2i }}
\newcommand{\ro}{\emph{vco\_ro\_top }}
\newcommand{\clkbuf}{\emph{clkbuf }}
\newcommand{\rocap}{\emph{vco\_ro\_cap }}
\newcommand{\ampcap}{\emph{vco\_amp\_cap }}
\newcommand{\vcoamp}{\emph{vco\_amp\_S3 }}
\newcommand{\itoi}{\emph{vco\_i2i }}
\newcommand{\rostg}{\emph{vco\_ro\_4stage }}
\newcommand{\rols}{\emph{vco\_ro\_ls\_pin }}
\newcommand{\vdd}{\emph{VDD }}
\newcommand{\vsss}{\emph{VSS }}
\newcommand{\avdd}{\emph{AVDD }}
\newcommand{\avss}{\emph{AVSS }}
\newcommand{\fqdiv}{\emph{fqdiv\_top }}
\newcommand{\myro}{\emph{ro\_15\_stg }}
\newcommand{\mydiv}{\emph{div1X2 }}
\newcommand{\pll}{\emph{pll\_main }}
\newcommand{\lock}{\emph{lock }}
\newcommand{\lpf}{\emph{lpf }}
\newcommand{\pfdcp}{\emph{pfdcp }}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tocloft} %% it's needed to make my own something, i dont remember
\setcounter{secnumdepth}{\subparagraphnumdepth}
\setcounter{tocdepth}{\subparagraphnumdepth}
\cftsetindents{subsection}{3.8em}{2.5em}
\cftsetindents{subsubsection}{7em}{1em}% in em {indent}{numwidth}
\cftsetindents{paragraph}{7.5em}{5em}
\cftsetindents{subparagraph}{8em}{6em}
\usepackage{hyperref}
\begin{document}
\pagenumbering{roman}
\TUDoption{abstract}{section,multiple}
\begin{abstract}[pagestyle=empty.tudheadings]
\blindtext
\end{abstract}
\cleardoublepage
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents
\cleardoublepage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\cleardoublepage
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\vspace*{-10cm}
\lstlistoflistings
\addcontentsline{toc}{chapter}{List of Listings}
\clearpage
\pagenumbering{arabic} %%%%%%% RESETTING PAGE NUMBERING TO 1.
\chapter{Requirement/Limitation}
\section{Layout Dependancy}
\section{corner Dependancy}
\chapter{Performance on a Large Design}
\section{Design}
\begin{table}[ht!]
\centering
% \vspace*{-1.5em}
\renewcommand*{\arraystretch}{1.5}
\caption{Input output parameters of post layout simulation of \fqdiv}
\begin{small}
\begin{tabular}{l:l|l:l:l:l}
\hline
\multicolumn{2}{c:}{\textbf{Simulation Environment}} & \multicolumn{4}{c}{\textbf{Output}}\\\hdashline
\textbf{Parameter} & \textbf{Value} & \multicolumn{2}{c:}{\textbf{Layout-1}} & \multicolumn{2}{c}{\textbf{Layout-2}}\\\cdashline{3-6}
& & \textbf{FINT} & \textbf{FOUT} & \textbf{FINT} & \textbf{FOUT} \\\hline\hline
Solver method & \makecell[l]{\emph{\normalsize direct}\\provides highest accuracy} &&&&\\\cdashline{1-2}
IR & \makecell[l]{\emph{\normalsize max}\\IR-drop is maximum voltage of\\all subnodes at every time point} &&&&\\\cdashline{1-2}
EM & \makecell[l]{\emph{\normalsize iavg}\\calculates average current for\\EM analysis} &&&&\\\cdashline{1-2}
Lifetime & \makecell[l]{\emph{\normalsize 200000 hours}\\Aging time for EM analysis} &&&&\\\cdashline{1-2}
Box mode & \makecell[l]{\emph{Gray box}} &&&&\\\hline
\end{tabular}
\end{small}
\label{tab:chp-9-sec-1-tab-1}
\end{table}
\section{Results}
\chapter{Future Works}
\begin{appendices}
\clearpage
\pagenumbering{arabic}\renewcommand{\thepage}{\thechapter-\arabic{page}}
\chapter{Parasitic Extraction}
\chapter{Development of Box Methodology}
\blindtext
\end{appendices}
\newpage
\clearpage
\pagenumbering{Roman}
\end{document}
问题:
内容,图片列表 和表格列表链接到第 i 页。我该如何解决?
更新:
\usepackage{tocloft}
此包负责此行为。也不建议将其与 koma-script 一起使用。但我需要此包来执行以下几行:
\cftsetindents{subsection}{3.8em}{2.5em}
\cftsetindents{subsubsection}{7em}{1em}% in em {indent}{numwidth}
\cftsetindents{paragraph}{7.5em}{5em}
\cftsetindents{subparagraph}{8em}{6em}
tocbasic
有没有可以通过 koma-script解决这些问题的方法?
答案1
您应该\phantomsection
在宏之前添加\addcontentsline
:
\documentclass[%
english,
cdfont=false,
cdtitle=color,
cdfont=nodin
]{tudscrreprt}
\usepackage[T1]{fontenc}
\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,bookmarksopenlevel=0,bookmarksnumbered=true,
hypertexnames=false,colorlinks,linkcolor={blue},citecolor={blue},urlcolor={black},]{hyperref}
\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\usepackage{isodate}
\usepackage{blindtext}
\usepackage{tudscrsupervisor}
\usepackage{enumitem}\setlist{noitemsep}
\usepackage[parfill]{parskip}% for no indentation in paragraphs
\usepackage{graphicx}
\usepackage{placeins}% for floatbarrier
\usepackage{caption}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{tabularx}
% \newcolumntype{C}{>{\flushleft\arraybackslash}}
\usepackage{subcaption}
\usepackage{makecell}% for multi-line cells in table
\usepackage{multirow}
\usepackage{arydshln}% for \hdashline -----------------
% \usepackage{titlesec}
\usepackage[toc,page]{appendix}% for appendix
% \usepackage{subfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TO MARKUP
% \usepackage[color=blue!30]{pdfcomment}%to disable add option [final]
%usage: \pdfmarkupcomment[color=yellow]{New text}{Comment or old text or whatever}
\usepackage[disable]{todonotes}% USAGE : \todo{Don't forget to put a real introduction here.}
\newcounter{todocounter}% TO ENUMERATE TODO LIST
\newcommand{\todonum}[2][]
{\stepcounter{todocounter}\todo[inline,size=\small,#1]{\thetodocounter: #2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NEW COMMANDS FOR THE DESIGN
\newcommand{\vco}{\emph{vco\_S3 }}
\newcommand{\vtoi}{\emph{vco\_v2i }}
\newcommand{\ro}{\emph{vco\_ro\_top }}
\newcommand{\clkbuf}{\emph{clkbuf }}
\newcommand{\rocap}{\emph{vco\_ro\_cap }}
\newcommand{\ampcap}{\emph{vco\_amp\_cap }}
\newcommand{\vcoamp}{\emph{vco\_amp\_S3 }}
\newcommand{\itoi}{\emph{vco\_i2i }}
\newcommand{\rostg}{\emph{vco\_ro\_4stage }}
\newcommand{\rols}{\emph{vco\_ro\_ls\_pin }}
\newcommand{\vdd}{\emph{VDD }}
\newcommand{\vsss}{\emph{VSS }}
\newcommand{\avdd}{\emph{AVDD }}
\newcommand{\avss}{\emph{AVSS }}
\newcommand{\fqdiv}{\emph{fqdiv\_top }}
\newcommand{\myro}{\emph{ro\_15\_stg }}
\newcommand{\mydiv}{\emph{div1X2 }}
\newcommand{\pll}{\emph{pll\_main }}
\newcommand{\lock}{\emph{lock }}
\newcommand{\lpf}{\emph{lpf }}
\newcommand{\pfdcp}{\emph{pfdcp }}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tocloft} %% it's needed to make my own something, i dont remember
\setcounter{secnumdepth}{\subparagraphnumdepth}
\setcounter{tocdepth}{\subparagraphnumdepth}
\cftsetindents{subsection}{3.8em}{2.5em}
\cftsetindents{subsubsection}{7em}{1em}% in em {indent}{numwidth}
\cftsetindents{paragraph}{7.5em}{5em}
\cftsetindents{subparagraph}{8em}{6em}
\usepackage{hyperref}
\begin{document}
\pagenumbering{roman}
\TUDoption{abstract}{section,multiple}
\begin{abstract}[pagestyle=empty.tudheadings]
\blindtext
\end{abstract}
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\vspace*{-10cm}
\lstlistoflistings
\phantomsection
\addcontentsline{toc}{chapter}{List of Listings}
\clearpage
\pagenumbering{arabic} %%%%%%% RESETTING PAGE NUMBERING TO 1.
\chapter{Requirement/Limitation}
\section{Layout Dependancy}
\section{corner Dependancy}
\chapter{Performance on a Large Design}
\section{Design}
\begin{table}[ht!]
\centering
% \vspace*{-1.5em}
\renewcommand*{\arraystretch}{1.5}
\caption{Input output parameters of post layout simulation of \fqdiv}
\begin{small}
\begin{tabular}{l:l|l:l:l:l}
\hline
\multicolumn{2}{c:}{\textbf{Simulation Environment}} & \multicolumn{4}{c}{\textbf{Output}}\\\hdashline
\textbf{Parameter} & \textbf{Value} & \multicolumn{2}{c:}{\textbf{Layout-1}} & \multicolumn{2}{c}{\textbf{Layout-2}}\\\cdashline{3-6}
& & \textbf{FINT} & \textbf{FOUT} & \textbf{FINT} & \textbf{FOUT} \\\hline\hline
Solver method & \makecell[l]{\emph{\normalsize direct}\\provides highest accuracy} &&&&\\\cdashline{1-2}
IR & \makecell[l]{\emph{\normalsize max}\\IR-drop is maximum voltage of\\all subnodes at every time point} &&&&\\\cdashline{1-2}
EM & \makecell[l]{\emph{\normalsize iavg}\\calculates average current for\\EM analysis} &&&&\\\cdashline{1-2}
Lifetime & \makecell[l]{\emph{\normalsize 200000 hours}\\Aging time for EM analysis} &&&&\\\cdashline{1-2}
Box mode & \makecell[l]{\emph{Gray box}} &&&&\\\hline
\end{tabular}
\end{small}
\label{tab:chp-9-sec-1-tab-1}
\end{table}
\section{Results}
\chapter{Future Works}
\begin{appendices}
\clearpage
\pagenumbering{arabic}\renewcommand{\thepage}{\thechapter-\arabic{page}}
\chapter{Parasitic Extraction}
\chapter{Development of Box Methodology}
\blindtext
\end{appendices}
\newpage
\clearpage
\pagenumbering{Roman}
\end{document}
答案2
如果你确实想使用tocbasic
而不是tocloft
你应该使用\DeclareTOCStyleEntry
:
\DeclareTOCStyleEntry[indent=3.8em,numwidth=2.5em]{default}{subsection}
\DeclareTOCStyleEntry[indent=7em,numwidth=3.5em]{default}{subsubsection}
\DeclareTOCStyleEntry[indent=7.5em,numwidth=5em]{default}{paragraph}
\DeclareTOCStyleEntry[indent=8em,numwidth=6em]{default}{subparagraph}
嵌入到您的完整 MWE 中:
\documentclass[%
english,
cdfont=false,
cdtitle=color,
cdfont=nodin
]{tudscrreprt}
\usepackage[T1]{fontenc}
\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,bookmarksopenlevel=0,bookmarksnumbered=true,
hypertexnames=false,colorlinks,linkcolor={blue},citecolor={blue},urlcolor={black},]{hyperref}
\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\usepackage{isodate}
\usepackage{blindtext}
\usepackage{tudscrsupervisor}
\usepackage{enumitem}\setlist{noitemsep}
\usepackage[parfill]{parskip}% for no indentation in paragraphs
\usepackage{graphicx}
\usepackage{placeins}% for floatbarrier
\usepackage{caption}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{tabularx}
% \newcolumntype{C}{>{\flushleft\arraybackslash}}
\usepackage{subcaption}
\usepackage{makecell}% for multi-line cells in table
\usepackage{multirow}
\usepackage{arydshln}% for \hdashline -----------------
% \usepackage{titlesec}
\usepackage[toc,page]{appendix}% for appendix
% \usepackage{subfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TO MARKUP
% \usepackage[color=blue!30]{pdfcomment}%to disable add option [final]
%usage: \pdfmarkupcomment[color=yellow]{New text}{Comment or old text or whatever}
\usepackage[disable]{todonotes}% USAGE : \todo{Don't forget to put a real introduction here.}
\newcounter{todocounter}% TO ENUMERATE TODO LIST
\newcommand{\todonum}[2][]
{\stepcounter{todocounter}\todo[inline,size=\small,#1]{\thetodocounter: #2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NEW COMMANDS FOR THE DESIGN
\newcommand{\vco}{\emph{vco\_S3 }}
\newcommand{\vtoi}{\emph{vco\_v2i }}
\newcommand{\ro}{\emph{vco\_ro\_top }}
\newcommand{\clkbuf}{\emph{clkbuf }}
\newcommand{\rocap}{\emph{vco\_ro\_cap }}
\newcommand{\ampcap}{\emph{vco\_amp\_cap }}
\newcommand{\vcoamp}{\emph{vco\_amp\_S3 }}
\newcommand{\itoi}{\emph{vco\_i2i }}
\newcommand{\rostg}{\emph{vco\_ro\_4stage }}
\newcommand{\rols}{\emph{vco\_ro\_ls\_pin }}
\newcommand{\vdd}{\emph{VDD }}
\newcommand{\vsss}{\emph{VSS }}
\newcommand{\avdd}{\emph{AVDD }}
\newcommand{\avss}{\emph{AVSS }}
\newcommand{\fqdiv}{\emph{fqdiv\_top }}
\newcommand{\myro}{\emph{ro\_15\_stg }}
\newcommand{\mydiv}{\emph{div1X2 }}
\newcommand{\pll}{\emph{pll\_main }}
\newcommand{\lock}{\emph{lock }}
\newcommand{\lpf}{\emph{lpf }}
\newcommand{\pfdcp}{\emph{pfdcp }}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{tocloft} %% it's needed to make my own something, i dont remember
\setcounter{secnumdepth}{\subparagraphnumdepth}
\setcounter{tocdepth}{\subparagraphnumdepth}
%\cftsetindents{subsection}{3.8em}{2.5em}
%\cftsetindents{subsubsection}{7em}{1em}% in em {indent}{numwidth}
%\cftsetindents{paragraph}{7.5em}{5em}
%\cftsetindents{subparagraph}{8em}{6em}
\DeclareTOCStyleEntry[indent=3.8em,numwidth=2.5em]{default}{subsection}
\DeclareTOCStyleEntry[indent=7em,numwidth=3.5em]{default}{subsubsection}
\DeclareTOCStyleEntry[indent=7.5em,numwidth=5em]{default}{paragraph}
\DeclareTOCStyleEntry[indent=8em,numwidth=6em]{default}{subparagraph}
\usepackage{hyperref}
\begin{document}
\pagenumbering{roman}
\TUDoption{abstract}{section,multiple}
\begin{abstract}[pagestyle=empty.tudheadings]
\blindtext
\end{abstract}
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\vspace*{-10cm}
\lstlistoflistings
\phantomsection
\addcontentsline{toc}{chapter}{List of Listings}
\clearpage
\pagenumbering{arabic} %%%%%%% RESETTING PAGE NUMBERING TO 1.
\chapter{Requirement/Limitation}
\section{Layout Dependancy}
\subsection{Foo}
\subsubsection{Bar}
\paragraph{Baz}
\subparagraph{foobar}
\section{corner Dependancy}
\chapter{Performance on a Large Design}
\section{Design}
\begin{table}[ht!]
\centering
% \vspace*{-1.5em}
\renewcommand*{\arraystretch}{1.5}
\caption{Input output parameters of post layout simulation of \fqdiv}
\begin{small}
\begin{tabular}{l:l|l:l:l:l}
\hline
\multicolumn{2}{c:}{\textbf{Simulation Environment}} & \multicolumn{4}{c}{\textbf{Output}}\\\hdashline
\textbf{Parameter} & \textbf{Value} & \multicolumn{2}{c:}{\textbf{Layout-1}} & \multicolumn{2}{c}{\textbf{Layout-2}}\\\cdashline{3-6}
& & \textbf{FINT} & \textbf{FOUT} & \textbf{FINT} & \textbf{FOUT} \\\hline\hline
Solver method & \makecell[l]{\emph{\normalsize direct}\\provides highest accuracy} &&&&\\\cdashline{1-2}
IR & \makecell[l]{\emph{\normalsize max}\\IR-drop is maximum voltage of\\all subnodes at every time point} &&&&\\\cdashline{1-2}
EM & \makecell[l]{\emph{\normalsize iavg}\\calculates average current for\\EM analysis} &&&&\\\cdashline{1-2}
Lifetime & \makecell[l]{\emph{\normalsize 200000 hours}\\Aging time for EM analysis} &&&&\\\cdashline{1-2}
Box mode & \makecell[l]{\emph{Gray box}} &&&&\\\hline
\end{tabular}
\end{small}
\label{tab:chp-9-sec-1-tab-1}
\end{table}
\section{Results}
\chapter{Future Works}
\begin{appendices}
\clearpage
\pagenumbering{arabic}\renewcommand{\thepage}{\thechapter-\arabic{page}}
\chapter{Parasitic Extraction}
\chapter{Development of Box Methodology}
\blindtext
\end{appendices}
\newpage
\clearpage
\pagenumbering{Roman}
\end{document}
请注意,您可以使用toc
类选项:
\documentclass[toc=listof% list of figures and tables in toc
,toc=bib% bibliography in toc
]{tudscrreprt}