Ars Classica LaTeX
Ars Classica LaTeX
Ars Classica LaTeX
CUSTOMIZING CLASSICTHESIS
WITH THE ARSCLASSICA PACKAGE
USER MANUAL
Italian TEX and LATEX User Group
http://www.guit.sssup.it/
2010, February
Lorenzo Pantieri: Customizing ClassicThesis with the ArsClassica package,
User Manual, © 2010, February.
WEBSITE:
http://www.lorenzopantieri.net/
E-MAIL:
[email protected]
SOMMARIO
ACKNOWLEDGEMENTS
I wish first of all to thank the members of the Staff of the Italian TEX
and LATEX User Group (guIt, http://www.guit.sssup.it/), in partic-
ular Prof. Enrico Gregorio and Andrea Tonelli, for their invaluable
aid during the writing of this work, the detailed explanations, the pa-
tience and the precision in the suggestions, the supplied solutions, the
competence and the kindness. Thanks also to all the people who have
discussed with me on the forum of the guIt, prodigal of precious ob-
servations and good advices.
Finally, thanks to André Miede, for his wonderful ClassicThesis
style, and to Daniel Gottschlag, who has given to me the hint for this
original reworking.
iii
CONTENTS
1 FUNDAMENTALS 1
1.1 Introduction 1
1.2 Use of the package 1
1.3 Options of the package 2
1.4 The style 2
1.5 New commands 3
1.5.1 Particular logos 3
1.5.2 Graphics with coloured background 3
1.6 Examples 4
2 THE CODE 7
BIBLIOGRAPHY 17
INDEX 18
iv
1 F U N DA M E N TA L S
CONTENTS
1.1 Introduction 1
1.2 Use of the package 1
1.3 Options of the package 2
1.4 The style 2
1.5 New commands 3
1.5.1 Particular logos 3
1.5.2 Graphics with coloured background 3
1.6 Examples 4
1.1 INTRODUCTION
The ArsClassica package changes some typographical aspects of the The art of writing
ClassicThesis style, by André Miede [2, 3]. It allows to reproduce the with LATEX
layout of my guide The art of writing in LaTeX [4] (in Italian) and of
the present document. The hint for this original reworking of Classic-
Thesis was gave to me by Daniel Gottschlag.
\usepackage[h. . .i]{classicthesis-ldpkg}
\usepackage[h. . .i]{classicthesis}
\usepackage[h. . .i]{arsclassica}
\begin{document}
...
1
2 FUNDAMENTALS
\end{document}
For example, the present document has been obtained with the fol-
lowing code:
\documentclass[10pt,a4paper,twoside,openright,titlepage,fleqn,%
headinclude,,footinclude,BCOR5mm,%
numbers=noenddot,cleardoublepage=empty,%
tablecaptionabove]{scrreprt}
\usepackage{h. . .i}
\usepackage[backref]{classicthesis-ldpkg}
\usepackage[eulerchapternumbers,subfig,beramono,%
eulermath,pdfspacing]{classicthesis}
\usepackage{arsclassica}
\usepackage{h. . .i}
\begin{document}
...
\end{document}
\usepackage[hlanguagei]{arsclassica}
The package offers the commands \ctLaTeX , \ctLaTeXe and \ctTeX , The commands
which allow to reproduce respectively the LATEX, LATEX 2ε and TEX logos \ctLaTeX,
\ctLaTeXe, \ctTeX
correctly written in Iwona.
tori I a tori I a
t zz t zz
al
al
i
i
o Util
o Util
ia
ia
ni di
guIt guIt
ni di
pp
pp
TE TE
X ! Gru X ! Gru
(a) Image without background. (b) Image with background.
\renewcommand{\includegraphics}{\arsincludegraphics}
in order that each of your included graphics has this blue background.
In the previous versions of ArsClassica, \arsincludegraphics com-
mand was named \myincludegraphics : the old name is still man-
tained (for now), but deprecated.
1.6 EXAMPLES
Note: The content of Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus
this chapter is just elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dic-
some dummy text. It
is not a real language.
tum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id,
vulputate a, magna. Donec vehicula augue eu neque.
A subsection
A sub-subsection
Nulla malesuada porttitor diam. Donec felis erat, congue non, volut-
pat at, tincidunt tristique, libero. Vivamus viverra fermentum felis.
Donec nonummy pellentesque ante. Phasellus adipiscing semper elit.
Proin fermentum massa ac quam. Sed diam turpis, molestie vitae,
placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula,
eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feu-
1.6 EXAMPLES 5
giat magna. Nunc eleifend consequat lorem. Sed lacinia nulla vitae
enim. Pellentesque tincidunt purus vel magna. Integer non enim.
Praesent euismod nunc eu purus. Donec bibendum quam in tellus.
Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate metus eu
enim. Vestibulum pellentesque felis eu massa.
MANE Lorem ipsum dolor sit amet, consectetuer adipiscing elit. The labels of
description lists are
TEKEL Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. in Iwona.
Curabitur dictum gravida mauris.
Table 1: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur
dictum gravida mauris.
p ¬p
V F
F V
6 \newboolean{english}
7 \newboolean{french}
8 \newboolean{german}
9 \newboolean{spanish}
10 \newboolean{italian}
11 \DeclareOption{english}{\setboolean{english}{true}}
12 \DeclareOption{french}{\setboolean{french}{true}}
13 \DeclareOption{german}{\setboolean{german}{true}}
14 \DeclareOption{spanish}{\setboolean{spanish}{true}}
15 \DeclareOption{italian}{\setboolean{italian}{true}}
16 \ExecuteOptions{english}
17 \ProcessOptions\relax
7
8 THE CODE
35 \ifthenelse{\boolean{english}}%
36 {%
37 \PackageInfo{arsclassica}{Using option "english". %
38 This activates english language in "backref".}
39 \renewcommand*{\backreftwosep}{ and~}
40 \renewcommand*{\backreflastsep}{, and~}
41 \renewcommand*{\backrefalt}[4]{%
42 \ifcase #1 %
43 \relax%
44 \or
45 (Cited on page~#2.)%
46 \else
47 (Cited on pages~#2.)
48 \fi}
49 }
50 {\relax}
51
52 \ifthenelse{\boolean{french}}%
53 {%
54 \PackageInfo{arsclassica}{Using option "french". %
55 This activates french language in "backref".}
56 \renewcommand*{\backreftwosep}{ et~}
57 \renewcommand*{\backreflastsep}{ et~}
58 \renewcommand*{\backrefalt}[4]{%
59 \ifcase #1 %
60 \relax%
61 \or
62 (Cit\’e \‘a page~#2.)%
63 \else
64 (Cit\’e aux pages~#2.)
65 \fi}
66 }
67 {\relax}
68
69 \ifthenelse{\boolean{german}}%
70 {%
71 \PackageInfo{arsclassica}{Using option "german". %
72 This activates german language in "backref".}
73 \renewcommand*{\backreftwosep}{ und~}
74 \renewcommand*{\backreflastsep}{ und~}
75 \renewcommand*{\backrefalt}[4]{%
76 \ifcase #1 %
77 \relax%
78 \or
79 (Zitiert auf Seite~#2.)%
80 \else
81 (Zitiert auf Seiten~#2.)
82 \fi}
83 }
84 {\relax}
85
86 \ifthenelse{\boolean{spanish}}%
THE CODE 9
87 {%
88 \PackageInfo{arsclassica}{Using option "spanish". %
89 This activates spanish language in "backref".}
90 \renewcommand*{\backreftwosep}{ y~}
91 \renewcommand*{\backreflastsep}{ y~}
92 \renewcommand*{\backrefalt}[4]{%
93 \ifcase #1 %
94 \relax%
95 \or
96 (Citado en la p\’agina~#2.)%
97 \else
98 (Citado en las p\’aginas~#2.)
99 \fi}
100 }
101 {\relax}
102
103 \ifthenelse{\boolean{italian}}%
104 {%
105 \PackageInfo{arsclassica}{Using option "italian". %
106 This activates italian language in "backref".}
107 \renewcommand*{\backreftwosep}{ e~}
108 \renewcommand*{\backreflastsep}{ e~}
109 \renewcommand*{\backrefalt}[4]{%
110 \ifcase #1 %
111 \relax%
112 \or
113 (Citato a pagina~#2.)%
114 \else
115 (Citato alle pagine~#2.)
116 \fi}
117 }
118 {\relax}
119 \fi
Settings of minitoc.
120 \@ifpackageloaded{minitoc}
121 {%
122 \ifthenelse{\boolean{english}}%
123 {%
124 \def\ptctitle{contents}
125 \def\mtctitle{contents}
126 \def\stctitle{contents}
127 \setlength{\mtcindent}{0pt}
128 \renewcommand{\mtifont}{\normalsize\sffamily%
129 \scshape\lsstyle}
130 }
131 {%
132 \setlength{\mtcindent}{0pt}
133 \renewcommand{\mtifont}{\normalsize\sffamily%
134 \scshape\lsstyle}
135 }
136 }
10 THE CODE
137 {\relax}
138
139 \@ifpackageloaded{minitoc}
140 {%
141 \ifthenelse{\boolean{french}}%
142 {%
143 \def\ptctitle{mati\‘eres}
144 \def\mtctitle{mati\‘eres}
145 \def\stctitle{mati\‘eres}
146 \setlength{\mtcindent}{0pt}
147 \renewcommand{\mtifont}{\normalsize\sffamily%
148 \scshape\lsstyle}
149 }
150 {%
151 \setlength{\mtcindent}{0pt}
152 \renewcommand{\mtifont}{\normalsize\sffamily%
153 \scshape\lsstyle}
154 }
155 }
156 {\relax}
157
158 \@ifpackageloaded{minitoc}
159 {%
160 \ifthenelse{\boolean{german}}%
161 {%
162 \def\ptctitle{inhaltsverzeichnis}
163 \def\mtctitle{inhaltsverzeichnis}
164 \def\stctitle{inhaltsverzeichnis}
165 \setlength{\mtcindent}{0pt}
166 \renewcommand{\mtifont}{\normalsize\sffamily%
167 \scshape\lsstyle}
168 }
169 {%
170 \setlength{\mtcindent}{0pt}
171 \renewcommand{\mtifont}{\normalsize\sffamily%
172 \scshape\lsstyle}
173 }
174 }
175 {\relax}
176
177 \@ifpackageloaded{minitoc}
178 {%
179 \ifthenelse{\boolean{spanish}}%
180 {%
181 \def\ptctitle{\’indice}
182 \def\mtctitle{\’indice}
183 \def\stctitle{\’indice}
184 \setlength{\mtcindent}{0pt}
185 \renewcommand{\mtifont}{\normalsize\sffamily%
186 \scshape\lsstyle}
187 }
188 {%
THE CODE 11
189 \setlength{\mtcindent}{0pt}
190 \renewcommand{\mtifont}{\normalsize\sffamily%
191 \scshape\lsstyle}
192 }
193 }
194 {\relax}
195
196 \@ifpackageloaded{minitoc}
197 {%
198 \ifthenelse{\boolean{italian}}%
199 {%
200 \def\ptctitle{indice}
201 \def\mtctitle{indice}
202 \def\stctitle{indice}
203 \setlength{\mtcindent}{0pt}
204 \renewcommand{\mtifont}{\normalsize\sffamily%
205 \scshape\lsstyle}
206 }
207 {%
208 \setlength{\mtcindent}{0pt}
209 \renewcommand{\mtifont}{\normalsize\sffamily%
210 \scshape\lsstyle}
211 }
212 }
213 {\relax}
234 \RequirePackage{soul}
235 \sodef\allcapsspacing{\sffamily\upshape}%
236 {0.15em}{0.65em}{0.6em}%
237 \sodef\lowsmallcapsspacing{\sffamily\scshape}%
238 {0.075em}{0.5em}{0.6em}%
239 \DeclareRobustCommand{\spacedallcaps}[1]%
240 {\MakeTextUppercase{\allcapsspacing{#1}}}%
241 \DeclareRobustCommand{\spacedlowsmallcaps}[1]%
242 {\MakeTextLowercase{\textsc%
243 {\lowsmallcapsspacing{#1}}}}%
244 }%
245 }
Use of Iwona for the titles of sectioning units (chapters, sections, sub-
sections, sub-subsections, paragraphs, subparagraphs) and for the la-
bels of description lists.
256 \RequirePackage{titlesec}
257 % parts
258 \ifthenelse{\boolean{@parts}}%
259 {%
260 \titleformat{\part}[display]
261 {\normalfont\centering\large}%
262 {\thispagestyle{empty}\partname~\thepart}{1em}%
263 {\color{Maroon}\spacedallcaps}
264 }{\relax}
265 % chapters
266 \ifthenelse{\boolean{@linedheaders}}%
267 {%
268 \titleformat{\chapter}[display]%
269 {\relax}{\raggedleft{\color{halfgray}%
270 \chapterNumber\thechapter} \\ }{0pt}%
271 {\titlerule\vspace*{.9\baselineskip}\raggedright%
272 \spacedallcaps}%
273 [\normalsize\vspace*{.8\baselineskip}\titlerule]%
274 }{%
275 \titleformat{\chapter}[block]%
276 {\normalfont\Large\sffamily}%
277 {{\color{halfgray}\chapterNumber\thechapter%
278 \hspace{10pt}\vline} }{10pt}%
THE CODE 13
279 {\spacedallcaps}}
280 % sections
281 \titleformat{\section}
282 {\normalfont\Large\sffamily}{\textsc%
283 {\MakeTextLowercase{\thesection}}}%
284 {1em}{\spacedlowsmallcaps}
285 % subsections
286 \titleformat{\subsection}
287 {\normalfont\sffamily}{\textsc{\MakeTextLowercase%
288 {\thesubsection}}}{1em}{\normalsize}
289 % subsubsections
290 \titleformat{\subsubsection}
291 {\normalfont\sffamily\itshape}{\textsc%
292 {\MakeTextLowercase{\thesubsubsection}}}%
293 {1em}{\normalsize\itshape}
294 % paragraphs
295 \titleformat{\paragraph}[runin]
296 {\normalfont\normalsize\sffamily}{\textsc%
297 {\MakeTextLowercase{\theparagraph}}}%
298 {0pt}{\spacedlowsmallcaps}
299 % descriptionlabels
300 \renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}%
301 \bfseries\spacedlowsmallcaps{#1}}
302 \titlespacing*{\chapter}{0pt}{1\baselineskip}%
303 {2\baselineskip}
304 \titlespacing*{\section}{0pt}{2\baselineskip}%
305 {.8\baselineskip}[\marginparsep]
306 \titlespacing*{\subsection}{0pt}{1.5\baselineskip}%
307 {.8\baselineskip}[\marginparsep]
308 \titlespacing*{\paragraph}{0pt}{1\baselineskip}%
309 {1\baselineskip}
310 \renewcommand\labelitemi{\color{halfgray}$\bullet$}
Settings of captions.
311 \captionsetup{format=hang,font=small,labelfont={sf,bf}}
312 \captionsetup[table]{skip=\medskipamount}
313 \let\graffito\relax
314 \def\graffito@setup{%
315 \slshape\footnotesize%
316 \parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
317 \tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300
318 \doublehyphendemerits=100000
319 \finalhyphendemerits=\doublehyphendemerits}
320 \DeclareRobustCommand{\graffito}[1]{\marginpar
321 [\graffito@setup\raggedleft\hspace{0pt}{#1}]
322 {\graffito@setup\raggedright\hspace{0pt}{#1}}}
14 THE CODE
Settings of hyperref.
348 \hypersetup{%
349 colorlinks=true, linktocpage=true, pdfstartpage=3,
350 pdfstartview=FitV, breaklinks=true, pdfpagemode=UseNone,
351 pageanchor=true, pdfpagemode=UseOutlines,%
352 plainpages=false, bookmarksnumbered,
353 bookmarksopen=true,%
354 bookmarksopenlevel=1,%
355 hypertexnames=true, pdfhighlight=/O,%
356 urlcolor=webbrown, linkcolor=RoyalBlue,
357 citecolor=RoyalBlue,%
358 pagecolor=RoyalBlue,%
359 pdfsubject={},%
360 pdfkeywords={},%
THE CODE 15
361 pdfcreator={pdfLaTeX},%
362 pdfproducer={LaTeX con hyperref e ClassicThesis}%
363 }
364
365 \ifdefined\myTitle
366 \hypersetup{pdftitle={\myTitle}}
367 \else
368 \relax
369 \fi
370
371 \ifdefined\myName
372 \hypersetup{pdfauthor={\textcopyright\ \myName}}
373 \else
374 \relax
375 \fi
409 \def\@iwonascLaTeX{{\upshape\scshape
410 \sbox\z@{\check@mathfonts\fontsize\sf@size\z@%
411 \math@fontsfalse%
412 \selectfont a}%
413 \sbox\tw@ t%
414 l\kern-.5\wd\z@
415 \vbox to\ht\tw@{\copy\z@\vss}%
416 \kern-.2\wd0
417 \@ctTeX}}
418 \def\@iwonascTeX{{\upshape\scshape t\kern -.1em
419 \lower .25ex\hbox{e}\kern -.1em x}}
420
421 \def\ct@sc{sc}
422 \def\@ctTeX{\csname @\f@family\ifx\f@shape\ct@sc sc%
423 \fi TeX\endcsname}
424
425 \DeclareRobustCommand\ctLaTeX{%
426 \texorpdfstring{\textls[1]{\csname @\f@family\ifx%
427 \f@shape\ct@sc sc\fi LaTeX\endcsname}}{LaTeX}}
428 \DeclareRobustCommand\ctLaTeXe{%
429 \texorpdfstring{\textls[1]{\ctLaTeX\csname @\ifx%
430 \f@shape\ct@sc sc\fi twoe\endcsname}}{LaTeX2e}}
431
432 \def\@twoe{\kern.1em$\m@th2_{\textstyle\varepsilon}$}
433 \def\@sctwoe{\kern.15em$\m@th{\scriptscriptstyle2}%
434 _\varepsilon$}
435
436 \DeclareRobustCommand\ctTeX{%
437 \texorpdfstring{\textls[1]{\csname @\f@family\f@shape TeX%
438 \endcsname}}{TeX}}
The following code allows to have, in the table of contents, the head-
lines in spaced small caps, even when the table of contents spreads
over more than two pages (fixing a little bug of ClassicThesis).
439 \def\toc@headingbkORrp{%
440 \def\toc@heading{%
441 \chapter*{\contentsname}%
442 \@mkboth{\spacedlowsmallcaps{\contentsname}}
443 {\spacedlowsmallcaps{\contentsname}}}}
444 \@ifclassloaded{scrreprt}{\toc@headingbkORrp}{}
445 \@ifclassloaded{scrbook}{\toc@headingbkORrp}{}
BIBLIOGRAPHY
17
INDEX
A K
\arsincludegraphics, 3, 4 KOMA-Script, 1
B M
backref, 2, 7 MiKTEX, 1
beramono, 2 minitoc, 2, 9
\myincludegraphics, 4
C
Class
O
KOMA-Script, 1
Option
scrartcl, 1
beramono, 2
scrbook, 1
english, 2, 7
scrreprt, 1
eulerchapternumbers, 2
classicthesis, 1
eulermath, 2
classicthesis-ldpkg, 1, 2
french, 2, 7
\ctLaTeX, 3
german, 2, 7
\ctLaTeXe, 3
\ctTeX, 3 italian, 2, 7
spanish, 2, 7
E
english, 2, 7 P
eulerchapternumbers, 2 Package
eulermath, 2 backref, 2, 7
classicthesis, 1
F classicthesis-ldpkg, 1, 2
french, 2, 7 hyperref, 14
minitoc, 2, 9
G
german, 2, 7
S
H scrartcl, 1
hyperref, 14 scrbook, 1
scrreprt, 1
I spanish, 2, 7
\includegraphics, 3
italian, 2, 7 T
Iwona, 2, 3, 5, 11, 12, 15 TEX Live, 1
18