summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/classicthesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-17 21:04:56 +0000
committerKarl Berry <karl@freefriends.org>2018-06-17 21:04:56 +0000
commit1111348b689ad479c665ca9f800fc084fac37007 (patch)
tree68d77c769c80f6695de61ad1bff1f77d5189933f /Master/texmf-dist/tex/latex/classicthesis
parenta8356ff391b052c2df9c0e5094ad28bdc4ecc8cc (diff)
classicthesis (17jun18)
git-svn-id: svn://tug.org/texlive/trunk@48041 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/classicthesis')
-rw-r--r--Master/texmf-dist/tex/latex/classicthesis/classicthesis-arsclassica.sty92
-rw-r--r--Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty297
2 files changed, 236 insertions, 153 deletions
diff --git a/Master/texmf-dist/tex/latex/classicthesis/classicthesis-arsclassica.sty b/Master/texmf-dist/tex/latex/classicthesis/classicthesis-arsclassica.sty
new file mode 100644
index 00000000000..ccaf2ff8b07
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/classicthesis/classicthesis-arsclassica.sty
@@ -0,0 +1,92 @@
+%************************************************************
+% classicthesis-arsclassica.sty
+% Integrated into classicthesis with permission and adapted
+% by André Miede and Ivo Pletikosić
+% 2018
+%************************************************************
+% Copyright (C) 2008--2017 Lorenzo Pantieri
+% http://www.lorenzopantieri.net/
+%************************************************************
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{classicthesis-arsclassica}[2018/05/20]
+
+\ifdefined\classicthesis\else\RequirePackage{classicthesis}\fi
+
+
+%************************************************************
+% Fonts
+%************************************************************
+\ifthenelse{\boolean{xetex}\OR\boolean{luatex}}
+ {\setsansfont[Ligatures=TeX,Numbers=OldStyle]{Iwona}}
+ {\renewcommand{\sfdefault}{iwona}}
+\renewcommand*{\ct@altfont}{\sffamily}
+
+\ifthenelse{\boolean{ct@eulerchapternumbers}}% font for the chapter numbers; scale in classicthesis is 7
+ {\DeclareFixedFont{\chapterNumber}{U}{eur}{b}{n}{50}}%
+ {\DeclareFixedFont{\chapterNumber}{T1}{pplj}{m}{n}{50}}%
+
+%************************************************************
+% Caption
+%************************************************************
+\captionsetup{font=small,labelfont={sf,bf},format=hang}
+\captionsetup[table]{skip=\medskipamount}
+
+%************************************************************
+% Itemize
+%************************************************************
+\renewcommand\labelitemi{\color{CTsemi}$\bullet$}
+
+%************************************************************
+% Headlines
+%************************************************************
+\renewcommand{\sectionmark}[1]{\markright{\textsc{\MakeTextLowercase{\thesection}} \spacedlowsmallcaps{#1}}}
+\lehead{\mbox{\llap{\small\thepage\kern1em\color{CTsemi}\vline}\color{CTsemi}\hspace{0.5em}\headmark\hfil}}
+\rohead{\mbox{\hfil{\color{CTsemi}\headmark\hspace{0.5em}}\rlap{\small{\color{CTsemi}\vline}\kern1em\thepage}}}
+\renewcommand{\headfont}{\normalfont\sffamily}
+\renewcommand{\pnumfont}{\small\sffamily}
+\clearscrplain
+\rofoot[\mbox{\makebox[0pt][l]{\kern1em\thepage}}]{}
+
+%************************************************************
+% Layout of the chapter-, section-, subsection-,
+% subsubsection-, paragraph and description-headings
+%************************************************************
+% chapters
+\newcommand\formatchapter[1]{%
+ \vbox to \ht\strutbox{%
+ \setbox0=\hbox{\chapterNumber\thechapter\hspace{10pt}\vline\ }%
+ \advance\hsize-\wd0 \advance\hsize-10pt\raggedright%
+ \spacedallcaps{#1}\vss}}
+\titleformat{\chapter}[block]%
+ {\normalfont\Large\sffamily}%
+ {\textcolor{CTsemi}{\chapterNumber\thechapter}%
+ \ \,\hspace{10pt}\vline\ }{10pt}%
+ {\formatchapter}
+% sections
+\titleformat{\section}%
+ {\normalfont\Large\sffamily}{\textsc%
+ {\MakeTextLowercase{\thesection}}}%
+ {1em}{\spacedlowsmallcaps}
+% subsections
+\titleformat{\subsection}%
+ {\normalfont\sffamily\bfseries}{\textsc{\MakeTextLowercase%
+ {\thesubsection}}}{1em}{\normalsize}
+% subsubsections
+\titleformat{\subsubsection}%
+ {\normalfont\sffamily\bfseries\itshape}{\textsc%
+ {\MakeTextLowercase{\thesubsubsection}}}%
+ {1em}{\normalsize\itshape}
+% paragraphs
+\titleformat{\paragraph}[runin]%
+ {\normalfont\normalsize\sffamily\bfseries}{\textsc%
+ {\MakeTextLowercase{\theparagraph}}}%
+ {0pt}{\spacedlowsmallcaps}
+% descriptionlabels
+\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\bfseries\spacedlowsmallcaps{#1}}
+
+\titlespacing*{\chapter}{0pt}{1\baselineskip}{2\baselineskip}
+\titlespacing*{\section}{0pt}{2\baselineskip}{.8\baselineskip}[\marginparsep]
+\titlespacing*{\subsection}{0pt}{1.5\baselineskip}{.8\baselineskip}[\marginparsep]
+\titlespacing*{\paragraph}{0pt}{1\baselineskip}{1\baselineskip}
+%************************************************************
diff --git a/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty b/Master/texmf-dist/tex/latex/classicthesis/classicthesis.sty
index fa2793fce20..0105d617d73 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) 2017 André Miede and Ivo Pletikosić
+% Copyright (C) 2018 André Miede and Ivo Pletikosić
%
% 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
@@ -31,10 +31,12 @@
% It works with LaTeX, PDFLaTeX, XeLaTeX and LuaLaTeX.
%
% ********************************************************************
-\NeedsTeXFormat{LaTeX2e}%[2015/01/01] % fixed via latexrelease package, see below
-\ProvidesPackage{classicthesis}[2017/10/13 v4.4 Typographic style for a classic-looking thesis]
-\PassOptionsToPackage{latest}{latexrelease} % replacement for fixltx2e,
- \RequirePackage{latexrelease} % emulate newer kernel version if older is detected
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{classicthesis}[2018/06/03 v4.6 Typographic style for a classic-looking thesis]
+\providecommand{\classicthesis}{classicthesis v4.6}
+% Removed due to hint by David Carlisle and Ulrike Fischer
+% \PassOptionsToPackage{latest}{latexrelease} % replacement for fixltx2e,
+% \RequirePackage{latexrelease} % emulate newer kernel version if older is detected
\RequirePackage{ifthen}
@@ -50,7 +52,7 @@
\DeclareBoolOption{dottedtoc} % page numbers in ToC flushed right
\DeclareBoolOption{listsseparated} % OBSOLETE; toggles the vertical space between lof/lot entries of different chapters
-\DeclareBoolOption{parts} % use part division
+\DeclareBoolOption[true]{parts} % OBSOLETE - automatic check; use part division
\DeclareBoolOption{nochapters} % OBSOLETE - automatic check; disable all chapter-specific commands
\DeclareBoolOption{eulerchapternumbers} % use AMS Euler for chapter font (otherwise Palatino)
@@ -58,41 +60,33 @@
\DeclareBoolOption{floatperchapter} % numbering per chapter for all floats (i.e., Figure 1.1)
\DeclareBoolOption{manychapters} % additional space in ToC after chapter number (if two digits are needed)
-\DeclareBoolOption{listings} % load listings package and setup LoL
-\DeclareBoolOption{subfig} % setup for preloaded @subfig package
+\DeclareBoolOption{listings} % OBSOLETE - automatic check; load listings package and setup LoL
+\DeclareBoolOption{subfig} % OBSOLETE - automatic check; setup for preloaded @subfig package
\DeclareBoolOption{eulermath} % use awesome Euler fonts for mathematical formulae; only with pdflatex
-\DeclareBoolOption{beramono} % toggle a nice monospaced font (w/ bold) + pre-installed
-\DeclareBoolOption{minionpro} % setup for minion pro font; use minion pro small caps as well; only with pdflatex
-
+\DeclareBoolOption[true]{beramono} % toggle a nice monospaced font (w/ bold) + pre-installed
+\DeclareBoolOption{minionpro} % OBSOLETE - removed; setup for minion pro font; use minion pro small caps as well
+\DeclareBoolOption[true]{palatino} % default is Palatino/Paladio/TeX Gyre Pagella font, use this switch to skip selection
+\DeclareStringOption[classicthesis]{style} % classicthesis or arsclassica
\DeclareBoolOption{minionprospacing} % OBSOLETE; use minion pro's textssc for letter spacing
\DeclareBoolOption{pdfspacing} % OBSOLETE; use pdftex for letterspacing (via microtype)
\DeclareBoolOption{a4paper}
\DeclareBoolOption{a5paper}
+\DeclareBoolOption{b5paper}
\DeclareBoolOption{letterpaper}
\DeclareStringOption[a4]{paper} % paper size defaults to A4
\ProcessKeyvalOptions{ct}
-
-
%%% seems that KOMA-Script gives preference to old-style paper options, thus first
\ifthenelse{\boolean{ct@letterpaper}}{\renewcommand*{\ct@paper}{letter}}{}
\ifthenelse{\boolean{ct@a5paper}}{\renewcommand*{\ct@paper}{a5}}{}
+\ifthenelse{\boolean{ct@b5paper}}{\renewcommand*{\ct@paper}{b5}}{}
\ifthenelse{\boolean{ct@a4paper}}{\renewcommand*{\ct@paper}{a4}}{}
-%%% then
-\ifthenelse{\equal{\ct@paper}{a4}}%
- {\setboolean{ct@a4paper}{true} \setboolean{ct@a5paper}{false} \setboolean{ct@letterpaper}{false}}%
- {}
-\ifthenelse{\equal{\ct@paper}{a5}}%
- {\setboolean{ct@a4paper}{false} \setboolean{ct@a5paper}{true} \setboolean{ct@letterpaper}{false}}%
- {}
-\ifthenelse{\equal{\ct@paper}{letter}}%
- {\setboolean{ct@a4paper}{false} \setboolean{ct@a5paper}{false} \setboolean{ct@letterpaper}{true}}%
- {}
-
+\ifthenelse{\equal{\ct@paper}{letter}\OR\equal{\ct@paper}{a5}\OR\equal{\ct@paper}{b5}\OR\equal{\ct@paper}{a4}}{\relax}%
+ {\PackageWarningNoLine{classicthesis}{Text area setup only provided for paper sizes: letter, a5, b5, a4. You are using paper=\ct@paper}}
% subfig-related stuff
@@ -105,52 +99,59 @@
}{\relax}%
% listings-related stuff
+\@ifpackageloaded{listings}%
+ {\setboolean{ct@listings}{true}%
+ }{\relax}
+
\ifthenelse{\boolean{ct@listings}}%
- {\@ifpackageloaded{listings}%
- {\relax}{\RequirePackage{listings}}%
- }{\relax}%
+ {\RequirePackage{listings}%
+ }{\relax}
% fine-tuning if we do not use chapters
-
\ifthenelse{\isundefined{\chapter}\OR\boolean{ct@nochapters}}
{
\PackageWarningNoLine{classicthesis}{Chapter sectioning command not present in this document class. %
- Deactivating options floatperchapter, linedheaders, manychapters, listsseparated, eulerchapternumbers and parts}%
- \setboolean{ct@linedheaders}{false}%
- \setboolean{ct@listsseparated}{false}%
- \setboolean{ct@eulerchapternumbers}{false}%
- \setboolean{ct@parts}{false}% %%%IVO: note that parts exist even when chapters are not defined!
- \setboolean{ct@manychapters}{false}%
- \setboolean{ct@floatperchapter}{false}%
+ Deactivating options floatperchapter, linedheaders, manychapters, listsseparated, eulerchapternumbers}%
+ \setboolean{ct@linedheaders}{false}
+ \setboolean{ct@listsseparated}{false}
+ \setboolean{ct@eulerchapternumbers}{false}
+ \setboolean{ct@parts}{false}
+ \setboolean{ct@manychapters}{false}
+ \setboolean{ct@floatperchapter}{false}
\setboolean{ct@nochapters}{true}
}{\relax}
+% no parts in document class
+\ifthenelse{\NOT\isundefined{\part}\AND\boolean{ct@parts}}
+ {\setboolean{ct@parts}{true}}{\setboolean{ct@parts}{false}}
+
+% use arsclassica style
+\provideboolean{ct@arsclassica}
+\ifthenelse{\equal{\ct@style}{arsclassica}}%
+ {%\setboolean{ct@eulerchapternumbers}{true}% for arsclassica only eulerchapternumbers
+ \setboolean{ct@arsclassica}{true}}{\setboolean{ct@arsclassica}{false}}
+
% ********************************************************************
% PDF and XeLaTeX Stuff
% ********************************************************************
\RequirePackage{ifpdf}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
-\ifthenelse{\boolean{pdf}\OR\boolean{luatex}\OR\boolean{xetex}}%
- {
- \RequirePackage{hyperref}
- \pdfstringdefDisableCommands{\let\thepart=\relax} % no part numbers (i, ii, iii) in PDF outline IVO
- %\pdfstringdefDisableCommands{\renewcommand{\thepart}{\Roman{part}}} %%%IVO bring back Part numbers in PDF outline
- }{}
-
% ********************************************************************
% Colors
% ********************************************************************
\PassOptionsToPackage{dvipsnames}{xcolor}
\RequirePackage{xcolor} % [dvipsnames]
+\definecolor{CTsemi}{gray}{0.55} % chapter numbers will be semi transparent .5 .55 .6 .0
+\definecolor{CTcitation}{rgb}{0,0.5,0} % WebGreen
+\definecolor{CTurl}{named}{Maroon} % Maroon
+\definecolor{CTtitle}{named}{Maroon} % Maroon {cmyk}{0, 0.87, 0.68, 0.32}
+\definecolor{CTlink}{named}{RoyalBlue} % RoyalBlue {cmyk}{1, 0.50, 0, 0}
\definecolor{halfgray}{gray}{0.55} % chapter numbers will be semi transparent .5 .55 .6 .0
-\definecolor{webgreen}{rgb}{0,.5,0}
-\definecolor{webbrown}{rgb}{.6,0,0}
-%\definecolor{Maroon}{cmyk}{0, 0.87, 0.68, 0.32}
-%\definecolor{RoyalBlue}{cmyk}{1, 0.50, 0, 0}
-%\definecolor{Black}{cmyk}{0, 0, 0, 0}
+\definecolor{webgreen}{rgb}{0,0.5,0}
+\definecolor{webbrown}{rgb}{0.6,0,0}
% ********************************************************************
% Font Stuff
@@ -158,35 +159,28 @@
\ifthenelse{\boolean{xetex}\OR\boolean{luatex}}
{ % use fontspec and OpenType fonts with utf8 engines
\RequirePackage{fontspec}
- \setmainfont[Ligatures=TeX,Numbers=OldStyle]{TeX Gyre Pagella} % Palatino clone
- \linespread{1.05} % a bit more for Palatino
+ \ifthenelse{\boolean{ct@palatino}}% default
+ {
+ \setmainfont[Ligatures=TeX,Numbers=OldStyle]{TeX Gyre Pagella} % Palatino clone
+ \linespread{1.05} % a bit more for Palatino
+ \RequirePackage{unicode-math}
+ \setmathfont{TeX Gyre Pagella Math}
+ }{\relax} % use class' default font
\ifthenelse{\boolean{ct@beramono}}%
{\setmonofont[Scale=0.85]{DejaVu Sans Mono}} % like Bera; Scale=MatchLowercase
{\setmonofont[Scale=1]{Latin Modern Mono}}
- \RequirePackage{unicode-math}
- \setmathfont{TeX Gyre Pagella Math}
% font for the chapter numbers will be defined in the old way below
% because there is no OpenType Euler font; this is how it should be done:
%\newfontface\chapterNumber[Scale=7,Color=000000]{TeX Gyre Pagella Bold}
}
{ % use Type 1 fonts with pdflatex
- \ifthenelse{\boolean{ct@minionpro}}% specialists: MinionPro
- {%
- % in order have Euler math fonts work with Minion, special option is needed
- \ifthenelse{\boolean{ct@eulermath}}%
- {%
- \PassOptionsToPackage{opticals,mathlf,onlytext}{MinionPro}%
- \RequirePackage{MinionPro} % opticals, fullfamily, osf
- }{%
- \PassOptionsToPackage{opticals,mathlf}{MinionPro}%
- \RequirePackage{MinionPro} % opticals, fullfamily, osf
- }
- }{
+ \ifthenelse{\boolean{ct@palatino}}% default
+ {
% default: Palatino
\PassOptionsToPackage{osf,sc}{mathpazo}%
\RequirePackage{mathpazo} % Palatino with real small caps and old style figures
\linespread{1.05} % a bit more for Palatino
- }
+ }{\relax}
\ifthenelse{\boolean{ct@beramono}}%
{\PassOptionsToPackage{scaled=0.85}{beramono}%
@@ -222,57 +216,38 @@
% ********************************************************************
% Textblock size
%*******************************************************
-\@ifpackageloaded{typearea}%
- {\relax}{%
- \PassOptionsToPackage{headinclude,footinclude}{typearea}
- \RequirePackage{typearea}%
- }
+\PassOptionsToPackage{headinclude,footinclude}{typearea} % for classes other than KOMA
+\RequirePackage{typearea}
-\ifthenelse{\boolean{ct@letterpaper}}%
- {% A4
- \ifthenelse{\boolean{ct@minionpro}}%
- {% Minion gets some extra sizes
- \PackageInfo{classicthesis}{letter paper, MinionPro}%
- \areaset[current]{332pt}{634pt}% guessing from A4 values
- \setlength{\marginparwidth}{7.5em}%
- \setlength{\marginparsep}{2em}%
- }{% Palatino or other
+\ifthenelse{\equal{\ct@paper}{letter}}%
+ {% Letter 216mm x 279mm
\PackageInfo{classicthesis}{letter paper, Palatino or other}
- \areaset[current]{356pt}{700pt} % guessing from A4 values
+ \areaset[current]{356pt}{700pt}% guessing from A4 values
\setlength{\marginparwidth}{7em}%
\setlength{\marginparsep}{2em}%
- }%
}{\relax}
-\ifthenelse{\boolean{ct@a5paper}}%
- {% A5
- \ifthenelse{\boolean{ct@minionpro}}%
- {% Minion gets some extra sizes
- \PackageInfo{classicthesis}{A5 paper, MinionPro}%
- \areaset[current]{278pt}{556pt}%
- \setlength{\marginparwidth}{5em}%
- \setlength{\marginparsep}{1.25em}%
- }{% Palatino or other
+\ifthenelse{\equal{\ct@paper}{b5}}%
+ {% B5 176mm x 250mm
+ % Thanks to Jos\'e M. Alcaide
+ \PackageInfo{classicthesis}{B5 paper, Palatino or other}%
+ \areaset[current]{311pt}{645pt}%
+ \setlength{\marginparwidth}{6em}%
+ \setlength{\marginparsep}{1.5em}%
+ }{\relax}
+\ifthenelse{\equal{\ct@paper}{a5}}%
+ {% A5 148mm x 210mm
\PackageInfo{classicthesis}{A5 paper, Palatino or other}%
\areaset[current]{288pt}{555pt}%
\setlength{\marginparwidth}{4em}%
\setlength{\marginparsep}{1.25em}%
- }%
}{\relax}
-\ifthenelse{\boolean{ct@a4paper}}%
- {% A4
- \ifthenelse{\boolean{ct@minionpro}}%
- {% Minion gets some extra sizes
- \PackageInfo{classicthesis}{A4 paper, MinionPro}%
- \areaset[current]{312pt}{684pt}% 609 + 33 + 42 head \the\footskip
- \setlength{\marginparwidth}{7.5em}%
- \setlength{\marginparsep}{2em}%
- }{% Palatino or other
+\ifthenelse{\equal{\ct@paper}{a4}}%
+ {% A4 210mm x 297mm
\PackageInfo{classicthesis}{A4 paper, Palatino or other}
\areaset[current]{336pt}{750pt} % ~ 336 * factor 2 + 33 head + 42 \the\footskip
% \areaset{336pt}{761pt} % 686 (factor 2.2) + 33 head + 42 head \the\footskip 10pt
\setlength{\marginparwidth}{7em}%
\setlength{\marginparsep}{2em}%
- }%
}{\relax}
% Here are some suggestions for the text widths and heights:
@@ -282,12 +257,7 @@
% Minion 10pt: 264--288pt | 561--609pt
% Minion 11pt: 288--312pt | 609--657pt
% Minion 12pt: 336pt | 672pt
-% Libertine 10pt:
-% Libertine 11pt:
-% Libertine 12pt:
-% kpfonts 10pt:
-% kpfonts 11pt:
-% kpfonts 12pt:
+
% ********************************************************************
% Own Stuff
@@ -311,12 +281,14 @@
% [\graffito@setup\raggedleft\hspace{0pt}{#1}]%
% {\graffito@setup\raggedright\hspace{0pt}{#1}}}
+\RequirePackage{mparhack} % get marginpar right
+
\let\oldmarginpar\marginpar
\renewcommand{\marginpar}[2][]{% always add optional parameter, make it empty by default
\if\relax\detokenize{#1}\relax% optional parameter empty, in all normal document calls
- \oldmarginpar[\graffito@setup\raggedleft\hspace{0pt}#2]{\graffito@setup\raggedright\hspace{0pt}#2}%
+ \oldmarginpar[\graffito@setup\raggedleft\hspace{0pt}{#2}]{\graffito@setup\raggedright\hspace{0pt}#2}%
\else%two parameters, let them use their styling
- \oldmarginpar[#1]{#2}%
+ \oldmarginpar[{#1}]{#2}%
\fi%
}
@@ -333,35 +305,27 @@
\RequirePackage{booktabs} % for better rules in tables
\RequirePackage{textcase} % for \MakeTextUppercase
+% Provide a hook for font customization, e.g., for arsclassica
+\newcommand{\ct@altfont}{}% \color{red}\sffamily
+\newcommand{\ct@caps}{\ct@altfont\scshape} % typesetting smallcaps
+
+%%% define spacedallcaps and spacedlowsmallcaps
%%% engine-dependent letterspacing: microtype for pdflatex, fontspec for xelatex and luatex
-\ifthenelse{\boolean{ct@minionpro}}{% MinionPro small caps
- \PackageInfo{classicthesis}{Using MinionPro's textssc for character spacing.}
- \DeclareRobustCommand{\spacedallcaps}[1]{\textssc{\MakeTextUppercase{#1}}}
- \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textssc{\MakeTextLowercase{#1}}}
- }{
- % engine-based spacedallcaps and spacedlowsmallcaps
- \ifthenelse{\boolean{pdf}\OR\boolean{luatex}}{ % pdf will soon test true for both pdflatex and luatex; \AND\NOT\boolean{luatex}
- \PackageInfo{classicthesis}{Using pdftex/microtype for character spacing.%
- Make sure your pdftex is version 1.40 or higher.}%
- \microtypesetup{expansion=false}
- \DeclareRobustCommand{\spacedallcaps}[1]{\textls[160]{\MakeTextUppercase{#1}}}
- \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]{\scshape\MakeTextLowercase{#1}}}
- }{\relax}
-
- \ifthenelse{\boolean{xetex}}{ % use fontspec features; \OR\boolean{luatex} does not work well
- \DeclareRobustCommand{\spacedallcaps}[1]{{\addfontfeature{LetterSpace=18.0}\MakeTextUppercase{#1}}}% WordSpace=1.8
- \DeclareRobustCommand{\spacedlowsmallcaps}[1]{{\addfontfeatures{LetterSpace=14.0}\scshape\MakeTextLowercase{#1}}}% WordSpace=1.8
- }{\relax}
-
- \ifthenelse{\boolean{pdf}\OR\boolean{xetex}\OR\boolean{luatex}}% ever used? only dvi engines remain
- {\relax}{%
- \RequirePackage{soulutf8} % for letterspacing
- \sodef\allcapsspacing{\upshape}{0.15em}{0.65em}{0.6em}%
- \sodef\lowsmallcapsspacing{\scshape}{0.075em}{0.5em}{0.6em}%
- \DeclareRobustCommand{\spacedallcaps}[1]{\MakeTextUppercase{\allcapsspacing{#1}}}%
- \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\MakeTextLowercase{\lowsmallcapsspacing{#1}}}%\protect
- }%
- }
+ \ifthenelse{\boolean{pdf}\OR\boolean{luatex}}{ % pdf will soon test true for both pdflatex and luatex; \AND\NOT\boolean{luatex}
+ \PackageInfo{classicthesis}{Using microtype for character spacing.%
+ Make sure your pdflatex is version 1.40 or higher.}%
+ % \microtypesetup{expansion=false}
+ \microtypesetup{protrusion=true,expansion=true}
+ \DeclareRobustCommand{\spacedallcaps}[1]{\textls[160]{\ct@caps\MakeTextUppercase{#1}}}
+ \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]{\ct@caps\MakeTextLowercase{#1}}}
+ }{\relax}
+
+ \ifthenelse{\boolean{xetex}}{ % use fontspec features; \OR\boolean{luatex} does not work well
+ \PackageInfo{classicthesis}{Using fontspec for character spacing.}%
+ \microtypesetup{expansion=false}
+ \DeclareRobustCommand{\spacedallcaps}[1]{{\addfontfeature{LetterSpace=18.0}\ct@caps\MakeTextUppercase{#1}}}% WordSpace=1.8
+ \DeclareRobustCommand{\spacedlowsmallcaps}[1]{{\addfontfeatures{LetterSpace=14.0}\ct@caps\MakeTextLowercase{#1}}}% WordSpace=1.8
+ }{\relax}
% ********************************************************************
% headlines
@@ -370,15 +334,16 @@
\PassOptionsToPackage{automark}{scrlayer-scrpage}
%\RequirePackage{scrpage2} % provides headers and footers (KOMA Script)
\RequirePackage{scrlayer-scrpage} % provides headers and footers (KOMA Script)
- \clearpairofpagestyles
+ \clearpairofpagestyles
%\setheadsepline{0pt}
\let\MakeMarkcase\spacedlowsmallcaps
\ifthenelse{\boolean{ct@nochapters}}%
{\relax}%
{\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}}
- \renewcommand{\sectionmark}[1]{\markright{\thesection\enspace\spacedlowsmallcaps{#1}}}
+ \renewcommand{\sectionmark}[1]{\markright{\textsc{\thesection}\enspace\spacedlowsmallcaps{#1}}}
\lehead{\mbox{\llap{\small\pagemark\kern2em}\headmark\hfil}}
\rohead{\mbox{\hfil{\headmark}\rlap{\small\kern2em\pagemark}}}
+ \ofoot[\small\pagemark]{}% only for plain.scrheadings page style (first page of a chapter)
\renewcommand{\headfont}{\small}
% \DeclareRobustCommand{\fixBothHeadlines}[2]{} % <--- ToDo
% hack to get the content headlines right (thanks, Lorenzo!)
@@ -386,7 +351,7 @@
\ifthenelse{\boolean{ct@nochapters}}%
{\section*{\contentsname}}%nochapters
{\chapter*{\contentsname}}%chapters
- \@mkboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}} %%%IVO what does this do?
+ \@mkboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}} %%%IVO: what does this do?
% ********************************************************************
@@ -405,19 +370,19 @@
\def\ctparttext@keep{} % Thanks to Ivo
\def\ctparttext@print{\ctparttext@keep \gdef\ctparttext@keep{}}
\titleformat{\part}[display]
- {\normalfont\centering\large}%
+ {\normalfont\ct@altfont\centering\large}%
{\thispagestyle{empty}\partname~\MakeTextUppercase{\thepart}}{1em}%
- {\color{Maroon}\spacedallcaps}[\bigskip\normalfont\normalsize\color{Black}\begin{quote}\ctparttext@print\end{quote}]
+ {\color{CTtitle}\spacedallcaps}[\bigskip\normalfont\normalsize\color{Black}\begin{quote}\ctparttext@print\end{quote}]
}{\relax}
% chapters
\ifthenelse{\boolean{ct@linedheaders}}%
{% lines above and below, number right
\titleformat{\chapter}[display]%
- {\relax}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }{0pt}%
+ {\relax}{\raggedleft{\color{CTsemi}\chapterNumber\thechapter} \\ }{0pt}%
{\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}{% something like Bringhurst
\titleformat{\chapter}[display]%
- {\relax}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{halfgray}\chapterNumber\thechapter}}{0pt}%
+ {\relax}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{CTsemi}\chapterNumber\thechapter}}{0pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}
% sections \FloatBarrier
@@ -478,7 +443,7 @@
\renewcommand{\cftpartaftersnum}{}%
\renewcommand{\cftpartaftersnumb}{\spacedlowsmallcaps}%
\setlength{\cftpartnumwidth}{\cftchapnumwidth}
- \renewcommand{\cftpartfont}{\color{Maroon}\normalfont}%
+ \renewcommand{\cftpartfont}{\color{CTtitle}\normalfont}%
\cftpagenumbersoff{part}
\renewcommand{\cftpartpagefont}{\normalfont}%
\ifthenelse{\boolean{ct@dottedtoc}}{\relax}%
@@ -598,10 +563,8 @@
{\AtBeginDocument{\addtocontents{toc}{\protect\vspace{-\cftbeforechapskip}}}}
}
-
\newcommand{\tocEntry}[1]{\protect\numberline {}{#1}}%
-
%% remove the vertical space between lof/lot entries of different chapters
\ifthenelse{\boolean{ct@listsseparated}}{%
\PackageWarningNoLine{classicthesis}{Option "listsseparated" deprecated as of version 2.9.}%
@@ -617,7 +580,6 @@
% }%
% }{%
-
\DeclareRobustCommand*{\deactivateaddvspace}{\let\addvspace\@gobble}%
\AtBeginDocument{%
\addtocontents{lof}{\deactivateaddvspace}%
@@ -630,18 +592,18 @@
% }
% ********************************************************************
-% footnotes setup
+% Footnotes setup
% ********************************************************************
\ifdefined\deffootnote
% KOMA-command, footnotemark not superscripted at the bottom
\deffootnote{0em}{0em}{\thefootnotemark\hspace*{.5em}}%
\message{Using KOMA-command "deffootnote" for footnote setup}%
\else
- \PassOptionsToPackage{flushmargin}{footmisc}%
+ \PassOptionsToPackage{marginal}{footmisc}% marginal flushmargin
\RequirePackage{footmisc}%
- \setlength{\footnotemargin}{-.5em}%
+ % \setlength{\footnotemargin}{-.5em}%
\PackageWarningNoLine{classicthesis}{Using package "footmisc" with option %
- "flushmargin" for footnote setup (not 100\% the same as with KOMA)}%
+ "marginal" for footnote setup (not 100\% the same as with KOMA)}%
\fi
% ********************************************************************
@@ -658,8 +620,19 @@
\PassOptionsToPackage{draft}{prelim2e}
\RequirePackage{prelim2e}
\renewcommand{\PrelimWords}{\relax}
- \renewcommand{\PrelimText}{\footnotesize[\,\today\ at \thistime\ -- \texttt{classicthesis}~\myVersion\,]}
-}{\renewcommand{\finalVersionString}{\emph{Final Version} as of \today\ (\texttt{classicthesis}~\myVersion).}}
+ \renewcommand{\PrelimText}{\footnotesize[\,\today\ at \thistime\ -- \myVersion\,]}
+}{\renewcommand{\finalVersionString}{\emph{Final Version} as of \today\ (\myVersion).}}
+
+% ********************************************************************
+% Captions
+% ********************************************************************
+% \PassOptionsToPackage{font=small}{caption} % ,format=hang ,labelformat=smallcaps
+\RequirePackage{caption}
+\captionsetup{font=small}
+% Thanks to cgnieder and Claus Lahiri
+% http://tex.stackexchange.com/questions/69349/spacedlowsmallcaps-in-caption-label
+% [REMOVED DUE TO OTHER PROBLEMS, SEE ISSUE #82]
+%\DeclareCaptionLabelFormat{smallcaps}{\bothIfFirst{#1}{~}\MakeTextLowercase{\textsc{#2}}}
% ********************************************************************
% Caption numbering now w/o chapter number
@@ -689,6 +662,24 @@
}
% ********************************************************************
+% arsclassica integration (experimental, dirty hack currently)
+% ********************************************************************
+\ifct@arsclassica
+\RequirePackage{classicthesis-arsclassica}
+\fi
+
+
+% ********************************************************************
+% hyperreferences, pdf outline
+% ********************************************************************
+\PassOptionsToPackage{hyperfootnotes=false}{hyperref}
+\RequirePackage{hyperref}
+ \pdfstringdefDisableCommands{\let\thepart=\relax} % no part numbers (i, ii, iii) in PDF outline IVO
+ %\pdfstringdefDisableCommands{\renewcommand{\thepart}{\Roman{part}}} %%%IVO bring back Part numbers in PDF outline
+ \hypersetup{colorlinks=true,linktocpage=true,breaklinks=true,urlcolor=CTurl,linkcolor=CTlink,citecolor=CTcitation}
+
+
+% ********************************************************************
% Backward-compatibility
% ********************************************************************
\let\myChapter\chapter