summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/arsclassica/Chapters/Code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/arsclassica/Chapters/Code.tex')
-rw-r--r--Master/texmf-dist/doc/latex/arsclassica/Chapters/Code.tex342
1 files changed, 63 insertions, 279 deletions
diff --git a/Master/texmf-dist/doc/latex/arsclassica/Chapters/Code.tex b/Master/texmf-dist/doc/latex/arsclassica/Chapters/Code.tex
index 523ad36c0fe..47c9428182c 100644
--- a/Master/texmf-dist/doc/latex/arsclassica/Chapters/Code.tex
+++ b/Master/texmf-dist/doc/latex/arsclassica/Chapters/Code.tex
@@ -13,239 +13,17 @@
Announcement of the package and requirement for the necessary packages.
\begin{lstlisting}[firstnumber=1]
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{arsclassica}[2010/02/14 v2.7 Customizing
- ClassicThesis (LP)]
-\RequirePackage{classicthesis-ldpkg}
+\ProvidesPackage{arsclassica}[2011/06/29 v3.0 Customizing ClassicThesis (LP)]
\RequirePackage{classicthesis}
\end{lstlisting}
-Declaration of the language option: \optname{english} (default), \optname{french}, \optname{german}, \optname{spanish}, and \optname{italian}.
-\begin{lstlisting}
-\newboolean{english}
-\newboolean{french}
-\newboolean{german}
-\newboolean{spanish}
-\newboolean{italian}
-\DeclareOption{english}{\setboolean{english}{true}}
-\DeclareOption{french}{\setboolean{french}{true}}
-\DeclareOption{german}{\setboolean{german}{true}}
-\DeclareOption{spanish}{\setboolean{spanish}{true}}
-\DeclareOption{italian}{\setboolean{italian}{true}}
-\ExecuteOptions{english}
-\ProcessOptions\relax
-\end{lstlisting}
-%
-Balance of index columns (if your document has an index).
-\begin{lstlisting}
-\@ifpackageloaded{makeidx}
-{%
- \RequirePackage{multicol}
- \let\orgtheindex\theindex
- \let\orgendtheindex\endtheindex
- \def\theindex{%
- \def\twocolumn{\begin{multicols}{2}}%
- \def\onecolumn{}%
- \clearpage
- \orgtheindex}
- \def\endtheindex{%
- \end{multicols}%
- \orgendtheindex}
- \makeindex
-}
-{\relax}
-\end{lstlisting}
-%
-References of \pkgname{backref} in English, French, German, Spanish, and Italian.
-\begin{lstlisting}
-\ifcld@backref
-\ifthenelse{\boolean{english}}%
-{%
- \PackageInfo{arsclassica}{Using option "english". %
- This activates english language in "backref".}
- \renewcommand*{\backreftwosep}{ and~}
- \renewcommand*{\backreflastsep}{, and~}
- \renewcommand*{\backrefalt}[4]{%
- \ifcase #1 %
- \relax%
- \or
- (Cited on page~#2.)%
- \else
- (Cited on pages~#2.)
- \fi}
-}
-{\relax}
-\ifthenelse{\boolean{french}}%
-{%
- \PackageInfo{arsclassica}{Using option "french". %
- This activates french language in "backref".}
- \renewcommand*{\backreftwosep}{ et~}
- \renewcommand*{\backreflastsep}{ et~}
- \renewcommand*{\backrefalt}[4]{%
- \ifcase #1 %
- \relax%
- \or
- (Cit\'e \`a page~#2.)%
- \else
- (Cit\'e aux pages~#2.)
- \fi}
-}
-{\relax}
-\ifthenelse{\boolean{german}}%
-{%
- \PackageInfo{arsclassica}{Using option "german". %
- This activates german language in "backref".}
- \renewcommand*{\backreftwosep}{ und~}
- \renewcommand*{\backreflastsep}{ und~}
- \renewcommand*{\backrefalt}[4]{%
- \ifcase #1 %
- \relax%
- \or
- (Zitiert auf Seite~#2.)%
- \else
- (Zitiert auf Seiten~#2.)
- \fi}
-}
-{\relax}
-
-\ifthenelse{\boolean{spanish}}%
-{%
- \PackageInfo{arsclassica}{Using option "spanish". %
- This activates spanish language in "backref".}
- \renewcommand*{\backreftwosep}{ y~}
- \renewcommand*{\backreflastsep}{ y~}
- \renewcommand*{\backrefalt}[4]{%
- \ifcase #1 %
- \relax%
- \or
- (Citado en la p\'agina~#2.)%
- \else
- (Citado en las p\'aginas~#2.)
- \fi}
-}
-{\relax}
-
-\ifthenelse{\boolean{italian}}%
-{%
- \PackageInfo{arsclassica}{Using option "italian". %
- This activates italian language in "backref".}
- \renewcommand*{\backreftwosep}{ e~}
- \renewcommand*{\backreflastsep}{ e~}
- \renewcommand*{\backrefalt}[4]{%
- \ifcase #1 %
- \relax%
- \or
- (Citato a pagina~#2.)%
- \else
- (Citato alle pagine~#2.)
- \fi}
-}
-{\relax}
-\fi
-\end{lstlisting}
-%
-Settings of \pkgname{minitoc}.
-\begin{lstlisting}
-\@ifpackageloaded{minitoc}
-{%
- \ifthenelse{\boolean{english}}%
- {%
- \def\ptctitle{contents}
- \def\mtctitle{contents}
- \def\stctitle{contents}
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
- {%
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
-}
-{\relax}
-
-\@ifpackageloaded{minitoc}
-{%
- \ifthenelse{\boolean{french}}%
- {%
- \def\ptctitle{mati\`eres}
- \def\mtctitle{mati\`eres}
- \def\stctitle{mati\`eres}
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
- {%
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
-}
-{\relax}
-
-\@ifpackageloaded{minitoc}
-{%
- \ifthenelse{\boolean{german}}%
- {%
- \def\ptctitle{inhaltsverzeichnis}
- \def\mtctitle{inhaltsverzeichnis}
- \def\stctitle{inhaltsverzeichnis}
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
- {%
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
-}
-{\relax}
-
-\@ifpackageloaded{minitoc}
-{%
- \ifthenelse{\boolean{spanish}}%
- {%
- \def\ptctitle{\'indice}
- \def\mtctitle{\'indice}
- \def\stctitle{\'indice}
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
- {%
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
-}
-{\relax}
-
-\@ifpackageloaded{minitoc}
-{%
- \ifthenelse{\boolean{italian}}%
- {%
- \def\ptctitle{indice}
- \def\mtctitle{indice}
- \def\stctitle{indice}
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
- {%
- \setlength{\mtcindent}{0pt}
- \renewcommand{\mtifont}{\normalsize\sffamily%
- \scshape\lsstyle}
- }
-}
-{\relax}
-\end{lstlisting}
Use of Iwona\index{Iwona} as font sans serif.
\begin{lstlisting}
\renewcommand{\sfdefault}{iwona}
\end{lstlisting}
-%
+
+
Customized chapter numbers.
\begin{lstlisting}
\let\chapterNumber\undefined
@@ -253,7 +31,9 @@ Customized chapter numbers.
{\newfont{\chapterNumber}{eurb10 scaled 5000}}%
{\newfont{\chapterNumber}{pplr9d scaled 5000}}
\end{lstlisting}
-%
+
+
+
Small caps sans serif.
\begin{lstlisting}
\ifthenelse{\boolean{@minionprospacing}}%
@@ -284,7 +64,9 @@ Small caps sans serif.
}%
}
\end{lstlisting}
-%
+
+
+
Semi-transparent headlines and page numbers in Iwona.
\begin{lstlisting}
\renewcommand{\sectionmark}[1]{\markright{\textsc%
@@ -298,7 +80,9 @@ Semi-transparent headlines and page numbers in Iwona.
\renewcommand{\headfont}{\normalfont\sffamily}
\renewcommand{\pnumfont}{\small\sffamily}
\end{lstlisting}
-%
+
+
+
Use of Iwona\index{Iwona} for the titles of sectioning units (chapters, sections, subsections, sub-subsections, paragraphs, subparagraphs) and for the labels of description lists.
\begin{lstlisting}
\RequirePackage{titlesec}
@@ -355,38 +139,37 @@ Use of Iwona\index{Iwona} for the titles of sectioning units (chapters, sections
{.8\baselineskip}[\marginparsep]
\titlespacing*{\paragraph}{0pt}{1\baselineskip}%
{1\baselineskip}
+
+ \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{halfgray}{\chapterNumber\thechapter}
+ \hspace{10pt}\vline\ }{10pt}
+ {\formatchapter}
+
+ \rofoot[\mbox{\makebox[0pt][l]{\kern1em\thepage}}]{}
\end{lstlisting}
-%
+
+
+
Itemize lists with semi-transparent labels.
\begin{lstlisting}
\renewcommand\labelitemi{\color{halfgray}$\bullet$}
\end{lstlisting}
-%
+
+
+
Settings of captions.
\begin{lstlisting}
\captionsetup{format=hang,font=small,labelfont={sf,bf}}
\captionsetup[table]{skip=\medskipamount}
\end{lstlisting}
-%
-Symmetrical marginal notes.
-\begin{lstlisting}
-\let\graffito\relax
-\def\graffito@setup{%
- \slshape\footnotesize%
- \parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
- \tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300
- \doublehyphendemerits=100000
- \finalhyphendemerits=\doublehyphendemerits}
-\DeclareRobustCommand{\graffito}[1]{\marginpar
- [\graffito@setup\raggedleft\hspace{0pt}{#1}]
- {\graffito@setup\raggedright\hspace{0pt}{#1}}}
-\end{lstlisting}
-%
-Space between the lines.
-\begin{lstlisting}
-\linespread{1.00}
-\end{lstlisting}
-%
+
+
``Double square'' text body (like in version~2.3 of ClassicThesis), for documents written in A4 format using Palatino font.
\begin{lstlisting}
\ifthenelse{\boolean{@a5paper}}%
@@ -403,7 +186,9 @@ Space between the lines.
}%
}
\end{lstlisting}
-%
+
+
+
The {\ttfamily\textbackslash\color{RoyalBlue}{arsincludegraphics}} command is defined, which allows to include graphics with ``Alice Blue'' coloured background. In the previous versions of \arsclassica{} package, {\ttfamily\textbackslash\color{RoyalBlue}{arsincludegraphics}} command was named {\ttfamily\textbackslash\color{RoyalBlue}{myincludegraphics}}: the old name is still mantained (for now), but deprecated.
\begin{lstlisting}
\definecolor{aliceblue}{RGB}{240,248,255}
@@ -413,15 +198,13 @@ The {\ttfamily\textbackslash\color{RoyalBlue}{arsincludegraphics}} command is de
\begingroup\setlength{\fboxsep}{0pt}%
\colorbox{aliceblue}{\ars@@includegraphics[#1]{#2}}%
\endgroup}
-\def\myincludegraphics{\PackageWarning{classiclatex}{%
- The command \noexpand\myincludegraphics is
- obsolete;\MessageBreak use \string\arsincludegraphics}%
- \arsincludegraphics}
\end{lstlisting}
+
+
Settings of \pkgname{hyperref}.
\begin{lstlisting}
\hypersetup{%
- colorlinks=true, linktocpage=true, pdfstartpage=3,
+ colorlinks=true, linktocpage=true, pdfstartpage=1,
pdfstartview=FitV, breaklinks=true, pdfpagemode=UseNone,
pageanchor=true, pdfpagemode=UseOutlines,%
plainpages=false, bookmarksnumbered,
@@ -429,31 +212,36 @@ Settings of \pkgname{hyperref}.
bookmarksopenlevel=1,%
hypertexnames=true, pdfhighlight=/O,%
urlcolor=webbrown, linkcolor=RoyalBlue,
- citecolor=RoyalBlue,%
- pagecolor=RoyalBlue,%
+ citecolor=webgreen,%
+ hyperfootnotes=false,pdfpagelabels,
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
pdfproducer={LaTeX con hyperref e ClassicThesis}%
}
+\end{lstlisting}
-\ifdefined\myTitle
- \hypersetup{pdftitle={\myTitle}}
-\else
- \relax
-\fi
-
-\ifdefined\myName
- \hypersetup{pdfauthor={\textcopyright\ \myName}}
-\else
- \relax
-\fi
+
+
+Some fine adjustment when the \pkgname{minitoc} package is used.
+\begin{lstlisting}
+\@ifpackageloaded{minitoc}
+{%
+ \MakeLowercase{\gdef\noexpand\ptctitle{\ptctitle}}
+ \MakeLowercase{\gdef\noexpand\mtctitle{\mtctitle}}
+ \MakeLowercase{\gdef\noexpand\stctitle{\stctitle}}
+ \setlength{\mtcindent}{0pt}
+ \renewcommand{\mtifont}{\normalsize\sffamily
+ \scshape\lsstyle}
+}
+{}
\end{lstlisting}
-%
-Definition of the commands
+
+
+Definition of the
{\ttfamily\textbackslash\color{RoyalBlue}{ctLaTeX}},
-{\ttfamily\textbackslash\color{RoyalBlue}{ctLaTeXe}} e
-{\ttfamily\textbackslash\color{RoyalBlue}{ctTeX}},
+{\ttfamily\textbackslash\color{RoyalBlue}{ctLaTeXe}} and
+{\ttfamily\textbackslash\color{RoyalBlue}{ctTeX}} commands,
which allow to reproduce respectively the \LaTeX, \LaTeXe{} e \TeX{} logos correctly written in Iwona.\index{Iwona}
\begin{lstlisting}
\def\@ppljLaTeX{{\upshape
@@ -517,12 +305,8 @@ which allow to reproduce respectively the \LaTeX, \LaTeXe{} e \TeX{} logos corre
_\varepsilon$}
\DeclareRobustCommand\ctTeX{%
- \texorpdfstring{\textls[1]{\csname @\f@family\f@shape TeX%
- \endcsname}}{TeX}}
-\end{lstlisting}
-%
-The following code allows to have, in the table of contents, the headlines in spaced small caps, even when the table of contents spreads over more than two pages (fixing a little bug of \classicthesis).
-\begin{lstlisting}
+ \texorpdfstring{\textls[1]{\@ctTeX}}{TeX}}
+
\def\toc@headingbkORrp{%
\def\toc@heading{%
\chapter*{\contentsname}%