- Change: first tidy ups

This commit is contained in:
Ricardo Langner
2012-01-31 17:46:29 +01:00
parent 1d95fd9ee6
commit abfae2bf89

View File

@@ -10,7 +10,7 @@
% *** Clean, Simple, Elegant *** % *** Clean, Simple, Elegant ***
% "Clean Thesis" is a LaTeX style for thesis documents, developed % "Clean Thesis" is a LaTeX style for thesis documents, developed
% for my diplom thesis (Diplomarbeit). The style can be understood % for my diplom thesis (Diplomarbeit). The style can be understood
% as my personal compromise a typical clean looking scientific % as my personal compromise - a typical clean looking scientific
% document combined and polished with minor beautifications. % document combined and polished with minor beautifications.
% %
% The design of this "Clean Thesis" style is inspired % The design of this "Clean Thesis" style is inspired
@@ -55,6 +55,28 @@
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cleanthesis}[2011/05/27 v0.1b Clean-looking thesis style inspired by Apple's user guide documents] \ProvidesPackage{cleanthesis}[2011/05/27 v0.1b Clean-looking thesis style inspired by Apple's user guide documents]
%\RequirePackage{xkvview}
%\RequirePackage{xkeyval}
% OPTIONS and VALUES
% sansserif = true|false
% colormode = full|reduced|bw
% figurecaptionhang = true|false
% sectionhang = true|false
% subsectionhang = true|false
% figuresep = none|colon|period|space|quad|newline|endash
% \define@choicekey*[ct]{warning}{errorlevel}{info,warning,error}[info]{}
% \setkeys{warning}{errorlevel=info}
% \DeclareOptionX*{
% \PackageWarning{cleanthesis}{Unknown option \CurrentOption}%
% }
%\ProcessOptionsX
\RequirePackage{ifthen} \RequirePackage{ifthen}
\newboolean{@sansserif} \newboolean{@sansserif}
\newboolean{@colorbw} \newboolean{@colorbw}
@@ -77,6 +99,7 @@
} }
\ProcessOptions\relax % executes the code for each option \ProcessOptions\relax % executes the code for each option
% ************************************************** % **************************************************
% Color Definitions % Color Definitions
% ************************************************** % **************************************************
@@ -95,9 +118,9 @@
\colorlet{cthesiscolorfootertitle}{cthesismaincolor} \colorlet{cthesiscolorfootertitle}{cthesismaincolor}
% part colors % part colors
\colorlet{cthesiscolorpartnum}{cthesisblack} \colorlet{cthesiscolorpartnum}{cthesismaincolor}
\colorlet{cthesiscolorpartline}{cthesisblack} \colorlet{cthesiscolorpartline}{cthesisblack}
\colorlet{cthesiscolorparttext}{cthesismaincolor} \colorlet{cthesiscolorparttext}{cthesisblack}
% chapter colors % chapter colors
\colorlet{cthesiscolorchapternum}{cthesismaincolor} \colorlet{cthesiscolorchapternum}{cthesismaincolor}
@@ -108,6 +131,7 @@
\colorlet{cthesiscolorsubsection}{cthesismaincolor} \colorlet{cthesiscolorsubsection}{cthesismaincolor}
\colorlet{cthesiscolorfloatlabel}{cthesisaccessorycolor} \colorlet{cthesiscolorfloatlabel}{cthesisaccessorycolor}
\colorlet{cthesiscolorlistlabel}{cthesismaincolor} \colorlet{cthesiscolorlistlabel}{cthesismaincolor}
\colorlet{cthesiscolorparagraph}{cthesisblack}
\ifthenelse{\boolean{@colorbw}}% \ifthenelse{\boolean{@colorbw}}%
{% {%
@@ -118,6 +142,8 @@
% %
\colorlet{cthesiscolorsection}{cthesisblack}% \colorlet{cthesiscolorsection}{cthesisblack}%
\colorlet{cthesiscolorfloatlabel}{cthesisblack}% \colorlet{cthesiscolorfloatlabel}{cthesisblack}%
%
\colorlet{cthesiscolorpartnum}{cthesisblack}
}{} }{}
\ifthenelse{\boolean{@colorreduced}}% \ifthenelse{\boolean{@colorreduced}}%
{% {%
@@ -125,6 +151,8 @@
\colorlet{cthesiscolorfootertitle}{cthesisblack} \colorlet{cthesiscolorfootertitle}{cthesisblack}
\colorlet{cthesiscolorsubsection}{cthesisblack} \colorlet{cthesiscolorsubsection}{cthesisblack}
\colorlet{cthesiscolorlistlabel}{cthesisblack} \colorlet{cthesiscolorlistlabel}{cthesisblack}
%
\colorlet{cthesiscolorpartnum}{cthesisblack}
}{} }{}
% ************************************************** % **************************************************
@@ -161,7 +189,7 @@
\RequirePackage{blindtext} % package for blind text \RequirePackage{blindtext} % package for blind text
\RequirePackage{textcomp} % different symbols \RequirePackage{textcomp} % different symbols
\RequirePackage{hyperref} % interactive link inside the document \RequirePackage{hyperref} % interactive link inside the document
\RequirePackage{titlesec} % to modify sectioning commands, e.g. chapter
% %
\RequirePackage[ % modify figure and table captions \RequirePackage[ % modify figure and table captions
font={small}, % - small font size font={small}, % - small font size
@@ -397,16 +425,23 @@
% ************************************************** % **************************************************
% Sectioning Commands % Sectioning Commands
% ************************************************** % **************************************************
%
\newcommand*{\ctSetFont}[3]{%
arg1=#1, arg2=#2, arg3=#3%
}
% own font definitions % own font definitions
\newcommand{\helv}{\fontfamily{phv}\fontsize{9}{11}\selectfont} \newcommand{\helv}{\fontfamily{phv}\fontsize{9}{11}\selectfont}
\newcommand{\book}{\fontfamily{pbk}\fontseries{m}\fontsize{11}{13}\selectfont} \newcommand{\book}{\fontfamily{pbk}\fontseries{m}\fontsize{11}{13}\selectfont}
\newcommand{\tgherosfont}{\fontfamily{qhv}\selectfont} \newcommand{\tgherosfont}{\fontfamily{qhv}\selectfont}
\newcommand{\thesispartlabelfont}{\color{cthesiscolorpartnum}\book\fontsize{60}{60}\selectfont} \newcommand{\thesispartlabelfont}{\color{cthesiscolorpartnum}\book\fontsize{60}{60}\selectfont}
\newcommand{\thesispartfont}{\color{cthesiscolorparttext}\huge \tgherosfont\selectfont} \newcommand{\thesispartfont}{\color{cthesiscolorparttext}\huge \tgherosfont\selectfont}
\newcommand{\thesischapterfont}{\color{cthesisblack}\huge \fontfamily{phv}\selectfont} \newcommand{\thesischapterfont}{\color{cthesisblack}\huge \fontfamily{phv}\selectfont}
%\newcommand{\thesissectionfont}{\color{cthesismaincolor}\LARGE\bfseries \tgherosfont} %\newcommand{\thesissectionfont}{\color{cthesismaincolor}\LARGE\bfseries \tgherosfont}
\newcommand{\thesissectionfont}{\color{cthesiscolorsection}\LARGE \tgherosfont} \newcommand{\thesissectionfont}{\color{cthesiscolorsection}\LARGE \tgherosfont}
\newcommand{\thesissubsectionfont}{\color{cthesiscolorsubsection}\Large \tgherosfont} \newcommand{\thesissubsectionfont}{\color{cthesiscolorsubsection}\Large \tgherosfont}
\newcommand{\thesisparagraphfont}{\color{cthesiscolorparagraph}\tgherosfont\small\bfseries}
% %
% headings % headings
\setkomafont{part}{\thesispartfont} % for chapter entries \setkomafont{part}{\thesispartfont} % for chapter entries
@@ -414,47 +449,63 @@
\setkomafont{section}{\thesissectionfont} % for section entries \setkomafont{section}{\thesissectionfont} % for section entries
\setkomafont{subsection}{\thesissubsectionfont} % for section entries \setkomafont{subsection}{\thesissubsectionfont} % for section entries
\addtokomafont{subsubsection}{\tgherosfont} \addtokomafont{subsubsection}{\tgherosfont}
\addtokomafont{paragraph}{\tgherosfont} %\addtokomafont{paragraph}{\tgherosfont}
\setkomafont{paragraph}{\thesisparagraphfont}
%\setkomafont{subsection}{\large} % for subsection entries %\setkomafont{subsection}{\large} % for subsection entries
% usage: \titleformat{<command)}[<shape>]{<format>}{<label>}{<sep>}{<before>}[<after>]
% formats the part structure
\titleclass{\part}{top} %
\assignpagestyle{\part}{empty} % **************************************************
\titleformat{\part}[display]% % Sectioning
% **************************************************
%
% -- 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}}% {\usekomafont{part}}%
{% {\raggedleft{%
\raggedleft{% {\thesispartlabelfont%
{% \partname\ \thepart\quad}%
\thesispartlabelfont% {\color{cthesiscolorpartline}%
\partname\ \thepart\quad% \hspace*{-225pt}\rule[20pt]{600pt}{2pt}}
}%
{%
\color{cthesiscolorpartline}%
\hspace*{-225pt}\rule[20pt]{600pt}{2pt}%
}%
}% }%
}% }%
{0em}% {0em}%
{\raggedleft}% {\raggedleft}%
[] [\phantomsection]
%
% > formats: \chapter
\titleformat{\chapter}[display]% \titleformat{\chapter}[display]%
{\usekomafont{chapter}}% {\usekomafont{chapter}}%
{% {\vspace{-8em}\raggedleft{%
\vspace{-8em} {\color{cthesiscolorchapterline}%
\raggedleft{% \rule[-5pt]{2pt}{5cm}}\quad%
{\color{cthesiscolorchapterline}\rule[-5pt]{2pt}{5cm}}\quad% {\color{cthesiscolorchapternum}
{\color{cthesiscolorchapternum}\fontsize{60}{60}\selectfont\thechapter}% \fontsize{60}{60}\selectfont\thechapter}%
}% }%
}% }%
{-2.1em}% {-2.1em}%
{\raggedright}% {\raggedright}%
[] [\phantomsection]
%
% format the section % > formats: \section
\titlespacing{\section}{0em}{.75em}{.2em}%[0pt]
\ifthenelse{\boolean{@sectionlabeloutside}}% \ifthenelse{\boolean{@sectionlabeloutside}}%
{% {%
\titleformat{\section}[hang]% \titleformat{\section}[hang]%
@@ -462,17 +513,18 @@
{\color{cthesisblack}\thesection\hspace*{10pt}}% {\color{cthesisblack}\thesection\hspace*{10pt}}%
{0pt}% {0pt}%
{\raggedright}% {\raggedright}%
[] [\phantomsection]
}{% }{%
\titleformat{\section}[block]% \titleformat{\section}[block]%
{\usekomafont{section}}% {\usekomafont{section}}%
{\color{cthesisblack}\thesection\hspace*{10pt}}% {\color{cthesisblack}\thesection\hspace*{10pt}}%
{0pt}% {0pt}%
{\raggedright}% {\raggedright}%
[] [\phantomsection]
} }
%
% format the subsection % > formats: \subsection
\titlespacing{\subsection}{0em}{.5em}{0em}%[0pt]
\ifthenelse{\boolean{@subsectionlabeloutside}}% \ifthenelse{\boolean{@subsectionlabeloutside}}%
{% {%
\titleformat{\subsection}[hang]% \titleformat{\subsection}[hang]%
@@ -480,16 +532,50 @@
{\color{cthesisblack}\thesubsection\hspace*{10pt}}% {\color{cthesisblack}\thesubsection\hspace*{10pt}}%
{0pt}% {0pt}%
{\raggedright}% {\raggedright}%
[] [\phantomsection]
}{% }{%
\titleformat{\subsection}[block]% \titleformat{\subsection}[block]%
{\usekomafont{subsection}}% {\usekomafont{subsection}}%
{\color{cthesisblack}\thesubsection\hspace*{10pt}}% {\color{cthesisblack}\thesubsection\hspace*{10pt}}%
{0pt}% {0pt}%
{\raggedright}% {\raggedright}%
[] [\phantomsection]
} }
%
% > formats: \paragraph
\titlespacing{\paragraph}{0pt}{\parsep}{1em}%[0pt]
% \titleformat{\paragraph}[runin]%
% {\usekomafont{paragraph}}%
% {}%
% {}%
% {}%
% []
%
%
% **************************************************
% ToC, LoF, LoT
% **************************************************
%
% -- modifications regarding the table of contents,
% the list of figures and the list of tables
%
%
% The tocloft package enables us to control the typographic design of the
% table of contents, list of figures and list of tables
\RequirePackage{tocloft}
%
% > adjusts the indention for figure and table entries (lof and lot)
% -- \cftsetindents{entry}{indent}{numwidth} sets the entry's indent to
% the length indent and its numwidth to the length numwidth
\cftsetindents{figure}{0em}{3em}
\cftsetindents{table}{0em}{3em}
%
%
%
% **************************************************
% Mishmash
% **************************************************
%
% Clean chapter quotations % Clean chapter quotations
\newcommand{\hugequote}{% \newcommand{\hugequote}{%
{\book\fontsize{75}{80}\selectfont% {\book\fontsize{75}{80}\selectfont%
@@ -513,7 +599,7 @@
\end{minipage}% \end{minipage}%
\bigskip \bigskip
} }
%
% Clean Quotation environment % Clean Quotation environment
\newenvironment{thesis_quotation}% \newenvironment{thesis_quotation}%
{% {%
@@ -526,7 +612,6 @@
\end{flushright} \end{flushright}
\end{minipage}% \end{minipage}%
}% }%
%
% Clean signs around word origins in definitions % Clean signs around word origins in definitions
%\newcommand{\cthesisorigin}[1]{\textsf{\textlangle}#1\textsf{\textrangle}} %\newcommand{\cthesisorigin}[1]{\textsf{\textlangle}#1\textsf{\textrangle}}