我在用经典论文并使用parts
、chapters
和准备我的文档sections
。这将产生以下内容目录。
我想修复一些细节:
- 较长的
part
数字会进入part
名称中。(以红色突出显示) - 我想控制后续
chapter
条目之间的距离(以绿色突出显示)。因此,chapter
后续条目section
不应受到影响。(以黄色突出显示) Part
条目应该有一条虚线sections
。parts
、和 的页码字体大小chapters
应该sections
是可以调整的。
最后但同样重要的一点是,这里是 MWE 来测试一下。
\documentclass[oneside, openright, titlepage, dottedtoc, numbers=noenddot,
headinclude, footinclude=true, cleardoublepage=empty, abstractoff, BCOR=5mm,
paper=a4, fontsize=11pt, ngerman] {scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[pdfspacing]{classicthesis}
\usepackage[dvipsnames]{xcolor}
\usepackage{lipsum,kantlipsum}
\hypersetup{
colorlinks=true, % false: boxed links; true: colored links.
linktocpage=true, % Moves the clickable link to the page numbers.
linkcolor=OliveGreen % Color of internal links.
}
\begin{document}
\tableofcontents
\part{Baden-Württemberg} \chapter{Stuttgart} \chapter{Mannheim}
\part{Bayern} \chapter{Muenchen} \chapter{Nuernberg}
\part{Berlin}
\chapter{Berlin}
\section{Charlottenburg-Wilmersdorf}\clearpage
\section{Friedrichshain-Kreuzberg}\clearpage
\section{Lichtenberg}\clearpage
\section{Marzahn-Hellersdorf}\clearpage
\section{Mitte}\clearpage
\section{Neukoelln}\clearpage
\section{Pankow}\clearpage
\section{Reinickendorf}\clearpage
\section{Spandau}\clearpage
\section{Steglitz-Zehlendorf}\clearpage
\section{Tempelhof-Schoeneberg}\clearpage
\section{Treptow-Koepenick}\clearpage
\part{Brandenburg} \chapter{Potsdam} \chapter{Cottbus}
\part{Bremen} \chapter{Bremen}
\part{Hamburg} \chapter{Hamburg}
\part{Hessen} \chapter{Wiesbaden} \chapter{Frankfurt}
\part{Mecklenburg-Vorpommern} \chapter{Schwerin} \chapter{Rostock}
\part{Niedersachsen} \chapter{Hannover} \chapter{Braunschweig}
\part{Nordrhein-Westfalen} \chapter{Duesseldorf} \chapter{Koeln}
\part{Rheinland-Pfalz} \chapter{Mainz} \chapter{Ludwigshafen}
\part{Saarland} \chapter{Saarbruecken}
\part{Sachsen} \chapter{Dresden} \chapter{Leipzig}
\part{Sachsen-Anhalt}\chapter{Magdeburg}\chapter{Halle}
\part{Schleswig-Holstein}\chapter{Kiel}\chapter{Luebeck}
\part{Thüringen} \chapter{Erfurt} \chapter{Jena}
\end{document}
答案1
classicthesis
内部使用tocloft
包来设计 ToC,因此您可以轻松实现您想要的;您所要做的就是玩
\cftbeforechapskip
改变章节前的垂直跳过。\cftpartpagefont
更改部分页码的字体。\cftchappagefont
更改章节页码的字体。\cftsecpagefont
更改章节页码的字体。\cftpartdotsep
控制零件条目的领导者。\cftpartaftersnumb
在零件编号之间添加空格。
一个小例子说明这些长度/命令的用法:
\documentclass[oneside, openright, titlepage, dottedtoc, numbers=noenddot,
headinclude, footinclude=true, cleardoublepage=empty, abstractoff, BCOR=5mm,
paper=a4, fontsize=11pt, ngerman] {scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[pdfspacing]{classicthesis}
\usepackage[dvipsnames]{xcolor}
\usepackage{lipsum,kantlipsum}
\hypersetup{
colorlinks=true, % false: boxed links; true: colored links.
linktocpage=true, % Moves the clickable link to the page numbers.
linkcolor=OliveGreen % Color of internal links.
}
\setlength{\cftbeforechapskip}{0.1em} % change vertical skip before chapters
\renewcommand{\cftpartpagefont}{\Large}% change the font for part page numbers
\renewcommand{\cftchappagefont}{\Large}% change the font for chapter page numbers
\renewcommand{\cftsecpagefont}{\Large}% change the font for section page numbers
\renewcommand{\cftpartdotsep}{\cftdotsep}% add leaders for part entries
\renewcommand{\cftpartleader}{\normalfont\normalsize\cftdotfill{\cftpartdotsep}
}% change the font for part leader dots (not boldfaced)
\renewcommand{\cftpartaftersnumb}{\hspace*{0.5em}}% add space between part number and part title
\begin{document}
\tableofcontents
\part{Baden-Württemberg} \chapter{Stuttgart} \chapter{Mannheim}
\part{Bayern} \chapter{Muenchen} \chapter{Nuernberg}
\part{Berlin}
\chapter{Berlin}
\section{Charlottenburg-Wilmersdorf}\clearpage
\section{Friedrichshain-Kreuzberg}\clearpage
\section{Lichtenberg}\clearpage
\section{Marzahn-Hellersdorf}\clearpage
\section{Mitte}\clearpage
\section{Neukoelln}\clearpage
\section{Pankow}\clearpage
\section{Reinickendorf}\clearpage
\section{Spandau}\clearpage
\section{Steglitz-Zehlendorf}\clearpage
\section{Tempelhof-Schoeneberg}\clearpage
\section{Treptow-Koepenick}\clearpage
\part{Brandenburg} \chapter{Potsdam} \chapter{Cottbus}
\part{Bremen} \chapter{Bremen}
\part{Hamburg} \chapter{Hamburg}
\part{Hessen} \chapter{Wiesbaden} \chapter{Frankfurt}
\part{Mecklenburg-Vorpommern} \chapter{Schwerin} \chapter{Rostock}
\part{Niedersachsen} \chapter{Hannover} \chapter{Braunschweig}
\part{Nordrhein-Westfalen} \chapter{Duesseldorf} \chapter{Koeln}
\part{Rheinland-Pfalz} \chapter{Mainz} \chapter{Ludwigshafen}
\part{Saarland} \chapter{Saarbruecken}
\part{Sachsen} \chapter{Dresden} \chapter{Leipzig}
\part{Sachsen-Anhalt}\chapter{Magdeburg}\chapter{Halle}
\part{Schleswig-Holstein}\chapter{Kiel}\chapter{Luebeck}
\part{Thüringen} \chapter{Erfurt} \chapter{Jena}
\end{document}
然而,規劃他在评论中指出,作者classicthesis
精心设计了包装以产生预期的布局,因此必须小心不要破坏整体设计。
为了防止单个部分条目出现在页面中(如示例中的“法兰克福”),可以说
\addtocontents{toc}{\protect\enlargethispage{\baselineskip}}
例如紧接着\chapter{Stuttgart}
……