diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty | 374 |
1 files changed, 374 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty b/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty new file mode 100644 index 00000000000..800173daa98 --- /dev/null +++ b/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty @@ -0,0 +1,374 @@ +% ******************************************************************** +% classicthesis.sty +% +% Copyright (C) 2007 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 +% postcards I received so far is available online at +% http://postcards.miede.de +% +% License: +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 2 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; see the file COPYING. If not, write to +% the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +% Boston, MA 02111-1307, USA. +% +% ******************************************************************** +% Important: +% +% This style can also be used without the thesis template. +% It works with both LaTeX and PDFLaTeX now. +% +% * You must not use "u etc. in strings/commands that will be spaced out +% (use \"u or real umlauts instead) +% * Chapters must be marked with the \myChapter{Foo} command +% (sorry for the inconvenience at this point) +% * For margin notes: \graffito{} +% * There is a problem with the case of math text in part-, +% chapter-, and section titles and I have got no clue on how to fix this +% (either the case or the spacing breaks). So far, I chose the case. :-( +% +% ******************************************************************** +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{classicthesis}[2007/03/21 v1.4.2 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) + \newboolean{drafting} % print version information on pages + \newboolean{linedheaders} % chaper headers will have line above and beneath + \newboolean{listsseparated} % toggles the vertical space between lof/lot entries of different chapters + \newboolean{nochapters} % disable all chapter-specific commands + \newboolean{beramono} % toggle nice monospaced font (w/ bold) + pre-installed + \newboolean{eulermath} % use awesome Euler fonts for math + \newboolean{parts} % use part division for the text + \newboolean{a5paper} % use those tiny DIN A5 pages +\DeclareOption{tocaligned}{\setboolean{tocaligned}{true}} +\DeclareOption{eulerchapternumbers}{\setboolean{eulerchapternumbers}{true}} +\DeclareOption{drafting}{\setboolean{drafting}{true}} +\DeclareOption{linedheaders}{\setboolean{linedheaders}{true}} +\DeclareOption{listsseparated}{\setboolean{listsseparated}{true}} +\DeclareOption{subfigure}{\PassOptionsToPackage{subfigure}{tocloft}} +\DeclareOption{nochapters}{\setboolean{nochapters}{true}} +\DeclareOption{beramono}{\setboolean{beramono}{true}} +\DeclareOption{eulermath}{\setboolean{eulermath}{true}} +\DeclareOption{parts}{\setboolean{parts}{true}} +\DeclareOption{a5paper}{\setboolean{a5paper}{true}} +\ProcessOptions\relax + +% turn off some things if we do not use chapters +\ifthenelse{\boolean{nochapters}}% + {% + \setboolean{linedheaders}{false}% + \setboolean{listsseparated}{false}% + \setboolean{eulerchapternumbers}{false}% + \setboolean{parts}{false} + }% + {\relax}% + +% ******************************************************************** +% PDF Stuff +% ******************************************************************** +\RequirePackage{ifpdf} +\ifpdf\RequirePackage{hyperref}\fi % for texorpdfstring command below + +% ******************************************************************** +% Colors +% ******************************************************************** +\RequirePackage[dvipsnames]{xcolor} + +% ******************************************************************** +% Font Stuff +% ******************************************************************** +\RequirePackage[osf,sc]{mathpazo} % Palatino with real small caps and old style figures\\ +% just some font experiments (ignore) +%\RequirePackage[opticals,osf]{MinionPro} % opticals, fullfamily, +%\RequirePackage{lmodern} +%\RequirePackage[urw-garamond]{mathdesign} +%\RequirePackage[light,condensed,math]{iwona} +%\renewcommand{\sfdefault}{iwona} +\ifthenelse{\boolean{beramono}}% + {\RequirePackage[scaled=0.85]{beramono}}% + {\renewcommand{\ttdefault}{\rmdefault}} % put your own suitable typewriter font here +\ifthenelse{\boolean{eulermath}}% + {\RequirePackage[euler-digits]{eulervm}} % Euler math fonts + {\relax} +\ifthenelse{\boolean{eulerchapternumbers}}% font for the chapter numbers + {\newfont{\chapterNumber}{eurb10 scaled 7000}}% + {\newfont{\chapterNumber}{pplr9d scaled 7000}} + % Euler eurb10 / Palatino OSF pplr9d / Palatino SC pplrc9d + % Latin Modern cork-lmr10 +\definecolor{halfgray}{gray}{0.55} % chapter numbers will be semi transparent .5 .55 .6 .0 + +%\RequirePackage[expansion=false]{microtype} % character protruding and other micro-typography stuff +\RequirePackage{microtype} % character protruding and other micro-typography stuff + +% ******************************************************************** +% Textblock size +%******************************************************* +\ifthenelse{\boolean{a5paper}}% + {% A5 + \areaset[5mm]{288pt}{555pt} + \setlength{\marginparwidth}{4em}% + \setlength{\marginparsep}{1.25em}% + }{% A4 + \areaset[5mm]{312pt}{657pt} % 624 + 33 head % 5mm for binding + \setlength{\marginparwidth}{7em}% + \setlength{\marginparsep}{2em}% + } +% Here some suggestions for the text widths and heights: +% Palatino 10pt: 288--312pt | 609--657pt +% Palatino 11pt: 312--336pt | 657--705 +% Minion 10pt: 264--288pt | 561--609pt +% Minion 11pt: 288--312pt | 609--657pt + +% ******************************************************************** +% Own Stuff +% ******************************************************************** +% Graffiti as in GKP's book "Concrete Mathematics" +\DeclareRobustCommand{\graffito}[1]{\marginpar{% + \slshape\small% + %\parindent=0pt\lineskip=0pt\lineskiplimit=0pt%\baselineskip=10pt + %\tolerance=2000\hyphenpenalty=300\exhyphenpenalty=300% + %\doublehyphendemerits=100000\finalhyphendemerits=\doublehyphendemerits% + \raggedright\hspace{0pt}#1}} + +% Enumeration environment with small caps +\newenvironment{aenumerate} + {\def\theenumi{\textsc{\alph{enumi}}}% + \enumerate} + {\endenumerate} + +% ******************************************************************** +% Fancy Stuff +% ******************************************************************** +\RequirePackage{booktabs} % for better rules in tables +\RequirePackage{textcase} % for \MakeTextUppercase +\RequirePackage{soul} % for letterspacing + \sodef\allcapsspacing{\upshape}{0.15em}{0.65em}{0.6em} + \sodef\lowsmallcapsspacing{\scshape}{0.075em}{0.5em}{0.6em} + %\DeclareRobustCommand{\spacedallcaps}[1]{% + % \protected@edef\@myXtemp{\MakeTextUppercase{\allcapsspacing{#1}}}\@myXtemp} + \DeclareRobustCommand{\spacedallcaps}[1]{\MakeTextUppercase{\allcapsspacing{#1}}} + %\DeclareRobustCommand{\spacedlowsmallcaps}[1]{% + % %\protected@edef\@myYtemp{\textsc{\lowsmallcapsspacing{\MakeTextLowercase{#1}}}}\@myYtemp} + % \protected@edef\@myYtemp{\MakeTextLowercase{\textsc{\lowsmallcapsspacing{#1}}}}\@myYtemp} + \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\MakeTextLowercase{\textsc{\lowsmallcapsspacing{#1}}}} + +% ******************************************************************** +% figures are placed only within section they were declared in +% provides command \FloatBarrier +% ******************************************************************** +\RequirePackage[section,below]{placeins} + +% ******************************************************************** +% layout of the chapter-, section-, subsection-, subsubsection-, +% paragraph and description-headings +% ******************************************************************** +\RequirePackage{titlesec} + % parts + \ifthenelse{\boolean{parts}}% + {% + \titleformat{\part}[display] + {\normalfont\centering\large}% + {\thispagestyle{empty}\partname~\MakeTextUppercase{\thepart}}{1em}% + {\color{Maroon}\spacedallcaps} + }{\relax} + % chapters + \ifthenelse{\boolean{linedheaders}}% + {% lines above and below, number right + \titleformat{\chapter}[display]% + {\relax}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }{0pt}% + {\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]% + }{% something like Bringhurst + \titleformat{\chapter}[display]% + {\relax}{\mbox{}\marginpar{\vspace*{-3\baselineskip}\color{halfgray}\chapterNumber\thechapter}}{0pt}% + {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]% + } + % sections \FloatBarrier + \titleformat{\section} + {\relax}{\textsc{\MakeTextLowercase{\thesection}}}{1em}{\spacedlowsmallcaps} + % subsections + \titleformat{\subsection} + {\relax}{\textsc{\MakeTextLowercase{\thesubsection}}}{1em}{\normalsize\itshape} + % subsubsections + \titleformat{\subsubsection} + {\relax}{\textsc{\MakeTextLowercase{\thesubsubsection}}}{1em}{\normalsize\itshape} + % paragraphs + \titleformat{\paragraph}[runin] + {\normalfont\normalsize}{\theparagraph}{0pt}{\spacedlowsmallcaps} + % descriptionlabels + \renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\spacedlowsmallcaps{#1}} % spacedlowsmallcaps textit textsc + % spacing + \ifthenelse{\boolean{nochapters}}% + {\relax}% + {\titlespacing*{\chapter}{0pt}{1\baselineskip}{1.2\baselineskip}} + \titlespacing*{\section}{0pt}{1.25\baselineskip}{1\baselineskip} + \titlespacing*{\subsection}{0pt}{1.25\baselineskip}{1\baselineskip} + \titlespacing*{\paragraph}{0pt}{1\baselineskip}{1\baselineskip} + +% ******************************************************************** +% headlines +% ******************************************************************** +\RequirePackage[automark]{scrpage2} % provides headers and footers (KOMA Script) + \clearscrheadings + \setheadsepline{0pt} + \ifthenelse{\boolean{nochapters}}% + {\relax}% + {\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{}}} + \renewcommand{\sectionmark}[1]{\markright{\thesection\ \spacedlowsmallcaps{#1}}} + \lehead{\mbox{\llap{\small\thepage\kern2em}\headmark\hfil}} + \rohead{\mbox{\hfil{\headmark}\rlap{\small\kern2em\thepage}}} + \renewcommand{\headfont}{\small} + +% ******************************************************************** +% layout of the TOC, LOF and LOT (LOL-workaround see next section) +% ******************************************************************** +\RequirePackage[titles]{tocloft} + % avoid page numbers being right-aligned in fixed-size box + \newlength{\newnumberwidth} + \settowidth{\newnumberwidth}{99} % yields overfull hbox warnings for pages > 99 + \cftsetpnumwidth{\newnumberwidth} + % have the bib neatly positioned after the rest + \newlength{\beforebibskip} + \setlength{\beforebibskip}{0em} + % pagenumbers right after the titles + % parts + \ifthenelse{\boolean{parts}}% + {% + \renewcommand{\thepart}{\roman{part}}% + \renewcommand{\cftpartpresnum}{\scshape}% \MakeTextLowercase +% \renewcommand{\cftpartaftersnum}{\cftchapaftersnum}% +% \renewcommand{\cftpartaftersnumb}{\quad}% +% \setlength{\cftpartnumwidth}{\cftpartnumwidth} + \renewcommand{\cftpartfont}{\color{Maroon}\normalfont}% + \renewcommand{\cftpartpagefont}{\normalfont}% + \renewcommand{\cftpartleader}{\hspace{1.5em}}% + \renewcommand{\cftpartafterpnum}{\cftparfillskip}% + \setlength{\cftbeforepartskip}{1em}% + \setlength{\cftbeforechapskip}{.1em}% + \setlength{\beforebibskip}{\cftbeforepartskip} + }{\relax} + % chapters + \ifthenelse{\boolean{nochapters}}% + {\relax}% + {% + \renewcommand{\cftchappresnum}{\scshape\MakeTextLowercase}% + \renewcommand{\cftchapfont}{\normalfont}% + \renewcommand{\cftchappagefont}{\normalfont}% + \renewcommand{\cftchapleader}{\hspace{1.5em}}% + \renewcommand{\cftchapafterpnum}{\cftparfillskip}% + %\setlength{\cftbeforechapskip}{.1em}% + } + % sections + \renewcommand{\cftsecpresnum}{\scshape\MakeTextLowercase}% + \renewcommand{\cftsecleader}{\hspace{1.5em}} + \renewcommand{\cftsecafterpnum}{\cftparfillskip} + \ifthenelse{\boolean{tocaligned}}{\renewcommand{\cftsecindent}{0em}}{\relax} + % subsections + \renewcommand{\cftsubsecpresnum}{\scshape\MakeTextLowercase}% + \renewcommand{\cftsubsecleader}{\hspace{1.5em}} + \renewcommand{\cftsubsecafterpnum}{\cftparfillskip} + \ifthenelse{\boolean{tocaligned}}{\renewcommand{\cftsubsecindent}{0em}}{\relax} + % figures + \renewcommand{\cftfigpresnum}{\scshape\MakeTextLowercase}% + \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} + % tables + \renewcommand{\cfttabpresnum}{\scshape\MakeTextLowercase}% + \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} + + % dirty work-around to get the spacing after the toc/lot/lof-titles right + \ifthenelse{\boolean{parts}}% + {% + \AtBeginDocument{\addtocontents{toc}{\protect\vspace{-\cftbeforepartskip}}} + }{% + \ifthenelse{\boolean{nochapters}}% + {\relax}% + {\AtBeginDocument{\addtocontents{toc}{\protect\vspace{-\cftbeforechapskip}}}} + } + + % another dirty work-around to get the spaced low small caps into the toc ;-( + \ifthenelse{\boolean{nochapters}}% + {\relax}% + {% + \newcommand{\myChapter}[1]{% for chapters + \ifpdf\chapter[\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}]{#1}% + \else\chapter[\spacedlowsmallcaps{#1}]{#1}\fi% + }% + } + + % yet another dirty work-around to get the spaced low small caps into the toc ;-( + \ifthenelse{\boolean{parts}}% + {% + \newcommand{\myPart}[1]{% for parts + \ifpdf% + % ugly hack to remove the part number from the PDF bookmark entry + \pdfstringdefDisableCommands{\let\thepart\@gobbletwo}% + \part[\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}]{#1}% spacedallcaps spacedlowsmallcaps + \else\part[\spacedlowsmallcaps{#1}]{#1}\fi% + }% + }{\relax} + + \newcommand{\tocEntry}[1]{% for bib, etc. + \ifpdf\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}% + \else{#1}\fi% + } + + % remove the vertical space between lof/lot entries of different chapters + \ifthenelse{\boolean{listsseparated}}{% + \AtBeginDocument{% + \addtocontents{lof}{\protect\vspace{-\cftbeforechapskip}}% + \addtocontents{lot}{\protect\vspace{-\cftbeforechapskip}}% + }% + }{% + \DeclareRobustCommand*{\deactivateaddvspace}{\let\addvspace\@gobble}% + \AtBeginDocument{% + \addtocontents{lof}{\deactivateaddvspace}% + \addtocontents{lot}{\deactivateaddvspace}% + %\addtocontents{lof}{\protect\renewcommand*{\protect\addvspace}[1]{}}% + %\addtocontents{lot}{\protect\renewcommand*{\protect\addvspace}[1]{}}% + }% + } + +% ******************************************************************** +% footnotes setup +% ******************************************************************** +\RequirePackage[bottom]{footmisc} % norule para symbol* marginal perpage + % KOMA-command, footnotemark not superscripted at the bottom + \deffootnote{0em}{0em}{\thefootnotemark\hspace*{.5em}} + %\setfnsymbol{bringhurst} % use symbols recommended by guru Robert Bringhurst + %\setlength{\footnotemargin}{-1em} + +% ******************************************************************** +% Drafting Stuff +% ******************************************************************** +\RequirePackage{scrtime} % time access +\newcommand{\finalVersionString}{} +\ifthenelse{\boolean{drafting}}{% + \RequirePackage[draft]{prelim2e} + \renewcommand{\PrelimWords}{\relax} + \renewcommand{\PrelimText}{\footnotesize[\,\today\ at \thistime\,]} +}{\renewcommand{\finalVersionString}{\emph{Final Version} as of \today\ at \thistime.}} |