summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty')
-rw-r--r--Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty132
1 files changed, 96 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty b/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty
index 4546459be78..5f7d2fad04f 100644
--- a/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty
+++ b/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty
@@ -1,7 +1,7 @@
% ********************************************************************
% classicthesis.sty
%
-% Copyright (C) 2008 André Miede http://www.miede.de
+% Copyright (C) 2009 André Miede http://www.miede.de
%
% If you like the style then I would appreciate a postcard. My address
% can be found in the file ClassicThesis.pdf. A collection of the
@@ -42,7 +42,7 @@
%
% ********************************************************************
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{classicthesis}[2008/10/01 v2.5 Typographic Style for a classic-looking thesis]
+\ProvidesPackage{classicthesis}[2009/08/01 v2.6 Typographic Style for a classic-looking thesis]
\RequirePackage{ifthen}
\newboolean{@tocaligned} % the left column of the toc will be aligned (no indention)
\newboolean{@eulerchapternumbers} % use AMS Euler for chapter font (otherwise Palatino)
@@ -58,6 +58,8 @@
\newboolean{@pdfspacing} % use pdftex for letterspacing (via microtype)
\newboolean{@subfig} % setup for preloaded @subfig package
\newboolean{@a5paper} % use those tiny DIN A5 pages
+ \newboolean{@dottedtoc} % page numbers in ToC flushed right
+ \newboolean{@listings} % load listings package (if not already) and setup LoL
% ********************************************************************
% Options
@@ -80,6 +82,9 @@
\DeclareOption{minionpro}{\setboolean{@minionpro}{true}}
\DeclareOption{minionprospacing}{\setboolean{@minionprospacing}{true}}
\DeclareOption{pdfspacing}{\setboolean{@pdfspacing}{true}}
+\DeclareOption{pdfspacing}{\setboolean{@pdfspacing}{true}}
+\DeclareOption{dottedtoc}{\setboolean{@dottedtoc}{true}}
+\DeclareOption{listings}{\setboolean{@listings}{true}}
\ProcessOptions\relax
% subfig-related stuff
@@ -95,6 +100,12 @@
{\PassOptionsToPackage{subfigure}{tocloft}%
}{\relax}%
+% listings-related stuff
+\ifthenelse{\boolean{@listings}}%
+ {\@ifpackageloaded{listings}%
+ {\relax}{\RequirePackage{listings}}%
+ }{\relax}%
+
% fine-tuning if we use minionprospacing
\ifthenelse{\boolean{@minionprospacing}}%
{%
@@ -236,12 +247,13 @@
% Graffiti as in GKP's book "Concrete Mathematics"
\DeclareRobustCommand{\graffito}[1]{\marginpar{%
\slshape\footnotesize%\small%
- %\ifodd\thepage\raggedright\else\raggedleft\fi%
+ \ifodd\thepage\raggedright\else\raggedleft\fi%
\parindent=0pt\lineskip=0pt\lineskiplimit=0pt%\baselineskip=10pt
\tolerance=2000\hyphenpenalty=300\exhyphenpenalty=300%
\doublehyphendemerits=100000\finalhyphendemerits=\doublehyphendemerits%
- \raggedright\hspace{0pt}#1}}
-
+ %\raggedright%
+ \hspace{0pt}#1}}
+
% Enumeration environment with small caps
\newenvironment{aenumerate}
{\def\theenumi{\textsc{\alph{enumi}}}%
@@ -371,8 +383,11 @@
% \setlength{\cftpartnumwidth}{\cftpartnumwidth}
\renewcommand{\cftpartfont}{\color{Maroon}\normalfont}%
\renewcommand{\cftpartpagefont}{\normalfont}%
- \renewcommand{\cftpartleader}{\hspace{1.5em}}%
- \renewcommand{\cftpartafterpnum}{\cftparfillskip}%
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cftpartleader}{\hspace{1.5em}}%
+ \renewcommand{\cftpartafterpnum}{\cftparfillskip}%
+ }%
\setlength{\cftbeforepartskip}{1em}%
\setlength{\cftbeforechapskip}{.1em}%
\setlength{\beforebibskip}{\cftbeforepartskip}%
@@ -384,50 +399,95 @@
\renewcommand{\cftchappresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftchapfont}{\normalfont}%
\renewcommand{\cftchappagefont}{\normalfont}%
- \renewcommand{\cftchapleader}{\hspace{1.5em}}%
- \renewcommand{\cftchapafterpnum}{\cftparfillskip}%
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cftchapleader}{\hspace{1.5em}}%
+ \renewcommand{\cftchapafterpnum}{\cftparfillskip}%
+ }
%\setlength{\cftbeforechapskip}{.1em}%
}
% sections
\ifthenelse{\boolean{@nochapters}}%
- {%
- \setlength{\cftbeforesecskip}{.1em}%
- \setlength{\beforebibskip}{1em}%
- }%
- {\relax}
+ {%
+ \setlength{\cftbeforesecskip}{.1em}%
+ \setlength{\beforebibskip}{1em}%
+ }%
+ {\relax}
\renewcommand{\cftsecpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftsecfont}{\normalfont}%
- \renewcommand{\cftsecpagefont}{\normalfont}%
- \renewcommand{\cftsecleader}{\hspace{1.5em}}
- \renewcommand{\cftsecafterpnum}{\cftparfillskip}
- \ifthenelse{\boolean{@tocaligned}}{\renewcommand{\cftsecindent}{0em}}{\relax}
+ \renewcommand{\cftsecpagefont}{\normalfont}%
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cftsecleader}{\hspace{1.5em}}%
+ \renewcommand{\cftsecafterpnum}{\cftparfillskip}%
+ }
+ \ifthenelse{\boolean{@tocaligned}}{\renewcommand{\cftsecindent}{0em}}{\relax}
% subsections
\renewcommand{\cftsubsecpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftsubsecfont}{\normalfont}%
- \renewcommand{\cftsubsecleader}{\hspace{1.5em}}
- \renewcommand{\cftsubsecafterpnum}{\cftparfillskip}
- \ifthenelse{\boolean{@tocaligned}}{\renewcommand{\cftsubsecindent}{0em}}{\relax}
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cftsubsecleader}{\hspace{1.5em}}%
+ \renewcommand{\cftsubsecafterpnum}{\cftparfillskip}%
+ }
+ \ifthenelse{\boolean{@tocaligned}}{\renewcommand{\cftsubsecindent}{0em}}{\relax}
+ % subsubsections
+ \renewcommand{\cftsubsubsecpresnum}{\scshape\MakeTextLowercase}%
+ \renewcommand{\cftsubsubsecfont}{\normalfont}%
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cftsubsubsecleader}{\hspace{1.5em}}%
+ \renewcommand{\cftsubsubsecafterpnum}{\cftparfillskip}%
+ }
+ \ifthenelse{\boolean{@tocaligned}}{\renewcommand{\cftsubsubsecindent}{0em}}{\relax}
% figures
\renewcommand{\cftfigpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftfigfont}{\normalfont}%
- \renewcommand{\cftfigleader}{\hspace{1.5em}}
- \renewcommand{\cftfigpresnum}{\figurename~}%Fig.~}
- \renewcommand{\cftfigafterpnum}{\cftparfillskip}
- \newlength{\figurelabelwidth}
- \settowidth{\figurelabelwidth}{\cftfigpresnum~99}
- \addtolength{\figurelabelwidth}{2.5em}
- \cftsetindents{figure}{0em}{\figurelabelwidth}
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cftfigleader}{\hspace{1.5em}}%
+ \renewcommand{\cftfigafterpnum}{\cftparfillskip}%
+ }
+ \renewcommand{\cftfigpresnum}{\figurename~}%Fig.~}
+ \newlength{\figurelabelwidth}
+ \settowidth{\figurelabelwidth}{\cftfigpresnum~99}
+ \addtolength{\figurelabelwidth}{2.5em}
+ \cftsetindents{figure}{0em}{\figurelabelwidth}
% tables
\renewcommand{\cfttabpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cfttabfont}{\normalfont}%
- \renewcommand{\cfttableader}{\hspace{1.5em}}
- \renewcommand{\cfttabpresnum}{\tablename~}%Tab.~}
- \renewcommand{\cfttabafterpnum}{\cftparfillskip}
- \newlength{\tablelabelwidth}
- \settowidth{\tablelabelwidth}{\cfttabpresnum~99}
- \addtolength{\tablelabelwidth}{2.5em}
- %\cftsetindents{table}{0em}{\tablelabelwidth}
- \cftsetindents{table}{0em}{\figurelabelwidth}
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cfttableader}{\hspace{1.5em}}%
+ \renewcommand{\cfttabafterpnum}{\cftparfillskip}%
+ }
+ \renewcommand{\cfttabpresnum}{\tablename~}%Tab.~}
+ \newlength{\tablelabelwidth}
+ \settowidth{\tablelabelwidth}{\cfttabpresnum~99}
+ \addtolength{\tablelabelwidth}{2.5em}
+ %\cftsetindents{table}{0em}{\tablelabelwidth}
+ \cftsetindents{table}{0em}{\figurelabelwidth}
+ % listings
+ \ifthenelse{\boolean{@listings}}%
+ {%
+ \newlistof{listings}{lol}{\lstlistlistingname}%
+ \renewcommand{\cftlistingspresnum}{\scshape\MakeTextLowercase}%
+ \renewcommand{\cftlistingsfont}{\normalfont}%
+ \renewcommand{\cftlistingspresnum}{\lstlistingname~}%
+ \renewcommand{\cftlistingspagefont}{\normalfont}%
+ \ifthenelse{\boolean{@dottedtoc}}{\relax}%
+ {%
+ \renewcommand{\cftlistingsleader}{\hspace{1.5em}}%
+ \renewcommand{\cftlistingsafterpnum}{\cftparfillskip}%
+ }
+ \newlength{\listingslabelwidth}%
+ \settowidth{\listingslabelwidth}{\cftlistingspresnum~99}%
+ \addtolength{\listingslabelwidth}{2.5em}%
+ %\cftsetindents{listings}{0em}{\listingslabelwidth}%
+ \cftsetindents{listings}{0em}{\figurelabelwidth}%
+ \let\l@lstlisting\l@listings%
+ \let\lstlistoflistings\listoflistings%
+ }{\relax}%
% dirty work-around to get the spacing after the toc/lot/lof-titles right
\ifthenelse{\boolean{@parts}}%