- Change: first tidy ups
This commit is contained in:
165
cleanthesis.sty
165
cleanthesis.sty
@@ -10,7 +10,7 @@
|
||||
% *** Clean, Simple, Elegant ***
|
||||
% "Clean Thesis" is a LaTeX style for thesis documents, developed
|
||||
% 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.
|
||||
%
|
||||
% The design of this "Clean Thesis" style is inspired
|
||||
@@ -55,6 +55,28 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\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}
|
||||
\newboolean{@sansserif}
|
||||
\newboolean{@colorbw}
|
||||
@@ -77,6 +99,7 @@
|
||||
}
|
||||
\ProcessOptions\relax % executes the code for each option
|
||||
|
||||
|
||||
% **************************************************
|
||||
% Color Definitions
|
||||
% **************************************************
|
||||
@@ -95,9 +118,9 @@
|
||||
\colorlet{cthesiscolorfootertitle}{cthesismaincolor}
|
||||
|
||||
% part colors
|
||||
\colorlet{cthesiscolorpartnum}{cthesisblack}
|
||||
\colorlet{cthesiscolorpartnum}{cthesismaincolor}
|
||||
\colorlet{cthesiscolorpartline}{cthesisblack}
|
||||
\colorlet{cthesiscolorparttext}{cthesismaincolor}
|
||||
\colorlet{cthesiscolorparttext}{cthesisblack}
|
||||
|
||||
% chapter colors
|
||||
\colorlet{cthesiscolorchapternum}{cthesismaincolor}
|
||||
@@ -108,6 +131,7 @@
|
||||
\colorlet{cthesiscolorsubsection}{cthesismaincolor}
|
||||
\colorlet{cthesiscolorfloatlabel}{cthesisaccessorycolor}
|
||||
\colorlet{cthesiscolorlistlabel}{cthesismaincolor}
|
||||
\colorlet{cthesiscolorparagraph}{cthesisblack}
|
||||
|
||||
\ifthenelse{\boolean{@colorbw}}%
|
||||
{%
|
||||
@@ -118,6 +142,8 @@
|
||||
%
|
||||
\colorlet{cthesiscolorsection}{cthesisblack}%
|
||||
\colorlet{cthesiscolorfloatlabel}{cthesisblack}%
|
||||
%
|
||||
\colorlet{cthesiscolorpartnum}{cthesisblack}
|
||||
}{}
|
||||
\ifthenelse{\boolean{@colorreduced}}%
|
||||
{%
|
||||
@@ -125,6 +151,8 @@
|
||||
\colorlet{cthesiscolorfootertitle}{cthesisblack}
|
||||
\colorlet{cthesiscolorsubsection}{cthesisblack}
|
||||
\colorlet{cthesiscolorlistlabel}{cthesisblack}
|
||||
%
|
||||
\colorlet{cthesiscolorpartnum}{cthesisblack}
|
||||
}{}
|
||||
|
||||
% **************************************************
|
||||
@@ -161,7 +189,7 @@
|
||||
\RequirePackage{blindtext} % package for blind text
|
||||
\RequirePackage{textcomp} % different symbols
|
||||
\RequirePackage{hyperref} % interactive link inside the document
|
||||
\RequirePackage{titlesec} % to modify sectioning commands, e.g. chapter
|
||||
|
||||
%
|
||||
\RequirePackage[ % modify figure and table captions
|
||||
font={small}, % - small font size
|
||||
@@ -397,16 +425,23 @@
|
||||
% **************************************************
|
||||
% Sectioning Commands
|
||||
% **************************************************
|
||||
%
|
||||
\newcommand*{\ctSetFont}[3]{%
|
||||
arg1=#1, arg2=#2, arg3=#3%
|
||||
}
|
||||
|
||||
% own font definitions
|
||||
\newcommand{\helv}{\fontfamily{phv}\fontsize{9}{11}\selectfont}
|
||||
\newcommand{\book}{\fontfamily{pbk}\fontseries{m}\fontsize{11}{13}\selectfont}
|
||||
\newcommand{\tgherosfont}{\fontfamily{qhv}\selectfont}
|
||||
|
||||
\newcommand{\thesispartlabelfont}{\color{cthesiscolorpartnum}\book\fontsize{60}{60}\selectfont}
|
||||
\newcommand{\thesispartfont}{\color{cthesiscolorparttext}\huge \tgherosfont\selectfont}
|
||||
\newcommand{\thesischapterfont}{\color{cthesisblack}\huge \fontfamily{phv}\selectfont}
|
||||
%\newcommand{\thesissectionfont}{\color{cthesismaincolor}\LARGE\bfseries \tgherosfont}
|
||||
\newcommand{\thesissectionfont}{\color{cthesiscolorsection}\LARGE \tgherosfont}
|
||||
\newcommand{\thesissubsectionfont}{\color{cthesiscolorsubsection}\Large \tgherosfont}
|
||||
\newcommand{\thesisparagraphfont}{\color{cthesiscolorparagraph}\tgherosfont\small\bfseries}
|
||||
%
|
||||
% headings
|
||||
\setkomafont{part}{\thesispartfont} % for chapter entries
|
||||
@@ -414,47 +449,63 @@
|
||||
\setkomafont{section}{\thesissectionfont} % for section entries
|
||||
\setkomafont{subsection}{\thesissubsectionfont} % for section entries
|
||||
\addtokomafont{subsubsection}{\tgherosfont}
|
||||
\addtokomafont{paragraph}{\tgherosfont}
|
||||
%\addtokomafont{paragraph}{\tgherosfont}
|
||||
\setkomafont{paragraph}{\thesisparagraphfont}
|
||||
|
||||
%\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}}%
|
||||
{%
|
||||
\raggedleft{%
|
||||
{%
|
||||
\thesispartlabelfont%
|
||||
\partname\ \thepart\quad%
|
||||
}%
|
||||
{%
|
||||
\color{cthesiscolorpartline}%
|
||||
\hspace*{-225pt}\rule[20pt]{600pt}{2pt}%
|
||||
}%
|
||||
{\raggedleft{%
|
||||
{\thesispartlabelfont%
|
||||
\partname\ \thepart\quad}%
|
||||
{\color{cthesiscolorpartline}%
|
||||
\hspace*{-225pt}\rule[20pt]{600pt}{2pt}}
|
||||
}%
|
||||
}%
|
||||
{0em}%
|
||||
{\raggedleft}%
|
||||
[]
|
||||
|
||||
[\phantomsection]
|
||||
%
|
||||
% > formats: \chapter
|
||||
\titleformat{\chapter}[display]%
|
||||
{\usekomafont{chapter}}%
|
||||
{%
|
||||
\vspace{-8em}
|
||||
\raggedleft{%
|
||||
{\color{cthesiscolorchapterline}\rule[-5pt]{2pt}{5cm}}\quad%
|
||||
{\color{cthesiscolorchapternum}\fontsize{60}{60}\selectfont\thechapter}%
|
||||
{\vspace{-8em}\raggedleft{%
|
||||
{\color{cthesiscolorchapterline}%
|
||||
\rule[-5pt]{2pt}{5cm}}\quad%
|
||||
{\color{cthesiscolorchapternum}
|
||||
\fontsize{60}{60}\selectfont\thechapter}%
|
||||
}%
|
||||
}%
|
||||
{-2.1em}%
|
||||
{\raggedright}%
|
||||
[]
|
||||
|
||||
% format the section
|
||||
[\phantomsection]
|
||||
%
|
||||
% > formats: \section
|
||||
\titlespacing{\section}{0em}{.75em}{.2em}%[0pt]
|
||||
\ifthenelse{\boolean{@sectionlabeloutside}}%
|
||||
{%
|
||||
\titleformat{\section}[hang]%
|
||||
@@ -462,17 +513,18 @@
|
||||
{\color{cthesisblack}\thesection\hspace*{10pt}}%
|
||||
{0pt}%
|
||||
{\raggedright}%
|
||||
[]
|
||||
[\phantomsection]
|
||||
}{%
|
||||
\titleformat{\section}[block]%
|
||||
{\usekomafont{section}}%
|
||||
{\color{cthesisblack}\thesection\hspace*{10pt}}%
|
||||
{0pt}%
|
||||
{\raggedright}%
|
||||
[]
|
||||
[\phantomsection]
|
||||
}
|
||||
|
||||
% format the subsection
|
||||
%
|
||||
% > formats: \subsection
|
||||
\titlespacing{\subsection}{0em}{.5em}{0em}%[0pt]
|
||||
\ifthenelse{\boolean{@subsectionlabeloutside}}%
|
||||
{%
|
||||
\titleformat{\subsection}[hang]%
|
||||
@@ -480,16 +532,50 @@
|
||||
{\color{cthesisblack}\thesubsection\hspace*{10pt}}%
|
||||
{0pt}%
|
||||
{\raggedright}%
|
||||
[]
|
||||
[\phantomsection]
|
||||
}{%
|
||||
\titleformat{\subsection}[block]%
|
||||
{\usekomafont{subsection}}%
|
||||
{\color{cthesisblack}\thesubsection\hspace*{10pt}}%
|
||||
{0pt}%
|
||||
{\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
|
||||
\newcommand{\hugequote}{%
|
||||
{\book\fontsize{75}{80}\selectfont%
|
||||
@@ -513,7 +599,7 @@
|
||||
\end{minipage}%
|
||||
\bigskip
|
||||
}
|
||||
|
||||
%
|
||||
% Clean Quotation environment
|
||||
\newenvironment{thesis_quotation}%
|
||||
{%
|
||||
@@ -526,7 +612,6 @@
|
||||
\end{flushright}
|
||||
\end{minipage}%
|
||||
}%
|
||||
|
||||
%
|
||||
% Clean signs around word origins in definitions
|
||||
%\newcommand{\cthesisorigin}[1]{\textsf{\textlangle}#1\textsf{\textrangle}}
|
||||
|
||||
|
Reference in New Issue
Block a user