diff options
author | Karl Berry <karl@freefriends.org> | 2012-03-31 22:39:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-03-31 22:39:54 +0000 |
commit | 19b358b743aa966103c1e73be655d45760c0fb4e (patch) | |
tree | 562fcebe9f81aedbbf4a8bc5e2d4aafe04234a26 /Master/texmf-dist/tex/latex/suftesi | |
parent | 6f44e8e442870f87409834435a1ec90dd016b422 (diff) |
suftesi (23mar12)
git-svn-id: svn://tug.org/texlive/trunk@25807 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/suftesi')
-rw-r--r-- | Master/texmf-dist/tex/latex/suftesi/suftesi.cls | 980 |
1 files changed, 514 insertions, 466 deletions
diff --git a/Master/texmf-dist/tex/latex/suftesi/suftesi.cls b/Master/texmf-dist/tex/latex/suftesi/suftesi.cls index 2d2edd12ca5..bc370eca2a2 100644 --- a/Master/texmf-dist/tex/latex/suftesi/suftesi.cls +++ b/Master/texmf-dist/tex/latex/suftesi/suftesi.cls @@ -19,7 +19,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesClass{suftesi} -[2011/12/25 v0.7 A class for typesetting theses, books and articles] + [2012/03/19 v0.8 A class for typesetting theses, books and articles] \newif\ifsuftesi@centertitle \newif\ifsuftesi@sctitles \newif\ifsuftesi@artemisia @@ -32,6 +32,7 @@ \newif\ifsuftesi@article \newif\ifsuftesi@authortitle \newif\ifsuftesi@nofront +\newif\ifsuftesi@periodical \newif\ifsuftesi@compact \newif\ifsuftesi@supercompact \newif\ifsuftesi@elements @@ -51,6 +52,7 @@ \DeclareOption{centerheadings}{\suftesi@centerheadingstrue} \DeclareOption{sufplain}{\suftesi@sufplaintrue} \DeclareOption{bozza}{\suftesi@bozzatrue} +\DeclareOption{periodical}{\suftesi@periodicaltrue\suftesi@compacttrue} \DeclareOption{compact}{\suftesi@compacttrue} \DeclareOption{supercompact}{\suftesi@supercompacttrue} \DeclareOption{elements}{\suftesi@elementstrue\suftesi@sufelementstrue @@ -66,13 +68,12 @@ \relax \LoadClass[a4paper]{book} \RequirePackage{color} -\definecolor{sufred}{rgb}{0.5,0,0} -\definecolor{sufgray}{rgb}{0.5,0.5,0.5} + \definecolor{sufred}{rgb}{0.5,0,0} + \definecolor{sufgray}{rgb}{0.5,0.5,0.5} \RequirePackage{ifxetex,ifluatex,metalogo} \ifxetex\relax \else - \RequirePackage[letterspace=110]{microtype} - \microtypesetup{expansion=false}% + \RequirePackage{microtype} \fi \RequirePackage{textcase} \RequirePackage{multicol} @@ -146,6 +147,20 @@ \else \RequirePackage[a4,cam,center]{crop} \fi +\ifsuftesi@periodical + \geometry{ + textheight=16.5cm, + textwidth=11cm, + paperwidth=17cm, + paperheight=24cm, + hmarginratio=2:3, + vmarginratio=2:3, + includefoot, + includehead, + heightrounded, + marginparwidth=70pt, + marginparsep=10pt} +\else \ifsuftesi@compact \geometry{ textheight=16.5cm, @@ -159,7 +174,7 @@ heightrounded, marginparwidth=65pt, marginparsep=10pt} - \else +\else \ifsuftesi@supercompact \geometry{ textheight=15cm, @@ -173,135 +188,141 @@ heightrounded, marginparwidth=50pt, marginparsep=9pt} - \else +\else \ifsuftesi@elements -\geometry{% -textwidth=251pt, -textheight=502pt, -marginparwidth=60pt, -marginparsep=18pt, -paperwidth=378pt, -paperheight=654pt, + \geometry{% + textwidth=251pt, + textheight=502pt, + marginparwidth=60pt, + marginparsep=18pt, + paperwidth=378pt, + paperheight=654pt, heightrounded, -outer=91.2pt, -top=64pt} -\else - \fi - \fi + outer=91.2pt, + top=64pt} + \else + \fi \fi +\fi +\fi \if@twoside \relax \else \geometry{hmarginratio=1:1} \fi \RequirePackage{titlesec} -\newlength{\sectionsep} -\setlength{\sectionsep}{\dimexpr(\baselineskip) plus 1pt minus 1pt} + \newlength{\sectionsep} + \setlength{\sectionsep}{\dimexpr(\baselineskip) plus 1pt minus 1pt} \ifsuftesi@supercompact -\DeclareRobustCommand{\sufchaptersize}{\large} -\else -\ifsuftesi@compact - \DeclareRobustCommand{\sufchaptersize}{\Large} -\else -\DeclareRobustCommand{\sufchaptersize}{\Large} -\fi + \DeclareRobustCommand{\sufchaptersize}{\large} + \else + \ifsuftesi@compact + \DeclareRobustCommand{\sufchaptersize}{\Large} + \else + \DeclareRobustCommand{\sufchaptersize}{\Large} + \fi \fi \ifxetex -\DeclareRobustCommand{\suftesi@smallcaps}[1]{% - \addfontfeature{LetterSpace=6}\scshape\MakeTextLowercase{#1}} -\DeclareRobustCommand{\sectitle}[1]{% -\addfontfeature{LetterSpace=6}\scshape\MakeTextUppercase{#1}}% -\newcommand{\chapnumfont}[1]{% - \def\@chapnumfont{\fontspec{#1}}} -\chapnumfont{Palatino} + \DeclareRobustCommand{\suftesi@titlesmallcaps}[1]{% + \addfontfeature{LetterSpace=6}\scshape\MakeTextLowercase{#1}} + \DeclareRobustCommand{\suftesi@headingsmallcaps}[1]{% + \addfontfeature{LetterSpace=6}\scshape\MakeTextLowercase{#1}} + \newcommand{\chapnumfont}[1]{% + \def\@chapnumfont{\fontspec{#1}}} + \chapnumfont{Palatino} \else -\DeclareRobustCommand{\suftesi@smallcaps}[1]{% - \scshape\lsstyle\MakeTextLowercase{#1}}% -\DeclareRobustCommand{\sectitle}[1]{% -\textls[110]{\MakeTextUppercase{#1}}}% -\newcommand{\chapnumfont}[1]{% - \def\@chapnumfont{\fontfamily{#1}}} -\chapnumfont{pplj} + \DeclareRobustCommand{\suftesi@titlesmallcaps}[1]{% + \scshape\MakeTextLowercase{\textls[110]{#1}}}% + \DeclareRobustCommand{\suftesi@headingsmallcaps}[1]{% + \scshape\MakeTextLowercase{\textls[110]{#1}}}% + \newcommand{\chapnumfont}[1]{% + \def\@chapnumfont{\fontfamily{#1}}} + \chapnumfont{pplj} \fi \ifsuftesi@article -\renewcommand \thesection {\@arabic\c@section} -\renewcommand\thesubsection {\thesection.\@arabic\c@subsection} -\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} -\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} -\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} -\renewcommand\part{% - \if@noskipsec \leavevmode \fi - \par - \addvspace{4ex}% - \@afterindentfalse - \secdef\@part\@spart} -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{part}% - \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% - \else - \addcontentsline{toc}{part}{#1}% - \fi - {\parindent \z@ \raggedright - \interlinepenalty \@M - \normalfont - \ifnum \c@secnumdepth >\m@ne - \normalsize \partname\nobreakspace\thepart - \par\nobreak - \fi - \large #2% - \markboth{}{}\par}% - \nobreak - \vskip 3ex - \@afterheading} -\def\@spart#1{% - {\parindent \z@ \raggedright - \interlinepenalty \@M - \normalfont - \huge \bfseries #1\par}% - \nobreak - \vskip 3ex - \@afterheading} + \renewcommand\thesection {\@arabic\c@section} + \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} + \renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} + \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} + \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} +\AtBeginDocument{% +\@ifpackageloaded{biblatex}{% + \defbibheading{bibliography}[\refname]{% + \section*{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{shorthands}[\losname]{% + \section*{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{bibintoc}[\refname]{% + \section*{#1}% + \addcontentsline{toc}{section}{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{losintoc}[\losname]{% + \section*{#1}% + \addcontentsline{toc}{section}{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{bibnumbered}[\refname]{% + \section{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{losnumbered}[\losname]{% + \section{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{subbibliography}[\refname]{% + \subsection*{#1}} + \defbibheading{subbibintoc}[\refname]{% + \subsection*{#1}% + \addcontentsline{toc}{subsection}{#1}} + \defbibheading{subbibnumbered}[\refname]{% + \subsection{#1}}}% + {\relax}% +}% +\titleclass{\part}{straight} +\titleformat{\part}[hang] + {\large} + {\ifsuftesi@sctitles\scshape\else\fi\partname~\thepart} + {.5em} + {\ifsuftesi@sctitles\expandafter\suftesi@titlesmallcaps\else\fi} + \titlespacing*{\part}{0ex}{2\sectionsep}{2\sectionsep}[0ex] \else \titleformat{\part}[display] {\LARGE\filcenter} - {\sufchaptersize\ifsuftesi@sctitles\scshape\else\fi\partname~\Roman{part}} + {\sufchaptersize\ifsuftesi@sctitles\scshape\else\fi\partname~\thepart} {3ex} - {\sufchaptersize\ifsuftesi@sctitles\expandafter\suftesi@smallcaps\else\fi} + {\sufchaptersize\ifsuftesi@sctitles\expandafter\suftesi@titlesmallcaps\else\fi} \fi \ifsuftesi@sufelements \titleformat{\chapter}[block] - {}% - {\begin{picture}(0,0) -\setlength{\unitlength}{1pt} - \@chapnumfont% - \ifsuftesi@elements - \fontsize{64}{64}\selectfont% + {}% + {\begin{picture}(0,0) + \setlength{\unitlength}{1pt} + \@chapnumfont% + \ifsuftesi@elements + \fontsize{64}{64}\selectfont% \put(0,-73){% - \hskip\dimexpr(\textwidth+\marginparsep)\textcolor{sufgray}{\thechapter}}% - \else - \fontsize{95}{95}\selectfont% - \put(0,-83){\hskip\dimexpr(\textwidth+\marginparsep)% - \textcolor{sufgray}{\thechapter}}% - \fi - \end{picture}}% + \hskip\dimexpr(\textwidth+\marginparsep)\textcolor{sufgray}{\thechapter}}% + \else + \fontsize{95}{95}\selectfont% + \put(0,-83){\hskip\dimexpr(\textwidth+\marginparsep)% + \textcolor{sufgray}{\thechapter}}% + \fi + \end{picture}}% {0pt} - {\sectitle} + {\suftesi@titlesmallcaps} [\rule{\textwidth}{.1pt}] \else \ifsuftesi@centertitle -\titleformat{\chapter}[display] - {\filcenter} - {\sufchaptersize\thechapter} - {3ex} - {\sufchaptersize\ifsuftesi@sctitles\expandafter\suftesi@smallcaps\else\fi} - \else -\titleformat{\chapter}[hang] - {\filright} - {\sufchaptersize\thechapter.} - {3ex} - {\sufchaptersize\ifsuftesi@sctitles\expandafter\suftesi@smallcaps\else\fi} - \fi + \titleformat{\chapter}[display] + {\filcenter} + {\sufchaptersize\thechapter} + {3ex} + {\sufchaptersize\ifsuftesi@sctitles\expandafter\suftesi@titlesmallcaps\else\fi} +\else + \titleformat{\chapter}[hang] + {\filright} + {\sufchaptersize\thechapter.} + {3ex} + {\sufchaptersize\ifsuftesi@sctitles\expandafter\suftesi@titlesmallcaps\else\fi} + \fi \fi \ifsuftesi@compact \titlespacing*{\chapter}{0em}{0ex}{18ex} @@ -313,19 +334,19 @@ top=64pt} \titlespacing*{\chapter}{0em}{-45pt}{10pt}[0em] \else \ifsuftesi@sufelements - \titlespacing*{\chapter}{0em}{6ex}{10pt}[0em] - \else - \titlespacing*{\chapter}{0em}{6ex}{18ex} - \fi - \fi - \fi + \titlespacing*{\chapter}{0em}{6ex}{10pt}[0em] + \else + \titlespacing*{\chapter}{0em}{6ex}{18ex} + \fi + \fi + \fi \fi \ifsuftesi@elements \titleformat{\section}[hang] {\raggedright} {\textnormal\thesection} {1em} - {\small\suftesi@smallcaps} + {\small\suftesi@titlesmallcaps} \titlespacing*{\section}{0em}{\baselineskip}{\baselineskip}[0em] \titleformat{\subsection}[block] {\filright\normalsize\itshape} @@ -344,7 +365,7 @@ top=64pt} {\filright} {\thesection} {.5em} - {\unskip\ifsuftesi@sctitles\expandafter\suftesi@smallcaps\else\itshape\fi} + {\unskip\ifsuftesi@sctitles\expandafter\suftesi@titlesmallcaps\else\itshape\fi} \titlespacing*{\section}{0ex}{\sectionsep}{\sectionsep}[0ex] \titleformat{\subsection}[hang] {} @@ -360,10 +381,10 @@ top=64pt} \titlespacing*{\subsubsection}{\parindent}{\baselineskip}{\baselineskip}[0ex] \fi \titleformat{\paragraph}[runin] - {\itshape} {} {} {} + {\itshape} [.\hspace*{1em}] \titlespacing*{\paragraph}{\parindent}{.5\sectionsep}{.5\sectionsep} \titleformat{\subparagraph}[runin] @@ -396,160 +417,49 @@ top=64pt} } \fi \titlecontents{part} -[0em] -{\addvspace{3ex}\partname~} -{\thecontentslabel\hspace*{1em}} -{} -{} -[\addvspace{1ex}] + [0em] + {\addvspace{3ex}\partname~} + {\thecontentslabel\hspace*{1em}} + {} + {} + [\addvspace{1ex}] \titlecontents{chapter} -[0em] -{\addvspace{2ex}} -{\thecontentslabel\hspace*{1em}} -{} -{\titlerule*{}\contentspage} -[\addvspace{1ex}] - \titlecontents{section} -[1.5em] -{} -{\thecontentslabel\hspace*{1em}} -{} -{\titlerule*{}\contentspage} + [0em] + {\addvspace{2ex}} + {\thecontentslabel\hspace*{1em}} + {} + {\titlerule*{\footnotesize .\ }\contentspage} + [\addvspace{1ex}] +\titlecontents{section} + [1.5em] + {} + {\thecontentslabel\hspace*{1em}} + {} + {\titlerule*{\footnotesize .\ }\contentspage} \titlecontents{subsection} -[3em] -{} -{\thecontentslabel\hspace*{1em}} -{} -{\titlerule*{}\contentspage} + [3em] + {} + {\thecontentslabel\hspace*{1em}} + {} + {\titlerule*{\footnotesize .\ }\contentspage} \titlecontents{subsubsection} -[4.5em] -{} -{\thecontentslabel\hspace*{1em}} -{} -{\titlerule*{}\contentspage} + [4.5em] + {} + {\thecontentslabel\hspace*{1em}} + {} + {\titlerule*{\footnotesize .\ }\contentspage} \titlecontents{figure} -[1.5em] -{} -{\thecontentslabel\hspace*{1em}} -{} -{\titlerule*{}\contentspage} + [1.5em] + {} + {\thecontentslabel\hspace*{1em}} + {} + {\titlerule*{\footnotesize .\ }\contentspage} \titlecontents{table} -[1.5em] -{} -{\thecontentslabel\hspace*{1em}} -{} -{\titlerule*{}\contentspage} -\RequirePackage{fancyhdr} -\pagestyle{fancy} -\renewcommand{\headrulewidth}{0pt} -\renewcommand{\footnoterule}{} -\ifsuftesi@elements % -\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}} -\renewcommand{\sectionmark}[1]{\markright{#1}} -\fancypagestyle{elements}{% -\fancyhf{} -\fancyfoot[LE,RO]{\thepage} -\fancyhead[RO]{% -\begin{picture}(0,0) - \setlength{\unitlength}{1pt} - \put(0,-104){% -\hskip\marginparsep -\parbox[t]{\marginparwidth}{\itshape\raggedright\leftmark}}% -\end{picture}} -\fancyhead[LE]{% -\begin{picture}(0,0) - \setlength{\unitlength}{1pt} - \put(0,-104){% -\hskip-\marginparwidth -\hskip-\marginparsep - \parbox[t]{\marginparwidth}{\itshape\raggedleft\rightmark}}% -\end{picture}} -} -\else -\renewcommand{\chaptermark}[1]{\markboth{\chaptertitlename\ \thechapter}{#1}} -\renewcommand{\sectionmark}[1]{} -\fi -\fancypagestyle{plain}{% -\fancyhf{} -\fancyfoot[C]{} -\renewcommand{\headrulewidth}{0pt} -\renewcommand{\footrulewidth}{0pt}} -\fancypagestyle{sufplain}{% -\fancyhf{}% -\fancyfoot[RE,LO]{\ifsuftesi@bozza \footnotesize Version of \today\else\fi} -\fancyfoot[C]{\footnotesize\sufthepage}} -\fancypagestyle{centerheadings}{% -\fancyhf{}% -\fancyfoot[RE,LO]{\ifsuftesi@bozza \footnotesize Version of \today\else\fi} -\fancyhead[CO]{\footnotesize\xheadbreakfalse\suf@rightmark} -\fancyhead[CE]{\footnotesize\xheadbreakfalse% -\ifsuftesi@article - \ifsuftesi@authortitle - \suf@leftmark - \else - \suf@rightmark - \fi - \else - \suf@leftmark - \fi} -\fancyfoot[C]{\footnotesize\sufthepage}% -} -\fancypagestyle{sufdefault}{% -\fancyhf{}% -\fancyfoot[RE,LO]{\ifsuftesi@bozza \footnotesize Version of \today\else\fi} -\fancyhead[LE,RO]{\footnotesize\sufthepage} -\fancyhead[LO]{\footnotesize\xheadbreakfalse\suf@rightmark} -\fancyhead[RE]{\footnotesize\xheadbreakfalse% -\ifsuftesi@article - \ifsuftesi@authortitle - \suf@leftmark - \else - \suf@rightmark - \fi - \else - \suf@leftmark - \fi} -} -\ifsuftesi@article - \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} - \else\fi -\ifsuftesi@sctitles - \ifsuftesi@authortitle - \def\suf@rightmark{\suftesi@smallcaps{\@title}} - \else - \def\suf@rightmark{\suftesi@smallcaps{\rightmark}} - \fi -\else - \ifsuftesi@authortitle - \def\suf@rightmark{\nouppercase{\@title}} - \else - \def\suf@rightmark{\nouppercase{\rightmark}} - \fi -\fi -\ifsuftesi@sctitles - \ifsuftesi@authortitle - \def\suf@leftmark{\suftesi@smallcaps{\@author}} - \else - \def\suf@leftmark{\suftesi@smallcaps{\suf@leftrightmark}} - \fi -\else - \ifsuftesi@authortitle - \def\suf@leftmark{\nouppercase{\@author}} - \else - \def\suf@leftmark{\nouppercase{\suf@leftrightmark}} - \fi -\fi -\ifsuftesi@sctitles - \def\sufthepage{\suftesi@smallcaps{\thepage}} -\else - \def\sufthepage{\thepage} -\fi -\def\suf@leftrightmark{% -\if@mainmatter\leftmark\else\rightmark\fi} -\pagestyle{sufdefault} -\ifsuftesi@centerheadings\pagestyle{centerheadings}\else\fi -\ifsuftesi@sufplain\pagestyle{sufplain}\else\fi -\ifsuftesi@elements\pagestyle{elements}\else\fi + [1.5em] + {} + {\thecontentslabel\hspace*{1em}} + {} + {\titlerule*{\footnotesize .\ }\contentspage} \let\standardtitle\maketitle \if@titlepage% titlepage \renewcommand\maketitle{\begin{titlepage}% @@ -561,7 +471,7 @@ top=64pt} \vskip 60\p@ \begin{center}% {\sufchaptersize\color{sufred}\sffamily\ifsuftesi@sctitles% - \suftesi@smallcaps{\@title}\else\@title\fi \par}% + \suftesi@titlesmallcaps{\@title}\else\@title\fi \par}% \vskip 3em% {\small\lineskip .75em% \begin{tabular}[t]{c}% @@ -581,128 +491,271 @@ top=64pt} \global\let\date\relax \global\let\and\relax } -\else% notitlepage +\else \renewcommand\maketitle{\par - \begingroup - \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% - \long\def\@makefntext##1{\parindent 1em\noindent - \hb@xt@1.8em{% - \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% - \if@twocolumn - \ifnum \col@number=\@ne - \@maketitle - \else - \twocolumn[\@maketitle]% - \fi - \else - \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. - \@maketitle - \fi - \thispagestyle{plain}\@thanks - \endgroup - \setcounter{footnote}{0}% - \global\let\thanks\relax - \global\let\maketitle\relax - \global\let\@maketitle\relax - \global\let\@thanks\@empty - \global\let\@date\@empty - \global\let\date\relax - \global\let\and\relax} + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@date\@empty + \global\let\date\relax + \global\let\and\relax} \def\@maketitle{% - \newpage - \null - \vskip 2em% - \begin{center}% - \let \footnote \thanks - {\sufchaptersize\color{sufred}\sffamily\ifsuftesi@sctitles% - \suftesi@smallcaps{\@title}\else\@title\fi\par}% - \vskip 1.5em% - {\small\lineskip .5em% - \begin{tabular}[t]{c}% + \newpage + \null + \vskip 2em% + \begin{center}% + \let \footnote \thanks + {\sufchaptersize\color{sufred}\sffamily\ifsuftesi@sctitles% + \suftesi@titlesmallcaps{\@title}\else\@title\fi\par}% + \vskip 1.5em% + {\small\lineskip .5em% + \begin{tabular}[t]{c}% \@author\par - \end{tabular}\par}% - \vskip 1em% - {\small\@date\par}% - \end{center}% - \par - \vskip 1.5em} + \end{tabular}\par}% + \vskip 1em% + {\small\@date\par}% + \end{center}% + \par + \vskip 1.5em} +\fi +\AtBeginDocument{% +\@ifpackageloaded{frontespizio}{% + \ifsuftesi@periodical + \Margini{1cm}{7cm}{5cm}{1cm}% + \Rientro{1cm}% + \else + \ifsuftesi@compact + \Margini{1cm}{7cm}{6cm}{1cm}% + \Rientro{1cm}% + \else + \ifsuftesi@supercompact + \Margini{1cm}{10cm}{8cm}{1cm}% + \Rientro{1cm}% + \else + \fi + \fi \fi + }% +{\relax}} \renewenvironment{theindex} -{\setlength\columnseprule{0pt} - \setlength\columnsep{35pt}% - \cleardoublepage - \@makeschapterhead{\indexname}% -\begin{multicols}{2} - \markboth{\indexname}{\indexname}% + {\setlength\columnseprule{0pt} + \setlength\columnsep{35pt}% + \cleardoublepage + \@makeschapterhead{\indexname}% + \begin{multicols}{2} + \markboth{\indexname}{\indexname}% \raggedright\small - \setlength\parindent{0pt}% - \setlength\parskip{0pt plus 0.3pt}% - \thispagestyle{plain}\let\item\@idxitem} -{\end{multicols}} + \setlength\parindent{0pt}% + \setlength\parskip{0pt plus 0.3pt}% + \thispagestyle{plain}\let\item\@idxitem} + {\end{multicols}} \renewcommand\@idxitem{\par\hangindent 15\p@} \newcommand{\appendicesname}[1]{\def\suff@appendices{#1}} -\appendicesname{Appendici} -\newcommand{\appendixpage}{\@appendixpage} + \appendicesname{Appendici} + \newcommand{\appendixpage}{\@appendixpage} \def\@appendixpage{% -\@mainmattertrue -\titlecontents{part} -[0em] -{\addvspace{3ex}} -{} -{} -{} -[\addvspace{1ex}] + \@mainmattertrue + \titlecontents{part} + [0em] + {\addvspace{3ex}} + {} + {} + {} + [\addvspace{1ex}] \let\contentspage\relax \cleardoublepage \thispagestyle{empty} \addcontentsline{toc}{part}{\suff@appendices} - \begingroup - \centering - \null\vfil - {\LARGE\suff@appendices\par} - \vfil -\endgroup + \begingroup + \centering + \null\vfil + {\LARGE\suff@appendices\par} + \vfil + \endgroup \cleardoublepage \titlecontents{part} -[0em] -{\addvspace{3ex}\partname~} -{\thecontentslabel\hspace*{1em}} -{} -{} -[\addvspace{1ex}] + [0em] + {\addvspace{3ex}\partname~} + {\thecontentslabel\hspace*{1em}} + {} + {} + [\addvspace{1ex}] } \ifsuftesi@sufelements \renewcommand\appendix{\par - \setcounter{chapter}{0}% - \setcounter{section}{0}% - \gdef\@chapapp{\appendixname}% - \gdef\thechapter{\@Alph\c@chapter} - \titleformat{\chapter}[block] - {\vskip-22pt}% - {\small\sectitle{\appendixname}~\Alph{chapter}:\hskip.5em} - {0pt} - {\small\sectitle} - [\rule{\textwidth}{.4pt}] -\titlespacing*{\chapter}{0em}{10pt}{10pt}[0em] -\titlecontents{chapter}[1em] - {\filright\hskip.5em} - {\suftesi@smallcaps{\appendixname~\thecontentslabel:}\hskip1em} - {} - {\contentspage\vspace{5pt}}} - \else + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@Alph\c@chapter} + \titleformat{\chapter}[block] + {\vskip-22pt}% + {\small\suftesi@titlesmallcaps{\appendixname}~\Alph{chapter}:\hskip.5em} + {0pt} + {\small\suftesi@titlesmallcaps} + [\rule{\textwidth}{.4pt}] + \titlespacing*{\chapter}{0em}{10pt}{10pt}[0em] + \titlecontents{chapter}[1em] + {\filright\hskip.5em} + {\suftesi@titlesmallcaps{\appendixname~\thecontentslabel:}\hskip1em} + {} + {\contentspage\vspace{5pt}}} + \else \renewcommand\appendix{\par - \setcounter{chapter}{0}% - \setcounter{section}{0}% - \gdef\@chapapp{\appendixname}% - \gdef\thechapter{\@Alph\c@chapter}} + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@Alph\c@chapter}} +\fi +\RequirePackage{fancyhdr} + \renewcommand{\title}[2][\@title]{\gdef\@title{#2}\gdef\@headtitle{#1}} + \def\@headtitle{--missing title--% + \protect\ClassWarningNoLine{suftesi}{% + No \string\title\space given \MessageBreak% + See the class documentation for explanation}} + \def\@title{--missing title--% + \protect\ClassWarningNoLine{suftesi}{% + No \string\title\space given\MessageBreak% + See the class documentation for explanation}} + \def\@author{--missing author--% + \protect\ClassWarningNoLine{suftesi}{% + No \string\author\space given\MessageBreak% + See the class documentation for explanation}} + \pagestyle{fancy} + \renewcommand{\headrulewidth}{0pt} + \renewcommand{\footnoterule}{} +\ifsuftesi@elements% + \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}} + \renewcommand{\sectionmark}[1]{\markright{#1}} + \fancypagestyle{elements}{% + \fancyhf{} + \fancyfoot[LE,RO]{\thepage} + \fancyhead[RO]{% + \begin{picture}(0,0) + \setlength{\unitlength}{1pt} + \put(0,-104){% + \hskip\marginparsep + \parbox[t]{\marginparwidth}{\itshape\raggedright\leftmark}}% + \end{picture}} + \fancyhead[LE]{% + \begin{picture}(0,0) + \setlength{\unitlength}{1pt} + \put(0,-104){% + \hskip-\dimexpr(\marginparwidth+\marginparsep) + \parbox[t]{\marginparwidth}{\itshape\raggedleft\rightmark}}% + \end{picture}}% + }% +\else + \renewcommand{\chaptermark}[1]{\markboth{\chaptertitlename\ \thechapter}{#1}} + \renewcommand{\sectionmark}[1]{} \fi +\fancypagestyle{plain}{% + \fancyhf{} + \fancyfoot[C]{} + \renewcommand{\headrulewidth}{0pt} + \renewcommand{\footrulewidth}{0pt}} +\fancypagestyle{sufplain}{% + \fancyhf{}% + \fancyfoot[RE,LO]{\ifsuftesi@bozza \footnotesize Version of \today\else\fi} + \fancyfoot[C]{\footnotesize\sufthepage}} +\fancypagestyle{centerheadings}{% + \fancyhf{}% + \fancyfoot[RE,LO]{\ifsuftesi@bozza \footnotesize Version of \today\else\fi} + \fancyhead[CO]{\footnotesize\xheadbreakfalse\suf@rightmark} + \fancyhead[CE]{\footnotesize\xheadbreakfalse% + \ifsuftesi@article + \ifsuftesi@authortitle + \suf@leftmark + \else + \suf@rightmark + \fi + \else + \suf@leftmark + \fi} + \fancyfoot[C]{\footnotesize\sufthepage}% + }% +\fancypagestyle{sufdefault}{% + \fancyhf{}% + \fancyfoot[RE,LO]{\ifsuftesi@bozza \footnotesize Version of \today\else\fi} + \fancyhead[LE,RO]{\footnotesize\sufthepage} + \fancyhead[LO]{\footnotesize\xheadbreakfalse\suf@rightmark} + \fancyhead[RE]{\footnotesize\xheadbreakfalse% + \ifsuftesi@article + \ifsuftesi@authortitle + \suf@leftmark + \else + \suf@rightmark + \fi + \else + \suf@leftmark + \fi} + }% +\ifsuftesi@article + \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} + \else + \fi +\ifsuftesi@sctitles + \ifsuftesi@authortitle + \def\suf@rightmark{\suftesi@headingsmallcaps{\@headtitle}} + \else + \def\suf@rightmark{\suftesi@headingsmallcaps{\rightmark}} + \fi +\else + \ifsuftesi@authortitle + \def\suf@rightmark{\nouppercase{\@headtitle}} + \else + \def\suf@rightmark{\nouppercase{\rightmark}} + \fi +\fi +\ifsuftesi@sctitles + \ifsuftesi@authortitle + \def\suf@leftmark{\suftesi@headingsmallcaps{\@author}} + \else + \def\suf@leftmark{\suftesi@headingsmallcaps{\suf@leftrightmark}} + \fi +\else +\ifsuftesi@authortitle + \def\suf@leftmark{\nouppercase{\@author}} + \else + \def\suf@leftmark{\nouppercase{\suf@leftrightmark}} + \fi +\fi +\ifsuftesi@sctitles + \def\sufthepage{\suftesi@headingsmallcaps{\thepage}} + \else + \def\sufthepage{\thepage} +\fi +\def\suf@leftrightmark{% + \if@mainmatter\leftmark\else\rightmark\fi} +\pagestyle{sufdefault} + \ifsuftesi@centerheadings\pagestyle{centerheadings}\else\fi + \ifsuftesi@sufplain\pagestyle{sufplain}\else\fi + \ifsuftesi@elements\pagestyle{elements}\else\fi \RequirePackage{caption} \ifsuftesi@elements -\captionsetup{labelsep=period,font={small,sf},singlelinecheck=false} + \captionsetup{labelsep=period,font={small,sf},singlelinecheck=false} \else -\captionsetup{labelsep=period,font=small,singlelinecheck=false} + \captionsetup{labelsep=period,font=small,singlelinecheck=false} \fi \RequirePackage{epigraph} \ifsuftesi@elements @@ -711,39 +764,39 @@ top=64pt} \ifsuftesi@sufelements \relax \else -\setlength{\beforeepigraphskip}{-3\baselineskip} -\setlength{\afterepigraphskip}{2\baselineskip} -\setlength{\epigraphrule}{0pt} -\renewcommand{\textflush}{flushepinormal} -\renewcommand{\sourceflush}{flushepinormal} -\renewcommand{\epigraphsize}{\footnotesize} -\fi + \setlength{\beforeepigraphskip}{-3\baselineskip} + \setlength{\afterepigraphskip}{2\baselineskip} + \setlength{\epigraphrule}{0pt} + \renewcommand{\textflush}{flushepinormal} + \renewcommand{\sourceflush}{flushepinormal} + \renewcommand{\epigraphsize}{\footnotesize} + \fi \fi \RequirePackage{enumitem} -\setlist{labelsep=0.6em,noitemsep,font=\normalfont} -\setdescription{font=\normalfont\itshape,noitemsep} + \setlist{labelsep=0.6em,noitemsep,font=\normalfont} + \setdescription{font=\normalfont\itshape,noitemsep} \ifsuftesi@compact -\setenumerate[1]{leftmargin=1em,label=\arabic*} -\setenumerate[2]{leftmargin= 1.5em,label=\arabic*} -\setenumerate[3]{leftmargin= 1.5em,label=\arabic*} -\setitemize[1]{leftmargin=1em} -\setitemize[2]{leftmargin=1.5em} -\setitemize[3]{leftmargin=1.5em} + \setenumerate[1]{leftmargin=1em,label=\arabic*} + \setenumerate[2]{leftmargin= 1.5em,label=\arabic*} + \setenumerate[3]{leftmargin= 1.5em,label=\arabic*} + \setitemize[1]{leftmargin=1em} + \setitemize[2]{leftmargin=1.5em} + \setitemize[3]{leftmargin=1.5em} \else \ifsuftesi@supercompact -\setenumerate[1]{leftmargin=1em,label=\arabic*} -\setenumerate[2]{leftmargin= 1.5em,label=\arabic*} -\setenumerate[3]{leftmargin= 1.5em,label=\arabic*} -\setitemize[1]{leftmargin=1em} -\setitemize[2]{leftmargin=1.5em} -\setitemize[3]{leftmargin=1.5em} + \setenumerate[1]{leftmargin=1em,label=\arabic*} + \setenumerate[2]{leftmargin= 1.5em,label=\arabic*} + \setenumerate[3]{leftmargin= 1.5em,label=\arabic*} + \setitemize[1]{leftmargin=1em} + \setitemize[2]{leftmargin=1.5em} + \setitemize[3]{leftmargin=1.5em} \else -\setenumerate[1]{leftmargin=0pt,label=\arabic*} -\setenumerate[2]{leftmargin= 1.3em,label=\arabic*} -\setenumerate[3]{leftmargin= 1.3em,label=\arabic*} -\setitemize[1]{leftmargin=0pt} -\setitemize[2]{leftmargin=1.3em} -\setitemize[3]{leftmargin=1.3em} + \setenumerate[1]{leftmargin=0pt,label=\arabic*} + \setenumerate[2]{leftmargin= 1.3em,label=\arabic*} + \setenumerate[3]{leftmargin= 1.3em,label=\arabic*} + \setitemize[1]{leftmargin=0pt} + \setitemize[2]{leftmargin=1.3em} + \setitemize[3]{leftmargin=1.3em} \fi \fi \renewcommand\labelitemii{\normalfont \textendash} @@ -763,7 +816,7 @@ top=64pt} \renewenvironment{verse} {\let\\\@centercr \list{}{\footnotesize% - \itemsep \z@ + \itemsep \z@ \itemindent -1.5em% \listparindent\itemindent \rightmargin \leftmargin @@ -771,24 +824,24 @@ top=64pt} \item\relax} {\endlist} \renewcommand\@makefntext{% -\hskip-2.5em\makebox[2em][r]{\@thefnmark}\hskip.5em} + \hskip-2.5em\makebox[2em][r]{\@thefnmark}\hskip.5em} \def\graffito@setup{%thanks to Lorenzo Pantieri and Enrico Gregorio - \itshape\footnotesize% - \parindent=0pt \lineskip=0pt \lineskiplimit=0pt % - \tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300% - \doublehyphendemerits=100000% - \finalhyphendemerits=\doublehyphendemerits} + \itshape\footnotesize% + \parindent=0pt \lineskip=0pt \lineskiplimit=0pt % + \tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300% + \doublehyphendemerits=100000% + \finalhyphendemerits=\doublehyphendemerits} \newcommand{\graffito}[1]{\marginnote% - [\graffito@setup\raggedleft\hspace{0pt}{#1}]% - {\graffito@setup\raggedright\hspace{0pt}{#1}}} - \let\marginnote\marginpar - \def\marginpar{% thanks to Antonio Macrì - \@ifnextchar[\marginnote\graffito} + [\graffito@setup\raggedleft\hspace{0pt}{#1}]% + {\graffito@setup\raggedright\hspace{0pt}{#1}}} + \let\marginnote\marginpar + \def\marginpar{% thanks to Antonio Macrì + \@ifnextchar[\marginnote\graffito} \ifsuftesi@nomarginpar -\let\graffito\@gobble -\renewcommand\marginpar[2][]{} - \else -\fi + \let\graffito\@gobble + \renewcommand\marginpar[2][]{} + \else + \fi \if@titlepage \newenvironment{abstract}{% \titlepage @@ -824,46 +877,44 @@ top=64pt} \fi \fi} \newcommand{\colophon}[3][]{% -\thispagestyle{empty} -\null + \thispagestyle{empty} + \null + \vfill + \def\next{#2} + \ifx\next\@empty\else + \noindent Copyright \copyright{} \the\year~#2\\[1ex] + All rights reserved + \fi \vfill - \def\next{#2} - \ifx\next\@empty\else - \noindent Copyright \copyright{} \the\year~#2\\[1ex] - All rights reserved - \fi -\vfill - \section*{Colophon} -{\small This work has been typeset with \sufengine{}% - \def\next{#1} - \ifx\next\@empty\else su #1 - \fi using the \textsf{suftesi} class by - Ivan Valbusa\index{Valbusa, Ivan}. #3\par} - \cleardoublepage} + {\small\noindent This work has been typeset with \sufengine{}% + \def\next{#1} + \ifx\next\@empty\else on #1 + \fi using the \textsf{suftesi} class by + Ivan Valbusa\index{Valbusa, Ivan}. #3\par} + \cleardoublepage} \newcommand{\bookcolophon}[2]{% -\thispagestyle{empty} -\null + \thispagestyle{empty} + \null + \vfill + \noindent #1 \vfill - \noindent #1 -\vfill - \section*{Colophon} -{\small #2\par} - \cleardoublepage} + {\small\noindent #2\par} + \cleardoublepage} \newcommand{\artcolophon}[1]{% \thispagestyle{empty} -\null - \vfill -{\small #1\par}} + \null + \vfill + {\small\noindent #1\par}} \newcommand{\finalcolophon}[1]{% \thispagestyle{empty} -\null\vspace*{\stretch{1}} -\begin{center} + \null\vspace*{\stretch{1}} + \begin{center} \begin{minipage}{.5\textwidth} \centering\small #1 \end{minipage} \end{center} - \vspace*{\stretch{6}} -} + \vspace*{\stretch{6}} + } \def\chapterintro{ \@ifstar{\@tempswafalse\@chapterintro}{\@tempswatrue\@chapterintro}} \def\@chapterintro{\phantomsection @@ -871,19 +922,16 @@ top=64pt} \addcontentsline{toc}{section}{\suffchapterintroname}} \newcommand{\chapterintroname}[1]{\def\suffchapterintroname{#1}} \chapterintroname{Introduzione} -\DeclareRobustCommand\itshape -{\penalty\@M\hskip\z@skip\not@math@alphabet\itshape -\mathit\fontshape\itdefault\selectfont} \newif\ifheadbreak\headbreakfalse -\DeclareRobustCommand{\headbreak} -{\ifheadbreak\\\else\fi} + \DeclareRobustCommand{\headbreak} + {\ifheadbreak\\\else\fi} \newif\ifxheadbreak\xheadbreaktrue -\DeclareRobustCommand{\xheadbreak} -{\ifxheadbreak\\\else\fi} + \DeclareRobustCommand{\xheadbreak} + {\ifxheadbreak\\\else\fi} \let\origtableofcontents\tableofcontents -\renewcommand{\tableofcontents}{% -\begingroup\headbreaktrue\xheadbreakfalse% -\origtableofcontents\endgroup} + \renewcommand{\tableofcontents}{% + \begingroup\headbreaktrue\xheadbreakfalse% + \origtableofcontents\endgroup} \renewcommand\frontmatter{\cleardoublepage\@mainmatterfalse} \renewcommand\mainmatter{\cleardoublepage\@mainmattertrue} \newenvironment{bibliografia}{% @@ -891,28 +939,28 @@ top=64pt} \section*{\refname} \addcontentsline{toc}{section}{\refname} \else -\chapter{\bibname}% + \chapter{\bibname}% \fi - \normalfont \list{}{% -\setlength{\itemindent}{-\parindent} -\setlength{\leftmargin}{\parindent} -\setlength{\labelwidth}{\leftmargin} -\setlength{\parsep}{\parskip} -\let\makelabel}} -{\endlist} + \normalfont \list{}{% + \setlength{\itemindent}{-\parindent} + \setlength{\leftmargin}{\parindent} + \setlength{\labelwidth}{\leftmargin} + \setlength{\parsep}{\parskip} + \let\makelabel}} + {\endlist} \newcommand{\losname}{Sigle} \newcommand{\itlabel}[1]{\itshape\hbox to 6em{#1}} \newenvironment{sigle}{% -\chapter{\losname} -\normalfont \list{}{% -\setlength{\labelsep}{0.5em} -\setlength{\itemindent}{0pt} -\setlength{\leftmargin}{6em} -\setlength{\labelwidth}{\leftmargin} -\setlength{\listparindent}{\parindent} -\setlength{\parsep}{\parskip} -\let\makelabel\itlabel}} -{\endlist} + \chapter{\losname} + \normalfont \list{}{% + \setlength{\labelsep}{0.5em} + \setlength{\itemindent}{0pt} + \setlength{\leftmargin}{6em} + \setlength{\labelwidth}{\leftmargin} + \setlength{\listparindent}{\parindent} + \setlength{\parsep}{\parskip} + \let\makelabel\itlabel}} + {\endlist} \let\hemph\emph \frenchspacing \endinput |