Debian Codegraph @

texmf-dist/doc/latex/ksp-thesis/ksp-thesis.tex

raw
1 %%% ===========================================================================
2 %%% EXTERNAL FILES
3 %%% ===========================================================================
4 \begin{filecontents}{pkgloader-additional.sty}
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 %
7 % A list of recommended rules derived from
8 % <http://mirrors.ctan.org/graphics/pgf/contrib/tikz-3dplot/tikz-3dplot_documentation.pdf>:
9 %
10 % \begin{macrocode}
11 \Load {tikz-3dplot} late
12 if loaded
13 because {the tikz-3dplot documentation
14 explicitly says to do so}
15 % \end{macrocode}
16 %
17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18
19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20 %
21 % A list of recommended rules derived from
22 % <http://www.matthiaspospiech.de/latex/vorlagen/allgemein/preambel>:
23 %
24 % \begin{macrocode}
25 \Load {graphicx} early if loaded
26 \Load {relsize} early if loaded
27 \Load {ragged2e} early if loaded
28 \Load {amsmath} before {pst-pdf} if loaded
29 \Load {ltxtable} after {hyperref} if loaded
30 % \end{macrocode}
31 %
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 \end{filecontents}
34 \begin{filecontents}{solarized.sty}
35 \usepackage[x11names, rgb, html]{xcolor}
36
37 % Solarized colors
38 \definecolor{sbase03}{HTML}{002B36}
39 \definecolor{sbase02}{HTML}{073642}
40 \definecolor{sbase01}{HTML}{586E75}
41 \definecolor{sbase00}{HTML}{657B83}
42 \definecolor{sbase0}{HTML}{839496}
43 \definecolor{sbase1}{HTML}{93A1A1}
44 \definecolor{sbase2}{HTML}{EEE8D5}
45 \definecolor{sbase3}{HTML}{FDF6E3}
46 \definecolor{syellow}{HTML}{B58900}
47 \definecolor{sorange}{HTML}{CB4B16}
48 \definecolor{sred}{HTML}{DC322F}
49 \definecolor{smagenta}{HTML}{D33682}
50 \definecolor{sviolet}{HTML}{6C71C4}
51 \definecolor{sblue}{HTML}{268BD2}
52 \definecolor{scyan}{HTML}{2AA198}
53 \definecolor{sgreen}{HTML}{859900}
54 \end{filecontents}
55 \begin{filecontents}{solarized-light.sty}
56 \usepackage{solarized}
57 \usepackage{listings}
58
59 \lstset{
60 % How/what to match
61 sensitive=true,
62 % Border (above and below)
63 frame=lines,
64 % Extra margin on line (align with paragraph)
65 xleftmargin=\parindent,
66 % Put extra space under caption
67 belowcaptionskip=1\baselineskip,
68 % Colors
69 backgroundcolor=\color{sbase3},
70 basicstyle=\color{sbase00}\ttfamily,
71 keywordstyle=\color{scyan},
72 commentstyle=\color{sbase1},
73 stringstyle=\color{sblue},
74 numberstyle=\color{sviolet},
75 identifierstyle=\color{sbase00},
76 % Break long lines into multiple lines?
77 breaklines=true,
78 % Show a character for spaces?
79 showstringspaces=false,
80 tabsize=2
81 }
82 \end{filecontents}
83
84 %%% ===========================================================================
85 %%% DOCUMENT PREAMBLE
86 %%% ===========================================================================
87 \RequirePackage[additional]{pkgloader} % manage options and loading order of packages
88 \RequirePackage[l2tabu,orthodox]{nag} % issue warnings for deprecated code
89 \PassOptionsToPackage{pdftex}{graphicx}
90 \PassOptionsToPackage{num}{isodate}
91 \PassOptionsToPackage{nochapter}{vhistory}
92 \PassOptionsToPackage{svgnames,table}{xcolor}
93
94 %%% Document class and generic options
95 %%% ===========================================================================
96 \documentclass[%
97 american,
98 ]{scrartcl}
99
100 %%% Language and encoding
101 %%% ---------------------------------------------------------------------------
102 \usepackage[utf8]{inputenc} % Datei-Kodierung (benötigt für Umlaute)
103 % latin9 (ISO-8859-9) = latin1+"Euro sign"
104 \usepackage[TS1,T1]{fontenc} % Schrift-Kodierung
105 \usepackage{babel} % Rechtschreibung, Silbentrennung etc.
106
107 %%% Load packages
108 %%% ===========================================================================
109 \usepackage{solarized-light} % solarized color scheme for listings
110 %%% NOTE: The package loading order is organized by <pkgloader>, comments on
111 %%% when to load packages are merely informational
112 %%% Fonts and symbols
113 %%% ---------------------------------------------------------------------------
114 \usepackage[osf,sc]{mathpazo} % Adobe Palatino, 'mathpazo' in equations
115 \linespread{1.05} % >> increase linespread for Palatino
116 \renewcommand{\sfdefault}{iwona} % Iwona (sans-serif)
117 \usepackage[scaled=0.85]{beramono} % Bera Mono (monospace)
118 \usepackage{fontawesome} % web-related icons
119 %%% Typesetting
120 %%% ---------------------------------------------------------------------------
121 \usepackage{csquotes} % context sensitive quotation facilities
122 \usepackage{ellipsis} % fix space around ellipses (\dots), load after <hyperref>
123 \usepackage{enumitem} % customized lists (incompatible(?) with glossaries)
124 \usepackage{isodate} % date formatting
125 \usepackage{listings} % source code printer for LaTeX
126 \usepackage{microtype} % micro-typographic extensions of pdfTEX
127 \usepackage{ragged2e} % improved ragged text
128 % >> load early
129 \usepackage{relsize} % relative text sizes
130 % >> load early
131 \usepackage{siunitx} % unit and number typesetting
132 %%% Tables
133 %%% ---------------------------------------------------------------------------
134 \usepackage{array} % improved array- and tabular-environments
135 \usepackage{booktabs} % professional table typesetting
136 %%% Math
137 %%% ---------------------------------------------------------------------------´
138 \usepackage{amsmath} % various math typesetting improvements
139 % >> load before <pst-pdf>
140 \usepackage{mathtools} % extends <amsmath> and fixes some bugs
141 %%% Development tools
142 %%% ---------------------------------------------------------------------------
143 \usepackage{accsupp} % better accessibility support for PDF files (experimental)
144 \usepackage{blindtext} % blindtext macros
145 \usepackage{fixltx2e} % bug fixes for LaTeX2e
146 %%% Graphics, color, boxes
147 %%% ---------------------------------------------------------------------------
148 \usepackage{keystroke} % graphical representation of the keys on a computer keyboard
149 \usepackage{tcolorbox} % coloured and framed text boxes with a heading line
150 %%% Lists and Bibliographies
151 %%% ---------------------------------------------------------------------------
152 \usepackage{makeidx} % create an index
153 %%% References and Links
154 %%% ---------------------------------------------------------------------------
155 \usepackage{hyperref} % hyperlinks and pdf setup
156 \usepackage{cleveref} % automatic references
157 % >> load after <hyperref> because <cleveref> adds special supportfor this package
158 \LoadPackagesNow
159
160 %%% Document meta data
161 %%% ===========================================================================
162 \newcommand{\doctitle}{The \texttt{ksp-thesis} class}
163 \newcommand{\docsubtitle}{A \LaTeX\ class for theses published with KIT Scientific Publishing}
164 \newcommand{\docauthor}{David Heinze}
165 \newcommand{\docauthoremail}{http://exergie100.de/en/contact/}
166 \newcommand{\docsubject}{\docsubtitle}
167 \newcommand{\dockeywords}{LaTeX, class, dissertation, thesis, KIT, KIT Scientific Publishing, ClassicThesis, ArsClassica}
168 \newcommand{\doctime}{\today}
169
170 %%% Package settings
171 %%% ===========================================================================
172 %%% <hyperref>
173 %%% ---------------------------------------------------------------------------
174 \hypersetup{%
175 hidelinks, % no border, no special color
176 breaklinks=true, % enable breakable links
177 hypertexnames=true, % use guessable names for links
178 linktocpage=true, % table of contents links to pages
179 hyperfootnotes=false, % no links to footnotes
180 bookmarksopenlevel=1,
181 bookmarksopen=true,
182 bookmarksnumbered=true,
183 plainpages=false, % Anchors even on plain pages ?
184 pageanchor=true, % Pages are linkable
185 pdftitle={\doctitle},
186 pdfauthor={\docauthor, \docauthoremail},
187 pdfkeywords={\dockeywords},
188 pdfpagelabels=true, % set PDF page labels
189 pdfpagemode=UseOutlines, % show bookmarks on start
190 pdfstartpage=1, % page at which PDF document opens
191 pdfhighlight=/O, % how link buttons behave when selected;
192 pdftex, % use pdftex backend
193 }
194 %%% Setup autoreferences for <babel>
195 %%% ---------------------------------------------------------------------------
196 %%% http://www.ureader.de/msg/136221647.aspx
197 %%% http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords
198 \makeatletter
199 \AtBeginDocument{
200 \@ifpackageloaded{babel}{%
201 \addto\extrasamerican{%
202 \renewcommand*{\figureautorefname}{Figure}%
203 \renewcommand*{\tableautorefname}{Table}%
204 \renewcommand*{\partautorefname}{Part}%
205 \renewcommand*{\chapterautorefname}{Chapter}%
206 \renewcommand*{\sectionautorefname}{Section}%
207 \renewcommand*{\subsectionautorefname}{Section}%
208 \renewcommand*{\subsubsectionautorefname}{Section}%
209 }%
210 \addto\extrasngerman{%
211 \renewcommand*{\paragraphautorefname}{Absatz}%
212 \renewcommand*{\subparagraphautorefname}{Unterabsatz}%
213 \renewcommand*{\footnoteautorefname}{Fu\"snote}%
214 \renewcommand*{\FancyVerbLineautorefname}{Zeile}%
215 \renewcommand*{\theoremautorefname}{Theorem}%
216 \renewcommand*{\appendixautorefname}{Anhang}%
217 \renewcommand*{\equationautorefname}{Gleichung}%
218 \renewcommand*{\itemautorefname}{Punkt}%
219 }%
220 % Fix to getting autorefs for subfigures right (thanks to Belinda Vogt for changing the definition)
221 \providecommand{\subfigureautorefname}{\figureautorefname}%
222 }{\relax}
223 }
224 \makeatother
225 %%% <cleveref> settings
226 %%% ---------------------------------------------------------------------------
227 \crefname{equation}{eq.}{eqs.}
228 \Crefname{equation}{Equation}{Equations}
229 \crefname{figure}{fig.}{figs.}
230 \Crefname{figure}{Figure}{Figures}
231 \crefname{table}{tab.}{tabs.}
232 \Crefname{table}{Table}{Tables}
233 %%% <siunitx>
234 %%% ---------------------------------------------------------------------------
235 \sisetup{
236 per-mode = symbol-or-fraction,
237 retain-unity-mantissa = false,
238 }
239 %%% <pdftex>
240 %%% ---------------------------------------------------------------------------
241 \pdfcompresslevel=0
242 \pdfadjustspacing=1
243 %%% <listings>
244 %%% ---------------------------------------------------------------------------
245 \lstloadlanguages{tex,command.com}
246 \lstset{%
247 language=[LaTeX]Tex,
248 moretexcs = { % additional tex keywords
249 cftchapnumwidth,
250 cftpartnumwidth,
251 cftpartpagefont,
252 definecolor,
253 PassOptionsToPackage,
254 RaggedRight,
255 reducewspc,
256 reducewstr,
257 resetwspc,
258 resetwstr,
259 setlength,
260 },
261 numbers=none,
262 aboveskip=0pt,belowskip=0pt,
263 frame=none,
264 showstringspaces=false, % marks blank spaces in strings
265 breaklines=true, % automatic line breaking
266 }
267 %%% <tcolorbox>
268 %%% ---------------------------------------------------------------------------
269 \tcbuselibrary{%
270 breakable, % automatic breaking of a tcolorbox
271 listings, % use the package <listings> to typeset listings
272 skins, % required for advanced box styling
273 }
274 \tcbset{
275 break with pad/.style={
276 breakable,
277 enhanced jigsaw,
278 pad at break*=#1,
279 },
280 break without pad/.style={break with pad=0mm},
281 }
282 %%% <isodate>
283 %%% ---------------------------------------------------------------------------
284 \isodate % print dates as yyyy-mm-dd
285
286 %%% Custom commands
287 %%% ===========================================================================
288 %%% abbreviations
289 %%% ---------------------------------------------------------------------------
290 \newcommand{\KIT}{\textsmaller{KIT}\xspace}
291 \newcommand{\KSP}{\textsmaller{KSP}\xspace}
292 %%% text formats
293 %%% ---------------------------------------------------------------------------
294 \newcommand{\textpkgname}[1]{\textsf{#1}}
295 \newcommand{\textfilename}[1]{\texttt{#1}}
296 \newcommand{\textkey}[1]{\fbox{\textsf{#1}}}
297 \newcommand{\textprgout}[1]{{<<\textit{#1}>>}}
298 \lstMakeShortInline[language=bash]|
299 \newcommand{\optionfont}[1]{{\ttfamily\bfseries #1}}
300 \newcommand{\optionvaluefont}[1]{{\ttfamily\itshape #1}}
301 \newcommand{\optionvaluedefaultfont}[1]{\textbf{#1}}
302 \newcommand{\option}[1]{\optionfont{#1\index{options!\texttt{#1}}}}
303 \newcommand{\commandfont}[1]{{\ttfamily\bfseries #1}}
304 \newcommand{\commandargfont}[1]{{\ttfamily #1}}
305 %%% custom lists
306 %%% ---------------------------------------------------------------------------
307 \newenvironment{optionlist}{%
308 \begin{description}[font=\normalfont\optionfont, leftmargin=0pt, labelindent=-\marginparwidth, style=nextline]
309 \newcommand{\opt}[1][\empty]{\item[##1\ifx##1\empty\else\index{options!##1}\fi]}
310 }{%
311 \end{description}
312 }
313 \newenvironment{valuelist}{%
314 \begin{description}[font=\normalfont\optionvaluefont, leftmargin=1em, labelindent=-\marginparwidth, style=nextline]
315 }{%
316 \end{description}
317 }
318 \newenvironment{commandlist}{%
319 \begin{description}[font=\normalfont,leftmargin=0pt, labelindent=-\marginparwidth, style=nextline]
320 \newcommand{\cmd}[2]{\item[\commandfont{\textbackslash##1}\commandargfont{##2}\index{commands!\texttt{\textbackslash##1}}]}
321 }{%
322 \end{description}
323 }
324 %%% boxes
325 %%% ---------------------------------------------------------------------------
326 \newtcblisting{texcode}[2][]{
327 no listing options,
328 listing only,
329 coltitle=sbase2,
330 colbacktitle=sbase0,
331 colback=sbase3,
332 colframe=sbase02,
333 boxrule=0.5pt,
334 left=1mm,right=1mm,top=0mm,bottom=0mm,
335 fonttitle=\footnotesize\ttfamily,
336 title=#2,#1
337 }
338 \newtcbinputlisting{\inputtexcode}[3][]{%
339 listing file={#3},
340 no listing options,
341 listing only,
342 coltitle=sbase2,
343 colbacktitle=sbase0,
344 colback=sbase3,
345 colframe=sbase02,
346 boxrule=0.5pt,
347 left=1mm,right=1mm,top=0mm,bottom=0mm,
348 fonttitle=\footnotesize\ttfamily,
349 title=#2,#1
350 }
351
352 %%% Content data
353 %%% ===========================================================================
354 \makeindex
355
356 %%% ===========================================================================
357 %%% DOCUMENT CONTENT
358 %%% ===========================================================================
359 \begin{document}
360 \selectlanguage{american}
361
362 \title{\doctitle}
363 \subtitle{\docsubtitle}
364 \author{\docauthor\thanks{\docauthoremail}}
365 \date{\doctime}
366 \publishers{\normalsize
367 \begin{abstract}\noindent
368 \begin{quote}
369 The \textpkgname{ksp-thesis} class is a \LaTeX\ class intended for authors who want to publish their thesis or other scientific work with \emph{\KIT Scientific Publishing (\KSP)}. The class is based on the \textpkgname{scrbook} class of the \textpkgname{KOMA-script} package in combination with the \textpkgname{ClassicThesis} and \textpkgname{ArsClassica} packages. It modifies some of the layout and style definitions of these packages in order to provide a document layout that should be compatible with the requirements by \KSP.
370 \end{quote}
371 \end{abstract}
372 }
373 \maketitle
374
375
376 %%% ===========================================================================
377 \section{Introduction}
378
379 This class is intended to aid authors intending to publish a thesis (or a similar scientific work) with \KIT Scientific Publishing (\KSP)\footnote{\url{http://www.ksp.kit.edu/}}, the internal publishing company of the Karlsruhe Institute of Technology (\KIT). The layout provided by this class was used for publication of my own thesis at \KSP and should thus adhere to their requirements. However, while being based on the official \LaTeX\ templates provided by \KSP, the class is not maintained by \KSP.
380
381 The \textpkgname{ksp-thesis} class builds on the \textpkgname{scrbook} class of the \textpkgname{KOMA-script}\footnote{\url{http://www.ctan.org/pkg/koma-script}} package in combination with the \textpkgname{ClassicThesis}\footnote{\url{http://www.ctan.org/pkg/classicthesis}} and \textpkgname{ArsClassica}\footnote{\url{http://www.ctan.org/pkg/arsclassica}} packages. Therefore, you (the user of this class) should be familiar with these three packages.
382
383 \pagebreak % keep text block on one page
384 André Miede, the author of the \textpkgname{ClassicThesis} package, asks his package users to send him a postcard:
385 \begin{quote}\itshape
386 If you like the style then I would appreciate a postcard:
387 \begin{center}
388 André Miede \\
389 Detmolder Straße 32 \\
390 31737 Rinteln \\
391 Germany
392 \end{center}
393 The postcards I received so far are available at:
394 \begin{center}
395 \url{http://postcards.miede.de}
396 \end{center}
397 \end{quote}
398 As the \textpkgname{ksp-thesis} class uses many features of the \textpkgname{ClassicThesis} package, I would ask you to do so as well if you use \textpkgname{ksp-thesis} class.
399
400 %%% ===========================================================================
401 \section{Installation}
402
403 \begin{enumerate}
404 \item Get the latest release of \textfilename{ksp-thesis.zip} from
405
406 \url{https://github.com/GORywwyN/ksp-thesis/tree/master/release/}
407
408 or download the file
409
410 \url{http://mirrors.ctan.org/macros/latex/contrib/ksp-thesis.zip}
411
412 \item Extract the file \textfilename{ksp-thesis.tds.zip} from the archive
413
414 \item Unpack the \textfilename{ksp-thesis.tds.zip} archive in the root directory of the local \TeX\ installation tree, for example
415
416 \begin{itemize}
417 \item \textfilename{/usr/local/share/texmf/} or
418 \item \textfilename{/usr/share/texmf-local/} or
419 \item \textfilename{C:\textbackslash Local TeX Files\textbackslash}
420 \end{itemize}
421
422 \item Update the file hash tables (also known as the file name database).
423
424 On \TeX Live systems, run |texhash| as root (|sudo texhash|). On MiK\TeX, run |initexmf --update-fndb| in a command window or use the \textprgout{Refresh FNDB} button of the MiK\TeX\ Options window.
425 \end{enumerate}
426
427 \clearpage
428
429 %%% ===========================================================================
430 \section{Usage}
431
432 Using \textpkgname{ksp-thesis} as your document class (\lstinline|\documentclass{ksp-thesis}|) without any options will have the following effects:
433
434 \begin{enumerate}
435 \item The \textpkgname{scrbook} class of the \textpkgname{KOMA-script} package is loaded as base class. All options provided to the class (except the \textpkgname{ksp-thesis}-specific options listed in \cref{sec:options}) are passed on to \textpkgname{KOMA-script}.
436 \item The packages \textpkgname{ClassicThesis} and \textpkgname{ArsClassica} are loaded, thus applying their layout and style settings. However, some settings of these packages are overridden or changed:
437 \begin{enumerate}
438 \item The page layout defined by \textpkgname{ClassicThesis} is overridden and constructed by \textpkgname{KOMA-script} instead.
439 \item Parts and chapters in the table of contents are emphasized by using bold font instead of uppercase words.
440 \item Page numbers are set flushed right in the table of contents.
441 \item List environments (\lstinline|itemize,enumerate,description|) are set ragged right.
442 \item Headings (\lstinline|chapter|, \dots, \lstinline|subsubsection|) are set ragged right.
443 \item Heading numbers use the width of the current chapter number, whereby the headings from level \lstinline|chapter| until \lstinline|subsubsection| begin at the same horizontal position.
444 \item The numbers of footnotes are shifted to the left so that footnotes have the same left margin as the text area.
445 \item Formatting (coloring) of hyperlinks is removed.\footnote{I believe that coloring options should be left to the document author and in general used sparingly.}
446 \end{enumerate}
447 \end{enumerate}
448
449 Some of these settings can be changed using the class options listed in the following.
450
451 %%% ---------------------------------------------------------------------------
452 \subsection{Options}
453 \label{sec:options}
454
455 The class options below are formatted as \optionfont{option}\optionvaluefont{=\optionvaluedefaultfont{default value}} or \optionvaluefont{=value}. For boolean options, \optionvaluefont{=true} can be omitted.
456
457 %%% ...........................................................................
458 \subsubsection{Generic layout}
459 \label{sec:generic-layout}
460
461 \begin{optionlist}
462 \opt[layout] Set the \textpkgname{KOMA-script} page layout according to one of the following options:
463 \begin{valuelist}
464 \item[=\optionvaluedefaultfont{report}] \KIT Scientific Report layout (A4 paper size) for publication release
465 \item[=17x24] \KIT Scientific Publishing book layout (\SI{17}{\centi\meter} x \SI{24}{\centi\meter} paper size) for publication release
466 \item[=official] two-sided layout (paper size A4) for faculty and thesis committee (identical to \optionvaluefont{report})
467 \item[=draft] singled-sided layout (paper size A4) for private and correction prints
468 \end{valuelist}
469
470 \opt[raggedlists] Set lists (itemize, enumerate, description) \dots
471 \begin{valuelist}
472 \item[=\optionvaluedefaultfont{true}] \dots ragged right. (More specifically, the \lstinline|\RaggedRight| command of the \textpkgname{ragged2e} package is used.)
473 \item[=false] \dots justified.
474 \end{valuelist}
475 \end{optionlist}
476
477 %%% ...........................................................................
478 \subsubsection{Table of contents layout}
479 \label{sec:toc-layout}
480
481 \begin{optionlist}
482 \opt[dottedtoc] Set page numbers in the table of contents \dots
483 \begin{valuelist}
484 \item[=\optionvaluedefaultfont{true}] \dots flushed right. For sections entries and below, page numbers are separated by dots. For part and chapter entries, empty space is used by default. This default setting can be changed with the options \option{dottedtocparts} and \option{dottedtocchapters}.
485 \item[=false] \dots separated by a fixed-width space.
486 \end{valuelist}
487
488 \opt[dottedtocparts] Separate part entries and page numbers in the table of contents \dots
489 \begin{valuelist}
490 \item[=\optionvaluedefaultfont{false}] \dots with empty space.
491 \item[=true] \dots with dots. This value should only be used with \option{dottedtoc}\optionvaluefont{=true}.
492 \end{valuelist}
493
494 \opt[dottedtocchapters] Separate chapter entries and page numbers in the table of contents \dots
495 \begin{valuelist}
496 \item[=\optionvaluedefaultfont{false}] \dots with empty space.
497 \item[=true] \dots with dots. This value should only be used with \option{dottedtoc}\optionvaluefont{=true}.
498 \end{valuelist}
499
500 \opt[tocpartentriesbold] Format part entries in the table of contents \dots
501 \begin{valuelist}
502 \item[=\optionvaluedefaultfont{true}] \dots with bold font.
503 \item[=false] \dots with spaced low small caps. (This is the default setting of \textpkgname{ClassicThesis}).
504 \end{valuelist}
505
506 \opt[tocchapterentriesbold] Format chapter entries in the table of contents \dots
507 \begin{valuelist}
508 \item[=\optionvaluedefaultfont{true}] \dots with bold font.
509 \item[=false] \dots with spaced low small caps. (This is the default setting of \textpkgname{ClassicThesis}).
510 \end{valuelist}
511
512 \opt[tocentriesbold] Format part and chapter entries in the table of contents \dots
513 \begin{valuelist}
514 \item[=\optionvaluedefaultfont{true}] \dots with bold font.
515 \item[=false] \dots with spaced low small caps. (This is the default setting of \textpkgname{ClassicThesis}).
516 \end{valuelist}
517 \end{optionlist}
518
519 %%% ---------------------------------------------------------------------------
520 \subsection{Commands}
521
522 When publishing with \KSP, you will be asked to avoid single syllables or short words in the last line of a paragraph. For this purpose, \textpkgname{ksp-thesis} defines some commands that can be used to change the word spacing or stretching\footnote{Make sure that the legibility of your text is not impaired when using these commands.}.
523 \begin{commandlist}
524 \cmd{reducewspc}{[<num>]} Change the word spacing to \commandargfont{<num>} (default: \commandargfont{.95}) times its original value.
525 \cmd{reducewstr}{[<num>]} Change the word stretching to \commandargfont{<num>} (default: \commandargfont{.95}) times its original value.
526 \cmd{resetwspc}{} Reset the word spacing to its default value.
527 \cmd{resetwstr}{} Reset the word stretching to its default value.
528 \end{commandlist}
529
530 %%% ===========================================================================
531 \section{Troubleshooting and Usage Tips}
532
533 %%% ---------------------------------------------------------------------------
534 \subsection{Using options of the \textpkgname{ClassicThesis} package}
535
536 If you want to use options of the \textpkgname{ClassicThesis} package, you have to provide them \emph{before} the documentclass definition. In general, I recommend using at least the following options:
537
538 \begin{texcode}{how to pass options to the \textpkgname{ClassicThesis} package}
539 \PassOptionsToPackage{%
540 pdfspacing, % make use of pdftex' letter spacing capabilities via the microtype package.
541 floatperchapter, % activate numbering per chapter for all floats such as figures, tables, and listings
542 }{classicthesis}
543 \documentclass[%
544 listof=totoc, % add list of figures, tables, etc. to table of contents
545 ngerman,english, % document language(s)
546 ]{ksp-thesis}
547 \end{texcode}
548
549 %%% ---------------------------------------------------------------------------
550 \subsection{Spacing of heading numbers for long documents}
551
552 If your document contains a large number of parts and/or chapters, you may have to enlarge the space reserved for part and chapter numbers in the table of contents. This space is controlled by \lstinline|\cftpartnumwidth| and \lstinline|\cftchapnumwidth|, respectively.
553
554 For example, if your document contains eight parts, you may adjust the width as follows:
555
556 \begin{texcode}{how to adjust the width of part and chapter numbers in the table of contents}
557 \settowidth{\cftpartnumwidth}{\cftpartpagefont VIII}
558 \setlength{\cftchapnumwidth}{\cftpartnumwidth}
559 \end{texcode}
560
561 Further information on how to modify the layout of the table of contents can be found in the documentation of the \textpkgname{tocloft}\footnote{\url{http://www.ctan.org/pkg/tocloft}} package.
562
563 %%% ---------------------------------------------------------------------------
564 \subsection{Changing the color of part headings}
565
566 Part headings are displayed using the color \enquote{\texttt{parttitlecolor}}.%
567 \footnote{The \textpkgname{ClassicThesis} package uses the color \enquote{\texttt{Maroon}} as defined by the \textpkgname{xcolor} package to emphasize part headings. I believe that it is more convenient to use a semantic color name instead.} %
568 If, for example, you prefer a black-and-white document, you can thus simply redefine this color to be black:
569 \begin{texcode}{how to change the color of part headings}
570 \definecolor{parttitlecolor}{named}{black}
571 \end{texcode}
572
573
574 %%% ===========================================================================
575 \section{Example}
576
577 Here is a minimal example of a document based on \textpkgname{ksp-thesis}:
578
579 \inputtexcode[break with pad]{minimal example document}{../demo/minimal/example.tex}
580
581 A complete, extensively commented example which can be used as framework for your thesis can be found in the subfolder \textfilename{./demo/full/}.
582
583 %%% ===========================================================================
584 \cleardoublepage
585 \phantomsection
586 \addcontentsline{toc}{chapter}{\indexname}
587 \printindex
588
589 \end{document}