summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cleanthesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-26 20:40:49 +0000
committerKarl Berry <karl@freefriends.org>2019-06-26 20:40:49 +0000
commit970e8d821f0fe59d5e72a40a483d3c7460499bc2 (patch)
tree9e8f52c4c999d4f92c5c174e11177458b99c5c3a /Master/texmf-dist/tex/latex/cleanthesis
parent4bd24a7528ce2b7078296217539f9030c8995f46 (diff)
cleanthesis (26jun19)
git-svn-id: svn://tug.org/texlive/trunk@51472 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cleanthesis')
-rw-r--r--Master/texmf-dist/tex/latex/cleanthesis/cleanthesis.sty532
1 files changed, 309 insertions, 223 deletions
diff --git a/Master/texmf-dist/tex/latex/cleanthesis/cleanthesis.sty b/Master/texmf-dist/tex/latex/cleanthesis/cleanthesis.sty
index 188515d44ce..7091ebd0722 100644
--- a/Master/texmf-dist/tex/latex/cleanthesis/cleanthesis.sty
+++ b/Master/texmf-dist/tex/latex/cleanthesis/cleanthesis.sty
@@ -1,5 +1,5 @@
%% cleanthesis.sty
-%% Copyright 2015 R. Langner
+%% Copyright 2019 R. Langner
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -29,7 +29,7 @@
%
% **************************************************
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{cleanthesis}[2015/08/26 v0.3.1 Clean-looking thesis style inspired by Apple's user guide documents]
+\ProvidesPackage{cleanthesis}[2019/06/21 v0.4.0 A clean LaTeX style for thesis documents]
%
% **************************************************
% Package options
@@ -42,11 +42,6 @@
% in an easy way
\RequirePackage{xkeyval}
-% OPTION sansserif
-% --> values = true|false
-\define@boolkey[ct]{cthesis}{sansserif}[true]{}
-\setkeys[ct]{cthesis}{sansserif=false}
-
% OPTION hangfigurecaption
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangfigurecaption}[true]{}
@@ -62,6 +57,21 @@
\define@boolkey[ct]{cthesis}{hangsubsection}[true]{}
\setkeys[ct]{cthesis}{hangsubsection=true}
+% OPTION sansserif
+% --> values = true|false
+\define@boolkey[ct]{cthesis}{sansserif}[false]{}
+\setkeys[ct]{cthesis}{sansserif=false}
+
+% OPTION configurelistings
+% --> values = true|false
+\define@boolkey[ct]{cthesis}{configurelistings}[false]{}
+\setkeys[ct]{cthesis}{configurelistings=false}
+
+% OPTION configurebiblatex
+% --> values = true|false
+\define@boolkey[ct]{cthesis}{configurebiblatex}[false]{}
+\setkeys[ct]{cthesis}{configurebiblatex=false}
+
% OPTION figuresep
% --> values = none|colon|period|space|quad|endash
\define@choicekey*[ct]{cthesis}{figuresep}{none,colon,period,space,quad,newline,endash}[endash]{\def\cthesis@figuresep{#1}}
@@ -88,10 +98,19 @@
\setkeys[ct]{cthesis}{bibfile=bib-refs}
% OPTION bibstyle
-% --> values = alphabetic|numeric|authoryear
-\define@choicekey*[ct]{cthesis}{bibstyle}[\val\bibstylenr]{alphabetic,numeric,authoryear}[alphabetic]{\def\cthesis@bibstyle{#1}}
+% --> values = biblatex style options
+\define@key[ct]{cthesis}{bibstyle}[alphabetic]{\def\cthesis@bibstyle{#1}}
\setkeys[ct]{cthesis}{bibstyle=alphabetic}
+% OPTION bibsorting
+% --> values = biblatex sorting options
+\define@key[ct]{cthesis}{bibsorting}[nty]{\def\cthesis@bibsorting{#1}}
+\setkeys[ct]{cthesis}{bibsorting=nty}
+
+% OPTION quotesstyle
+% --> values = csquotes style options
+\define@key[ct]{cthesis}{quotesstyle}[english]{\def\cthesis@quotesstyle{#1}}
+\setkeys[ct]{cthesis}{quotesstyle=english}
\DeclareOptionX*{
\PackageWarning{cleanthesis}{Unknown option ‘\CurrentOption’}%
@@ -99,6 +118,8 @@
\ProcessOptionsX[ct]<cthesis>
+% Checks if bib file exists, if not we throw an error
+\IfFileExists{\cthesis@bibfile.bib}{}{\PackageError{cleanthesis}{Unable to find BibTeX file \cthesis@bibfile.bib!}{Please provide the name of your BibTeX file to the cleanthesis package parameter bibfile.}}
% **************************************************
% Color Definitions
@@ -186,6 +207,7 @@
\definecolor{ctcolorblack}{gray}{0}
\definecolor{ctcolorgray}{gray}{.5}
\definecolor{ctcolorgraylight}{gray}{.8}
+\definecolor{ctcolorgraylighter}{gray}{.95}
% sets the color theme regarding the given package option colortheme
\ifcase\cthesis@colortheme
@@ -203,40 +225,38 @@
% **************************************************
% Font Definitions (see http://www.tug.dk/FontCatalogue/)
% **************************************************
-\RequirePackage[T1]{fontenc} % font types and character verification
-%\ifthenelse{\boolean{@sansserif}}%
+\RequirePackage[T1]{fontenc} % font types and character verification
+
\ifct@cthesis@sansserif
-% {%
- % Using sans-serif fonts
- %
- %\RequirePackage{helvet} % Font: Helvetica
- %\RequirePackage{nimbus} % Font: Nimbus Sans, a clone of the Helvetica
- \RequirePackage{tgheros} % Font: TEX Gyre Heros
- %\RequirePackage{libertine} % Font: Biolinum, the standard sans serif typeface with the Libertine package
- %\RequirePackage[scaled]{berasans} % Font: Bera Sans, a a version of Bitstream Vera Sans slightly enhanced
- \renewcommand*\familydefault{\sfdefault}%
-% }{%
+ % Using sans-serif fonts
+ %
+ %\RequirePackage{helvet} % Font: Helvetica
+ %\RequirePackage{nimbus} % Font: Nimbus Sans, a clone of the Helvetica
+ \RequirePackage{tgheros} % Font: TEX Gyre Heros
+ %\RequirePackage{libertine} % Font: Biolinum, the standard sans serif typeface with the Libertine package
+ %\RequirePackage[scaled]{berasans} % Font: Bera Sans, a a version of Bitstream Vera Sans slightly enhanced
+ \renewcommand*\familydefault{\sfdefault}%
\else
- % Using serif fonts
- %
- \RequirePackage{lmodern} % font set: Latin Modern
- \RequirePackage{charter} % font set: Charter
- %\RequirePackage{fourier} % font set: (basically improved utopia)
-% }
+ % Using serif fonts
+ %
+ \RequirePackage{lmodern} % font set: Latin Modern
+ \RequirePackage{charter} % font set: Charter
+ %\RequirePackage{fourier} % font set: (basically improved utopia)
\fi
% **************************************************
% Load Packages
% **************************************************
-\RequirePackage{fixltx2e} % packages provides fixes to LaTeX2e
\RequirePackage{microtype} % typographic tuning
\RequirePackage{setspace} % for line spacing, e.g. \onehalfspacing
\RequirePackage[]{graphicx} % graphics import features
-\RequirePackage{fancyhdr} % for header and footer modifications
+\RequirePackage{tabularx} % table features
+%\RequirePackage{fancyhdr} % for header and footer modifications
\RequirePackage{enumitem} % for simple list modifications
\RequirePackage{blindtext} % package for blind text
\RequirePackage{textcomp} % different symbols
\RequirePackage{hyperref} % interactive link inside the document
+\RequirePackage[automark]{scrlayer-scrpage}
%
\RequirePackage[ % modify figure and table captions
@@ -253,63 +273,89 @@
% }{}
\fi
%
-\RequirePackage[ % page layout modifications
- paper=a4paper, % - use A4 paper size
- %scale={0.86,0.94}, % - total body size (h,v)
- %scale={0.86,0.94}, % - total body size (h,v)
- nohead, % - no header
- includefoot, % - include footer space
- includemp, % - include side note space
- bindingoffset=0.5cm, % - binding correction
- top=2.25cm, % - total body: top margin
- left=3.75cm, % - total body: left margin (odd pages)
- right=0.75cm, % - total body: right margin (odd pages)
- bottom=1.5cm, % - total body: bottom margin
- marginparwidth=1.75cm, % - width for side note
- marginparsep=10pt, % - space between notes and body text (content)
- footskip=2cm, % - footer skip size
-]{geometry}
+%
+% **************************************************
+% Page construction
+% **************************************************
+\KOMAoption{headinclude}{false} % include header in body?
+\KOMAoption{footinclude}{false} % include footer in body?
+\KOMAoption{footlines}{2.1} % number of foot lines
+\KOMAoption{mpinclude}{false} % include marginpar in body?
+\KOMAoption{BCOR}{25mm} % binding correction
+\KOMAoption{DIV}{12} % number of page divs (divider)
+%
%
\RequirePackage[ % advanced quotes
strict=true, % - warning are errors now
- style=german % - german quotes
+ style=\cthesis@quotesstyle % - german quotes
]{csquotes}
%
-\RequirePackage[ % use biblatex for bibliography
- backend=\cthesis@bibsys, % - use biber backend (bibtex replacement) or bibtex
- bibencoding=utf8, % - use auto file encode
- style=\cthesis@bibstyle, % - use alphabetic (or numeric) bib style
- natbib=true, % - allow natbib commands
- hyperref=true, % - activate hyperref support
- backref=true, % - activate backrefs
- isbn=false, % - don't show isbn tags
- url=false, % - don't show url tags
- doi=false, % - don't show doi tags
- urldate=long, % - display type for dates
- maxnames=3,%
- minnames=1,%
- maxbibnames=5,%
- minbibnames=3,%
- maxcitenames=2,%
- mincitenames=1%
-]{biblatex}
-\bibliography{\cthesis@bibfile}
-\DefineBibliographyStrings{ngerman}{%
- andothers = {{et\,al\adddot}}, % 'et al.' instead of 'u.a.'
- backrefpage = {{zitiert auf Seite}},%
- backrefpages = {{zitiert auf den Seiten}},%
-}
+
+% **************************************************
+% Bibliography
+% **************************************************
+\ifct@cthesis@configurebiblatex
+ \RequirePackage[ % use biblatex for bibliography
+ backend=\cthesis@bibsys, % - use biber backend (bibtex replacement) or bibtex
+ style=\cthesis@bibstyle, % - use alphabetic (or numeric) bib style
+ natbib=true, % - allow natbib commands
+ hyperref=true, % - activate hyperref support
+ backref=true, % - activate backrefs
+ isbn=false, % - don't show isbn tags
+ url=false, % - don't show url tags
+ doi=false, % - don't show doi tags
+ urldate=long, % - display type for dates
+ maxnames=3,%
+ minnames=1,%
+ maxbibnames=5,%
+ minbibnames=3,%
+ maxcitenames=2,%
+ mincitenames=1,%,
+ sorting=\cthesis@bibsorting%
+ ]{biblatex}
+ \bibliography{\cthesis@bibfile}
+ \DefineBibliographyStrings{ngerman}{%
+ andothers = {{et\,al\adddot}}, % 'et al.' instead of 'u.a.'
+ backrefpage = {{zitiert auf Seite}},%
+ backrefpages = {{zitiert auf den Seiten}},%
+ }
+\fi
% **************************************************
% Text Format
% **************************************************
\setstretch{1.2} % value for line spacing, use \setstretch{} or \singlespacing or \onehalfspacing or \doublespacing
-\setlength{\parindent}{0em} % value for paragraph indentation
+%\setlength{\parindent}{0em} % value for paragraph indentation
\clubpenalty = 10000 % prevent single lines at the beginning of a paragraph (Schusterjungen)
\widowpenalty = 10000 % prevent single lines at the end of a paragraph (Hurenkinder)
\displaywidowpenalty = 10000 %
% **************************************************
+% Listing Format
+% **************************************************
+\ifct@cthesis@configurelistings
+ \RequirePackage{listings} % package for listings
+ \lstset{%
+ backgroundcolor=\color{ctcolorgraylighter},
+ linewidth=\textwidth,
+ xleftmargin=10pt,
+ captionpos=b,
+ showspaces=false,
+ showstringspaces=false,
+ showtabs=false,
+ tabsize=2,
+ basicstyle=\footnotesize\ttfamily,
+ frame=leftline,
+ framerule=3pt,
+ framexleftmargin=4pt,
+ rulecolor=\color{ctcolorgraylight},
+ numbers=left,
+ numberstyle=\footnotesize\sffamily\color{ctcolorgray},
+ numbersep=15pt
+ }
+\fi
+
+% **************************************************
% List Definitions
% **************************************************
\newenvironment{my_list}%
@@ -355,70 +401,99 @@
% **************************************************
% Header and Footer
% **************************************************
-\pagestyle{fancy}
+
+\automark[section]{chapter} % automatically marks sections as rightmark
+ % and chapters as leftmark
+\setlength{\footheight}{120pt} % avoids scrlayer-scrpage warning:
+ % footheight to low warning
+\setlength{\footskip}{185pt} % BAD HACK that moves the foot downwards
+\KOMAoption{footwidth}{foot:53pt} % BAD HACK that moves the foot towards
+ % the outer border
+\setkomafont{pagefoot}{\ctfontfootertext} % font for footer
+\setkomafont{pagenumber}{\ctfontfooterpagenumber} % font for page numbers
+
+%% Redefinition of the chaptermark (used for footer mark on even (left) pages)
\renewcommand{\chaptermark}[1]{%
- \markboth{%
- \footnotesize%
- {\color{ctcolorfootermark}\textbf{\chaptername\ \thechapter}}%
- \quad%
- {\color{ctcolorfootertitle}#1}%
- }{}%
+ \markboth{%
+ \ctfontfootertext
+ % use \@chapapp instead of \chaptername to avoid
+ % 'Chapter A Appendix ...', thanks to @farbverlust (issue #47)
+ {\color{ctcolorfootermark}\textbf{\@chapapp\ \thechapter}}%
+ \quad%
+ \protect\begin{minipage}[t]{.65\textwidth}%
+ #1%
+ \protect\end{minipage}%
+ }{}%
}
+
+%% Redefinition of the sectionmark (used for footer mark on odd (right) pages)
+\newlength{\lensectionnumber}
\renewcommand{\sectionmark}[1]{%
- \markright{%
- \footnotesize%
- {\color{ctcolorfootermark}\textbf{\thesection}}%
- \quad%
- {\color{ctcolorfootertitle}#1}%
- }%
+ \markright{%
+ \ctfontfootertext
+ \setlength{\lensectionnumber}{0em}
+ \settowidth{\lensectionnumber}{\textbf{\thesection}\quad}
+ \protect\begin{minipage}[t]{.72\textwidth}%
+ {\ }% bad hack to prevent a wrong baseline for the minipage
+ \protect\raggedleft%
+ \hangindent=\lensectionnumber%
+ {\color{ctcolorfootermark}\textbf{\thesection}}%
+ \quad%
+ #1%
+ \protect\end{minipage}%
+ }%
}
-%
-\fancypagestyle{plain}{%
- \fancyhf{}
- \fancyfootoffset[OR]{1.85cm}
- \fancyfoot[OR]{%
- {\ }\tgherosfont%
- {\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
- \hspace*{10pt}\begin{minipage}[b]{1.5cm}%
- \color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
- \end{minipage}%
- }
- \fancyfootoffset[EL]{1.85cm}
- \fancyfoot[EL]{%
- \tgherosfont%
- \begin{minipage}[b]{1.5cm}%
- \raggedleft\color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
- \end{minipage}%
- \hspace*{10pt}{\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
- }
- \renewcommand{\headrulewidth}{0pt}
- \renewcommand{\footrulewidth}{0pt}
+
+%% Vertical line in the footer (between page number and mark)
+\newcommand{\ctfooterline}{%
+ \color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}%
}
-%
-\fancypagestyle{maincontentstyle}{%
- \pagestyle{plain}
- \fancyhf{}
- \fancyfootoffset[OR]{1.85cm}
- \fancyfoot[OR]{%
- {\ }\tgherosfont\footnotesize%
- \rightmark%
- \hspace*{0.75cm}{\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
- \hspace*{10pt}\begin{minipage}[b]{1.5cm}%
- \color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
- \end{minipage}%
- }
- \fancyfootoffset[EL]{1.85cm}
- \fancyfoot[EL]{%
- \tgherosfont\footnotesize%
- \begin{minipage}[b]{1.5cm}%
- \raggedleft\color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
- \end{minipage}%
- \footnotesize%
- \hspace*{10pt}{\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
- \hspace*{0.75cm}\leftmark%
- }
+
+%% Page number for odd (right) pages
+\newcommand{\ctfooterrightpagenumber}{%
+ \ctfooterline%
+ \hspace*{10pt}%
+ \begin{minipage}[b]{1.5cm}%
+ \pagemark\ %
+ \end{minipage}%
}
+%% Page number for even (left) pages
+\newcommand{\ctfooterleftpagenumber}{%
+ \begin{minipage}[b]{1.5cm}%
+ \raggedleft\pagemark%
+ \end{minipage}%
+ \hspace*{10pt}%
+ \ctfooterline%
+}
+
+%% Defines the content for header and footer
+\lehead{}
+\cehead{}
+\rehead{}
+\lohead{}
+\cohead{}
+\rohead{}
+\lefoot[% > plain
+ \ctfooterleftpagenumber%
+]{% > srcheadings
+ \ctfooterleftpagenumber%
+ \hspace*{0.75cm}%
+ \headmark%
+}
+\cefoot{}
+\refoot{}
+\lofoot{}
+\cofoot{}
+\rofoot[% > plain
+ \ctfooterrightpagenumber%
+]{% > srcheadings
+ \headmark%
+ \hspace*{0.75cm}%
+ \ctfooterrightpagenumber%
+}
+
+
% **************************************************
% New Commands
% **************************************************
@@ -485,13 +560,22 @@
\newcommand{\book}{\fontfamily{pbk}\fontseries{m}\fontsize{11}{13}\selectfont}
\newcommand{\tgherosfont}{\fontfamily{qhv}\selectfont}
-\newcommand{\thesispartlabelfont}{\color{ctcolorpartnum}\book\fontsize{60}{60}\selectfont}
-\newcommand{\thesispartfont}{\color{ctcolorparttext}\huge \tgherosfont\selectfont}
-\newcommand{\thesischapterfont}{\color{ctcolorblack}\huge \fontfamily{phv}\selectfont}
-%\newcommand{\thesissectionfont}{\color{ctcolormain}\LARGE\bfseries \tgherosfont}
-\newcommand{\thesissectionfont}{\color{ctcolorsection}\LARGE \tgherosfont}
-\newcommand{\thesissubsectionfont}{\color{ctcolorsubsection}\Large \tgherosfont}
-\newcommand{\thesisparagraphfont}{\color{ctcolorparagraph}\tgherosfont\small\bfseries}
+\newcommand{\thesispartlabelfont}{\color{ctcolorpartnum}\nobreak\book\fontsize{60}{60}\selectfont}
+\newcommand{\thesispartfont}{\color{ctcolorparttext}\nobreak\normalfont\huge \tgherosfont\selectfont}
+\newcommand{\thesischapterfont}{\color{ctcolorblack}\nobreak\normalfont\huge \fontfamily{phv}\selectfont}
+%\newcommand{\thesissectionfont}{\color{ctcolormain}\nobreak\LARGE\bfseries \tgherosfont}
+\newcommand{\thesissectionfont}{\color{ctcolorsection}\nobreak\normalfont\LARGE \tgherosfont}
+\newcommand{\thesissubsectionfont}{\color{ctcolorsubsection}\nobreak\normalfont\Large \tgherosfont}
+\newcommand{\thesisparagraphfont}{\color{ctcolorparagraph}\nobreak\tgherosfont\small\bfseries}
+
+\newcommand{\ctfontfooterpagenumber}{%
+ \color{ctcolorfooterpage}%
+ \normalfont\normalsize\bfseries \tgherosfont%
+}
+\newcommand{\ctfontfootertext}{%
+ \color{ctcolorfootertitle}%
+ \normalfont\footnotesize \tgherosfont%
+}
%
% headings
\setkomafont{part}{\thesispartfont} % for chapter entries
@@ -514,118 +598,103 @@
% -- modifications regarding sectioning (structural) commands,
% i.e. \part, \chapter, \section, \subsection, \subsubsection, \paragraph
%
-%
-% The package titlesec enables us to modify (style) the sectioning commands
-% -- usage: \titlespacing{\command}{left}{before-sep}{after-sep}[right-sep]
-% -- usage: \titleformat{\command}[shape]{format}{label}{sep}{before}[after]
-% -- usage: \titleclass{\command}{class}
-% -- classes: page (single page), top (like chapters),
-% straight (title in the middle)
-\RequirePackage{titlesec}
-%
+% ---------------------------
% > formats: \part
-\titleclass{\part}{top} % <-- display:
-\assignpagestyle{\part}{empty} % <-- no page numbers/decorations
-\titleformat{\part}%
- [display]%
- {\usekomafont{part}}%
- {\raggedleft{%
- {\thesispartlabelfont%
- \partname\ \thepart\ \quad}%
- {\color{ctcolorpartline}%
- \hspace*{-200pt}\rule[20pt]{600pt}{2pt}}
- }%
- }%
- {0em}%
- {\raggedleft}%
- [\phantomsection]
+% ---------------------------
+\renewcommand*{\partpagestyle}{empty}
+\renewcommand*{\raggedpart}{\raggedleft}
+\renewcommand*\partheadmidvskip{\par\vspace*{3em}}
+\renewcommand*{\partformat}{%
+ \usekomafont{part}%
+ \thesispartlabelfont%
+ \partname\ \thepart\quad%
+ {\color{ctcolorpartline}\hspace*{-200pt}\rule[0pt]{600pt}{2pt}}%
+}
%
+% ---------------------------
% > formats: \chapter
+% ---------------------------
+\renewcommand*\chapterheadstartvskip{\vspace*{-8.75em}}
+\renewcommand*\chapterheadendvskip{\vspace*{2.5\baselineskip}}
+\renewcommand*{\chapterformat}{%
+ \ctchapternumber{\thechapter}%
+}
+\renewcommand{\chapterlinesformat}[3]{%
+ \ctchaptertitle{#3}%
+ #2%
+}
+%\renewcommand{\chapterlineswithprefixformat}[3]{%
+% \ctchaptertitle{\@chapapp\ \thechapter: #3}%
+% #2%
+%}
+\newcommand{\ctchapternumber}[1]{%
+ \usekomafont{chapter}%
+ \begin{minipage}[t]{0.3\textwidth}%
+ \raggedleft{%
+ {\color{ctcolorchapterline}\rule[-5pt]{2pt}{5cm}}%
+ \quad%
+ {\color{ctcolorchapternum}\fontsize{60}{60}\selectfont#1}%
+ }%
+ \end{minipage}%
+}
+\newcommand{\ctchaptertitle}[1]{%
+ \usekomafont{chapter}%
+ \begin{minipage}[t]{0.7\textwidth}%
+ \vspace*{5.85em}%
+ \raggedright%
+ #1%
+ \end{minipage}%
+}
%
-% The following command is used to avoid overlapping
-% of the chapter headline text, see bug/ticket #1
-% Solution adapted according to the comment from "Gonzalo Medina" - Thanks
-% http://tex.stackexchange.com/questions/165878/width-of-chapter-section-with-titlesec
-\newcommand\ctformatchapter[1]{\parbox[t]{\dimexpr\textwidth-4em\relax}{\raggedright#1}}
-%
-\titleformat{\chapter}[display]%
- {\usekomafont{chapter}}%
- {\vspace{-8em}\raggedleft{%
- {\color{ctcolorchapterline}%
- \rule[-5pt]{2pt}{5cm}}\quad%
- {\color{ctcolorchapternum}
- \fontsize{60}{60}\selectfont\thechapter}%
- }%
- }%
- {-2.1em}%
- {\ctformatchapter}%
- [\phantomsection]
-%
+% ---------------------------
% > formats: \section
-\titlespacing{\section}{0em}{.75em}{.2em}%[0pt]
-%\ifthenelse{\boolean{@sectionlabeloutside}}%
+% ---------------------------
\ifct@cthesis@hangsection
-% {%
- \titleformat{\section}[hang]%
- {\usekomafont{section}}%
- {\color{ctcolorblack}\thesection\hspace*{10pt}}%
- {0pt}%
- {\raggedright}%
- [\phantomsection]
-% }{%
+ \renewcommand*{\sectionformat}{%
+ \usekomafont{section}%
+ \makebox[0pt][r]{\color{ctcolorblack}\thesection\hspace*{10pt}}%
+ }
\else
- \titleformat{\section}[block]%
- {\usekomafont{section}}%
- {\color{ctcolorblack}\thesection\hspace*{10pt}}%
- {0pt}%
- {\raggedright}%
- [\phantomsection]
-% }
+ \renewcommand*{\sectionformat}{%
+ \usekomafont{section}%
+ {\color{ctcolorblack}\thesection\hspace*{10pt}}%
+ }
\fi
%
+% ---------------------------
% > formats: \subsection
-\titlespacing{\subsection}{0em}{.5em}{0em}%[0pt]
-%\ifthenelse{\boolean{@subsectionlabeloutside}}%
+% ---------------------------
\ifct@cthesis@hangsubsection
-% {%
- \titleformat{\subsection}[hang]%
- {\usekomafont{subsection}}%
- {\color{ctcolorblack}\thesubsection\hspace*{10pt}}%
- {0pt}%
- {\raggedright}%
- [\phantomsection]
-% }{%
+ \renewcommand*{\subsectionformat}{%
+ \usekomafont{subsection}%
+ \makebox[0pt][r]{\color{ctcolorblack}\thesubsection\hspace*{10pt}}%
+ }
\else
- \titleformat{\subsection}[block]%
- {\usekomafont{subsection}}%
- {\color{ctcolorblack}\thesubsection\hspace*{10pt}}%
- {0pt}%
- {\raggedright}%
- [\phantomsection]
-% }
+ \renewcommand*{\subsectionformat}{%
+ \usekomafont{subsection}%
+ {\color{ctcolorblack}\thesubsection\hspace*{10pt}}%
+ }
\fi
%
-% > formats: \paragraph
-\titlespacing{\paragraph}{0pt}{\parsep}{1em}%[0pt]
-% \titleformat{\paragraph}[runin]%
- % {\usekomafont{paragraph}}%
- % {}%
- % {}%
- % {}%
- % []
-%
%
% **************************************************
-% ToC, LoF, LoT
+% ToC, LoF, LoT, LoL
% **************************************************
%
% -- modifications regarding the table of contents,
-% the list of figures and the list of tables
+% the list of figures, list of tables,
+% and list of listings
%
%
% The tocloft package enables us to control the typographic design of the
% table of contents, list of figures and list of tables
\RequirePackage{tocloft}
+% - fixes wrong fonts in the toc, thanks to magnucki
+\renewcommand{\cftchapfont}{\usefont{T1}{bch}{b}{n}\selectfont}
+\renewcommand{\cfttoctitlefont}{\thesischapterfont}
+\renewcommand{\cftloftitlefont}{\thesischapterfont}
+\renewcommand{\cftlottitlefont}{\thesischapterfont}
+%
%
% > adjusts the indention for figure and table entries (lof and lot)
% -- \cftsetindents{entry}{indent}{numwidth} sets the entry's indent to
@@ -634,6 +703,23 @@
\cftsetindents{table}{0em}{3em}
%
%
+\ifct@cthesis@configurelistings
+ % makes lol to look like lof
+ \makeatletter
+ \begingroup\let\newcounter\@gobble\let\setcounter\@gobbletwo
+ \globaldefs\@ne \let\c@loldepth\@ne
+ \newlistof{listings}{lol}{\lstlistlistingname}
+ \endgroup
+ \let\l@lstlisting\l@listings
+ \AtBeginDocument{\addtocontents{lol}{\protect\addvspace{10\p@}}}
+ \makeatother
+ \renewcommand{\lstlistoflistings}{\listoflistings}
+ \renewcommand\lstlistlistingname{List of Listings}
+ \renewcommand{\cftloltitlefont}{\thesischapterfont}
+ \cftsetindents{listings}{0em}{3em}
+\fi
+%
+%
%
% **************************************************
% Mishmash