From e7c79a2788c21767e22c0e19e32a09d4240244b1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 14 Jun 2015 17:41:59 +0000 Subject: suftesi (13jun15) git-svn-id: svn://tug.org/texlive/trunk@37528 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/suftesi/suftesi.cls | 227 +++++++++++++++++------- 1 file changed, 160 insertions(+), 67 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/suftesi/suftesi.cls b/Master/texmf-dist/tex/latex/suftesi/suftesi.cls index 5573490a3f1..de5b311a19a 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} - [2015/03/31 v2.0.1 A class for typesetting theses, books and articles] + [2015/06/13 v2.1 A class for typesetting theses, books and articles] \ClassWarningNoLine{suftesi}{% ******************************************\MessageBreak * DO NOT MODIFY THE STYLES OF THIS CLASS\MessageBreak @@ -324,6 +324,38 @@ \or \def\SUF@SUBSUBSEC@StyleSwitch{\expandafter\SUF@titlesmallcaps} \fi} +\define@choicekey{}{tocchapfont}[\val\nr]{roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax +\def\SUF@tocCHAP@font{\relax} +\or +\def\SUF@tocCHAP@font{\itshape} +\or +\def\SUF@tocCHAP@font{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{tocsecfont}[\val\nr]{roman,italic,smallcaps}[italic]{% +\ifcase\nr\relax +\def\SUF@tocSEC@font{\relax} +\or +\def\SUF@tocSEC@font{\itshape} +\or +\def\SUF@tocSEC@font{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{tocsubsecfont}[\val\nr]{roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax +\def\SUF@tocSUBSEC@font{\relax} +\or +\def\SUF@tocSUBSEC@font{\itshape} +\or +\def\SUF@tocSUBSEC@font{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{tocsubsubsecfont}[\val\nr]{roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax +\def\SUF@tocSUBSUBSEC@font{\relax} +\or +\def\SUF@tocSUBSUBSEC@font{\itshape} +\or +\def\SUF@tocSUBSUBSEC@font{\expandafter\SUF@titlesmallcaps} +\fi} \define@choicekey{}{partnumstyle}[\val\nr] {arabic,roman,Roman,dotarabic,dotroman,dotRoman}[arabic]{% \ifcase\nr\relax @@ -670,21 +702,25 @@ dotarabic,dotroman,dotRoman}[arabic]{% \setkeys{}{ chapstyle=left, chapfont=italic, + tocchapfont=italic, headerfont=italic} \or \setkeys{}{ chapstyle=center, chapfont=italic, + tocchapfont=italic, headerfont=italic} \or \setkeys{}{ chapstyle=right, chapfont=italic, + tocchapfont=italic, headerfont=italic} \or \setkeys{}{ chapstyle=parleft, chapfont=italic, + tocchapfont=italic, headerfont=italic} \or \setkeys{}{ @@ -695,107 +731,126 @@ dotarabic,dotroman,dotRoman}[arabic]{% \setkeys{}{ chapstyle=parright, chapfont=italic, + tocchapfont=italic, headerfont=italic} \or \setkeys{}{ chapstyle=left, chapfont=italic, + tocchapfont=italic, secfont=smallcaps, headerfont=italic} \or \setkeys{}{ chapstyle=center, chapfont=italic, + tocchapfont=italic, secfont=smallcaps, headerfont=italic} \or \setkeys{}{ chapstyle=right, chapfont=italic, + tocchapfont=italic, secfont=smallcaps, headerfont=italic} \or \setkeys{}{ chapstyle=parleft, chapfont=italic, + tocchapfont=italic, secfont=smallcaps, headerfont=italic} \or \setkeys{}{ chapstyle=parcenter, chapfont=italic, + tocchapfont=italic, secfont=smallcaps, headerfont=italic} \or \setkeys{}{ chapstyle=parright, chapfont=italic, + tocchapfont=italic, secfont=smallcaps, headerfont=italic} \or \setkeys{}{ chapstyle=left, chapfont=smallcaps, + tocchapfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=center, chapfont=smallcaps, + tocchapfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=right, chapfont=smallcaps, + tocchapfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=parleft, chapfont=smallcaps, + tocchapfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=parcenter, chapfont=smallcaps, + tocchapfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=parright, chapfont=smallcaps, + tocchapfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=left, chapfont=smallcaps, + tocchapfont=smallcaps, secfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=center, chapfont=smallcaps, + tocchapfont=smallcaps, secfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=right, chapfont=smallcaps, + tocchapfont=smallcaps, secfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=parleft, chapfont=smallcaps, + tocchapfont=smallcaps, secfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=parcenter, chapfont=smallcaps, + tocchapfont=smallcaps, secfont=smallcaps, headerfont=smallcaps} \or \setkeys{}{ chapstyle=parright, chapfont=smallcaps, + tocchapfont=smallcaps, secfont=smallcaps, headerfont=smallcaps} \or @@ -935,7 +990,11 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} revauthortitle=false, papertitlestyle=left, authorfont=roman, - titlefont=italic} + titlefont=italic, + tocchapfont=roman, + tocsecfont=roman, + tocsubsecfont=roman, + tocsubsubsecfont=roman} \ProcessOptionsX<>\relax \XKV@useoption{a4paper} \XKV@useoption{10pt} \XKV@useoption{11pt} \XKV@useoption{12pt} @@ -1390,6 +1449,16 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} {\relax}% }% \fi +\def\isbn#1{\gdef\@isbn{#1}} + \def\@issn{\@latex@warning@no@line{% + No \noexpand\isbn given}} +\def\doi#1{\gdef\@doi{#1}} + \def\@doi{\@latex@warning@no@line{% + No \noexpand\doi given}} +\def\isbn#1{\gdef\@issn{#1}} + \def\@issn{\@latex@warning@no@line{% + No \noexpand\isbn given}} + \renewcommand*{\title}[2][]{\gdef\@headtitle{#1}\gdef\@title{#2}} \edef\title{\noexpand\@dblarg \expandafter\noexpand\csname\string\title\endcsname} @@ -1592,12 +1661,6 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} \def\journalname#1{\gdef\@journalname{#1}} \def\@journalname{\@latex@warning@no@line{% No \noexpand\journalname given}} -\def\issn#1{\gdef\@issn{#1}} - \def\@issn{\@latex@warning@no@line{% - No \noexpand\issn given}} -\def\doi#1{\gdef\@doi{#1}} - \def\@doi{\@latex@warning@no@line{% - No \noexpand\doi given}} \def\journalvolume#1{\gdef\@journalvolume{#1}} \def\@journalvolume{\@latex@warning@no@line{% No \noexpand\journalvolume given}} @@ -1624,6 +1687,22 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} \def\collectioneditor#1{\gdef\@collectioneditor{#1}} \def\@collectioneditor{\@latex@warning@no@line{% No \noexpand\collectioneditor given}} +\renewcommand*{\title}[2][]{\gdef\@headtitle{#1}\gdef\@title{#2}\markright{#1}} + \edef\title{\noexpand\@dblarg + \expandafter\noexpand\csname\string\title\endcsname} + \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}} + \newcommand*\l@title[2]{% \ifnum \c@tocdepth >\m@ne \addpenalty{-\@highpenalty}% @@ -1675,57 +1754,56 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} \fi \thispagestyle{plain}\@thanks% \endgroup - \setcounter{footnote}{0}% \setcounter{section}{0}% \global\let\and\relax \let\thanks\@gobble} \AtBeginDocument{\def\@maketitle{% + \refstepcounter{article} \SUF@chaptersize \SUF@lr@coll@titleSwitch \let\footnote\thanks \parindent=0pt - \refstepcounter{title}% {\ifsuftesi@reverseauthortitle \SUF@titlefont@Switch{\@title}% \else\SUF@authorfont@Switch{\@author}\fi}% + \label{begin:\thearticle} + \xdef\@currentHref{title.\thearticle}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \csname toc@entry@\endcsname \begingroup% \let\thanks\@gobble - \addcontentsline{toc}{title}{\normalfont{\@author}\newline% - \itshape\@headtitle} + \addcontentsline{toc}{title}{\normalfont{\@author}\texorpdfstring{\newline}{, }% + \itshape\@headtitle} \endgroup% - \vspace{2ex}\par + \par\nobreak\vspace{2ex} {\ifsuftesi@reverseauthortitle \SUF@authorfont@Switch{\@author}% \else \SUF@titlefont@Switch{\@title}% - \fi\\} - \vskip1.5cm}} + \fi\vskip1.5cm}}% + } \newenvironment{article} - {\begingroup - \global\let\@thanks\@empty - \setcounter{footnote}{0} - \refstepcounter{article} - \label{begin:\thearticle} -} - {\label{end:\thearticle}\endgroup - } -\newcommand{\includeart}[1]{% - \clearpage - \input{#1} -} + {\begingroup + \setcounter{section}{0} + \setcounter{footnote}{0} + \setcounter{figure}{0} + \setcounter{table}{0}} + {\label{end:\thearticle} + \cleardoublepage + \global\let\@thanks\@empty + \endgroup} \newcommand{\frontispiece}{% \thispagestyle{empty}% \begingroup \centering - \null\vspace{\stretch{1}} + \vspace*{\stretch{1}} {\SUF@chaptersize\@collectiontitle\par} \vskip5ex \@collectioneditor - \vspace{\stretch{2}} - - \@date + \vspace*{\stretch{3}} \endgroup \clearpage} @@ -2230,10 +2308,11 @@ Janusz M. Nowacki. \makebox[1em][l]{\thecontentspage}% \hskip\SUF@addto@tochang@chap% \makebox[\SUF@label@chap][l]{% - \SUF@toclabelnum\thecontentslabel}\hspace*{1em}} + \SUF@toclabelnum\thecontentslabel}\hspace*{1em}% + \SUF@tocCHAP@font} {\hskip-\SUF@tochang@chap% \makebox[1em][l]{\thecontentspage}% - \hskip\SUF@addto@tochang@chap} + \hskip\SUF@addto@tochang@chap\SUF@tocCHAP@font} {} [\addvspace{1ex}] \titlecontents{section} @@ -2243,27 +2322,33 @@ Janusz M. Nowacki. \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@sec% \makebox[\SUF@label@sec][l]{% \ifsuftesi@article\SUF@toclabelnum% - \else\fi\thecontentslabel}\hspace*{1em}} + \else\fi\thecontentslabel}\hspace*{1em}% + \SUF@tocSEC@font} {\hskip-\SUF@tochang@sec% - \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@sec} + \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@sec% + \SUF@tocSEC@font} {} \titlecontents{subsection} [\SUF@tochang@subsec] {} {\hskip-\SUF@tochang@subsec% \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsec% - \makebox[\SUF@label@subsec][l]{\thecontentslabel}\hspace*{1em}} + \makebox[\SUF@label@subsec][l]{\thecontentslabel}\hspace*{1em}% + \SUF@tocSUBSEC@font} {\hskip-\SUF@tochang@subsec% - \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsec} + \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsec% + \SUF@tocSUBSEC@font} {} \titlecontents{subsubsection} [\SUF@tochang@subsubsec] {} {\hskip-\SUF@tochang@subsubsec% \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsubsec% - \makebox[\SUF@label@subsubsec][l]{\thecontentslabel}\hspace*{1em}} + \makebox[\SUF@label@subsubsec][l]{\thecontentslabel}\hspace*{1em}% + \SUF@tocSUBSUBSEC@font} {\hskip-\SUF@tochang@subsubsec% - \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsubsec} + \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsubsec% + \SUF@tocSUBSUBSEC@font} {} \titlecontents{paragraph} [\SUF@tochang@par] @@ -2348,8 +2433,10 @@ Janusz M. Nowacki. {\addvspace{2ex}} {\hskip-\SUF@tocindent@chap% \makebox[\SUF@label@chap][l]{\SUF@toclabelnum\thecontentslabel}% - \hspace*{1em}} - {\hskip-\SUF@tocindent@chap} + \hspace*{1em}% + \SUF@tocCHAP@font} + {\hskip-\SUF@tocindent@chap% + \SUF@tocCHAP@font} {\SUF@chaptitlerule\contentspage} [\addvspace{1ex}] \titlecontents{section} @@ -2358,23 +2445,29 @@ Janusz M. Nowacki. {\hskip-\dimexpr(\SUF@label@sec+1em)% \makebox[\SUF@label@sec][l]{% \ifsuftesi@article\SUF@toclabelnum% - \else\fi\thecontentslabel}\hspace*{1em}} - {\hskip-\dimexpr(\SUF@label@sec+1em)} + \else\fi\thecontentslabel}\hspace*{1em}% + \SUF@tocSEC@font} + {\hskip-\dimexpr(\SUF@label@sec+1em)% + \SUF@tocSEC@font} {\ifsuftesi@article\SUF@chaptitlerule% \else\SUF@titlerule\fi\contentspage} \titlecontents{subsection} [\SUF@tocindent@subsec] {} {\hskip-\dimexpr(\SUF@label@subsec+1em)% - \makebox[\SUF@label@subsec][l]{\thecontentslabel}\hspace*{1em}} - {\hskip-\dimexpr(\SUF@label@subsec+1em)} + \makebox[\SUF@label@subsec][l]{\thecontentslabel}\hspace*{1em}% + \SUF@tocSUBSEC@font} + {\hskip-\dimexpr(\SUF@label@subsec+1em)% + \SUF@tocSUBSEC@font} {\SUF@titlerule\contentspage} \titlecontents{subsubsection} [\SUF@tocindent@subsubsec] {} {\hskip-\dimexpr(\SUF@label@subsubsec+1em)% - \makebox[\SUF@label@subsubsec][l]{\thecontentslabel}\hspace*{1em}} - {\hskip-\dimexpr(\SUF@label@subsubsec+1em)} + \makebox[\SUF@label@subsubsec][l]{\thecontentslabel}\hspace*{1em}% + \SUF@tocSUBSUBSEC@font} + {\hskip-\dimexpr(\SUF@label@subsubsec+1em)% + \SUF@tocSUBSUBSEC@font} {\SUF@titlerule\contentspage} \titlecontents{paragraph} [\SUF@tocindent@par] @@ -2535,26 +2628,6 @@ Janusz M. Nowacki. \renewcommand{\tableofcontents}{% \begingroup\headbreaktrue\xheadbreakfalse% \origtableofcontents\endgroup} -\ifsuftesi@article -\renewcommand\frontmatter{\ClassError{suftesi} - {Command \noexpand\frontmatter is undefined\MessageBreak - using 'documentstructure=article'} - {Command \noexpand\frontmatter is undefined\MessageBreak - using 'documentstructure=article'}} -\renewcommand\mainmatter{\ClassError{suftesi} - {Command \noexpand\mainmatter is undefined\MessageBreak - using 'documentstructure=article'} - {Command \noexpand\mainmatter is undefined\MessageBreak - using 'documentstructure=article'}} -\renewcommand\backmatter{\ClassError{suftesi} - {Command \noexpand\backmatter is undefined\MessageBreak - using 'documentstructure=article'} - {Command \noexpand\backmatter is undefined\MessageBreak - using 'documentstructure=article'}} -\else -\renewcommand\frontmatter{\cleardoublepage\@mainmatterfalse} -\renewcommand\mainmatter{\cleardoublepage\@mainmattertrue} -\fi \newenvironment{bibliografia}{% \ifsuftesi@article \section*{\refname} @@ -2582,6 +2655,26 @@ Janusz M. Nowacki. \setlength{\parsep}{\parskip} \let\makelabel\itlabel}} {\endlist} +\ifsuftesi@article +\renewcommand\frontmatter{\ClassError{suftesi} + {Command \noexpand\frontmatter is undefined\MessageBreak + using 'documentstructure=article'} + {Command \noexpand\frontmatter is undefined\MessageBreak + using 'documentstructure=article'}} +\renewcommand\mainmatter{\ClassError{suftesi} + {Command \noexpand\mainmatter is undefined\MessageBreak + using 'documentstructure=article'} + {Command \noexpand\mainmatter is undefined\MessageBreak + using 'documentstructure=article'}} +\renewcommand\backmatter{\ClassError{suftesi} + {Command \noexpand\backmatter is undefined\MessageBreak + using 'documentstructure=article'} + {Command \noexpand\backmatter is undefined\MessageBreak + using 'documentstructure=article'}} +\else +\renewcommand\frontmatter{\cleardoublepage\@mainmatterfalse} +\renewcommand\mainmatter{\cleardoublepage\@mainmattertrue} +\fi \AtBeginDocument{\RequirePackage{fixltxhyph}} \let\hemph\emph \ifthenelse{\boolean{xetex}\or\boolean{luatex}} -- cgit v1.2.3