diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/suftesi/suftesi.cls | 1656 |
1 files changed, 808 insertions, 848 deletions
diff --git a/Master/texmf-dist/tex/latex/suftesi/suftesi.cls b/Master/texmf-dist/tex/latex/suftesi/suftesi.cls index 527ac390668..35cb7d84938 100644 --- a/Master/texmf-dist/tex/latex/suftesi/suftesi.cls +++ b/Master/texmf-dist/tex/latex/suftesi/suftesi.cls @@ -19,11 +19,11 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesClass{suftesi} - [2012/08/31 v0.9a A class for typesetting theses, books and articles] -\newif\ifsuftesi@artemisia + [2012/09/23 v0.9b A class for typesetting theses, books and articles] + +\RequirePackage{xkeyval} +\newif\ifsuftesi@cmfont \newif\ifsuftesi@porson -\newif\ifsuftesi@defaultgreek -\newif\ifsuftesi@defaultfont \newif\ifsuftesi@centerheader \newif\ifsuftesi@sufplain \newif\ifsuftesi@bozza @@ -32,384 +32,597 @@ \newif\ifsuftesi@periodical \newif\ifsuftesi@compact \newif\ifsuftesi@supercompact -\newif\ifsuftesi@elements \newif\ifsuftesi@sufelements \newif\ifsuftesi@nocrop -\newif\ifsuftesi@nomarginpar \newif\ifsuftesi@dottedtoc \newif\ifsuftesi@raggedtoc -\newif\ifsuftesi@tocpageleft -\newif\ifsuftesi@defaultparindent -\newif\ifsuftesi@standardfootnote -\newif\ifsuftesi@dottedfootnote -\newif\ifsuftesi@alignlist -\newif\ifsuftesi@indentlist -\newif\ifsuftesi@ralignquotation -\newif\ifsuftesi@smallquotation -\newif\ifsuftesi@romanchap -\newif\ifsuftesi@centerpart -\newif\ifsuftesi@centerchap -\newif\ifsuftesi@centersec -\newif\ifsuftesi@centersubsec -\newif\ifsuftesi@rightpart -\newif\ifsuftesi@rightchap -\newif\ifsuftesi@rightsec -\newif\ifsuftesi@rightsubsec -\newif\ifsuftesi@centersubsubsec -\newif\ifsuftesi@rightsubsubsec +\newif\ifsuftesi@pagelefttoc +\newif\ifsuftesi@fewfootnotes +\newif\ifsuftesi@partpage \newif\ifsuftesi@numparpart \newif\ifsuftesi@numparchap \newif\ifsuftesi@numparsec \newif\ifsuftesi@numparsubsec \newif\ifsuftesi@numparsubsubsec -\newif\ifsuftesi@dottedpart -\newif\ifsuftesi@dottedchap -\newif\ifsuftesi@italicpart -\newif\ifsuftesi@italicchap -\newif\ifsuftesi@italicsec -\newif\ifsuftesi@italicsubsec -\newif\ifsuftesi@italicsubsubsec \newif\ifsuftesi@smallcapspart \newif\ifsuftesi@smallcapschap \newif\ifsuftesi@smallcapssec -\newif\ifsuftesi@smallcapssubsec -\newif\ifsuftesi@smallcapssubsubsec -\newif\ifsuftesi@italicLhead -\newif\ifsuftesi@italicRhead -\newif\ifsuftesi@italicheader -\newif\ifsuftesi@smallcapsRhead -\newif\ifsuftesi@smallcapsLhead -\newif\ifsuftesi@smallcapsheader -\DeclareOption{defaultfont}{ - \suftesi@defaultfonttrue - \suftesi@defaultgreektrue} -\DeclareOption{artemisia}{ - \suftesi@artemisiatrue - \suftesi@porsonfalse - \suftesi@defaultgreekfalse} -\DeclareOption{porson}{ - \suftesi@porsontrue - \suftesi@artemisiafalse - \suftesi@defaultgreekfalse} -\DeclareOption{defaultgreek}{ - \suftesi@defaultgreektrue - \suftesi@artemisiafalse - \suftesi@porsonfalse} -\DeclareOption{centerheader}{ - \suftesi@centerheadertrue} -\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 - \suftesi@articlefalse - \suftesi@smallcapschaptrue - \suftesi@smallcapssectrue - \suftesi@raggedtoctrue - } -\DeclareOption{sufelements}{ - \suftesi@sufelementstrue - \suftesi@smallcapschaptrue - \suftesi@smallcapssectrue - \suftesi@compactfalse - \suftesi@supercompactfalse} -\DeclareOption{nocrop}{ - \suftesi@nocroptrue} -\DeclareOption{nomarginpar}{ - \suftesi@nomarginpartrue} -\DeclareOption{article}{ - \suftesi@articletrue} -\DeclareOption{authortitle}{ - \suftesi@authortitletrue} -\DeclareOption{dottedtoc}{ - \suftesi@dottedtoctrue} -\DeclareOption{raggedtoc}{ - \suftesi@raggedtoctrue} -\DeclareOption{tocpageleft}{ - \suftesi@tocpagelefttrue} -\DeclareOption{defaultparindent}{ - \suftesi@defaultparindenttrue} -\DeclareOption{standardfootnote}{ - \suftesi@standardfootnotetrue} -\DeclareOption{dottedfootnote}{ - \suftesi@dottedfootnotetrue} -\DeclareOption{alignlist}{ - \suftesi@alignlisttrue} -\DeclareOption{indentlist}{ - \suftesi@indentlisttrue} -\DeclareOption{ralignquotation}{ - \suftesi@ralignquotationtrue} -\DeclareOption{smallquotation}{ - \suftesi@smallquotationtrue} -\DeclareOption{centerpart}{ - \suftesi@centerparttrue} -\DeclareOption{centerchap}{ - \suftesi@centerchaptrue} -\DeclareOption{centersec}{ - \suftesi@centersectrue} -\DeclareOption{rightpart}{ - \suftesi@rightparttrue} -\DeclareOption{rightchap}{ - \suftesi@rightchaptrue} -\DeclareOption{rightsec}{ - \suftesi@rightsectrue} -\DeclareOption{numparpart}{ - \suftesi@numparparttrue} -\DeclareOption{numparchap}{ - \suftesi@numparchaptrue} -\DeclareOption{numparsec}{ - \suftesi@numparsectrue} -\DeclareOption{smallcapspart}{ - \suftesi@smallcapsparttrue} -\DeclareOption{smallcapschap}{ - \suftesi@smallcapschaptrue} -\DeclareOption{smallcapssec}{ - \suftesi@smallcapssectrue} -\DeclareOption{italicpart}{ - \suftesi@italicparttrue} -\DeclareOption{italicchap}{ - \suftesi@italicchaptrue} -\DeclareOption{italicsec}{ - \suftesi@italicsectrue} -\DeclareOption{italicsubsec}{ - \suftesi@italicsubsectrue} -\DeclareOption{romanchap}{ - \suftesi@romanchaptrue} -\DeclareOption{dottedpart}{ - \suftesi@dottedparttrue} -\DeclareOption{dottedchap}{ - \suftesi@dottedchaptrue} -\DeclareOption{italicheader}{ - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{smallcapsheader}{ - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{rmstyle1}{ - \suftesi@italicsectrue} -\DeclareOption{rmstyle2}{ - \suftesi@italicsectrue - \suftesi@centerchaptrue} -\DeclareOption{rmstyle3}{ - \suftesi@italicsectrue - \suftesi@rightchaptrue} -\DeclareOption{rmstyle4}{ - \suftesi@italicsectrue - \suftesi@numparchaptrue} -\DeclareOption{rmstyle5}{ - \suftesi@italicsectrue - \suftesi@centerchaptrue - \suftesi@numparchaptrue} -\DeclareOption{rmstyle6}{ - \suftesi@italicsectrue - \suftesi@rightchaptrue - \suftesi@numparchaptrue} -\DeclareOption{itstyle1}{ - \suftesi@italicchaptrue - \suftesi@italicsectrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle2}{ - \suftesi@italicchaptrue - \suftesi@italicsectrue - \suftesi@centerchaptrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle3}{ - \suftesi@italicchaptrue - \suftesi@italicsectrue - \suftesi@rightchaptrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle4}{ - \suftesi@italicchaptrue - \suftesi@italicsectrue - \suftesi@numparchaptrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle5}{ - \suftesi@italicchaptrue - \suftesi@italicsectrue - \suftesi@centerchaptrue - \suftesi@numparchaptrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle6}{ - \suftesi@italicchaptrue - \suftesi@italicsectrue - \suftesi@rightchaptrue - \suftesi@numparchaptrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle7}{ - \suftesi@italicchaptrue - \suftesi@smallcapssectrue - \suftesi@italicsubsectrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle8}{ - \suftesi@italicchaptrue - \suftesi@centerchaptrue - \suftesi@italicsubsectrue - \suftesi@smallcapssectrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle9}{ - \suftesi@italicchaptrue - \suftesi@rightchaptrue - \suftesi@italicsubsectrue - \suftesi@smallcapssectrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle10}{ - \suftesi@italicchaptrue - \suftesi@numparchaptrue - \suftesi@italicsubsectrue - \suftesi@smallcapssectrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle11}{ - \suftesi@italicchaptrue - \suftesi@centerchaptrue - \suftesi@italicsubsectrue - \suftesi@numparchaptrue - \suftesi@smallcapssectrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{itstyle12}{ - \suftesi@italicchaptrue - \suftesi@rightchaptrue - \suftesi@italicsubsectrue - \suftesi@numparchaptrue - \suftesi@smallcapssectrue - \suftesi@italicLheadtrue - \suftesi@italicRheadtrue} -\DeclareOption{scstyle1}{ - \suftesi@smallcapschaptrue - \suftesi@italicsectrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle2}{ - \suftesi@smallcapschaptrue - \suftesi@italicsectrue - \suftesi@centerchaptrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle3}{ - \suftesi@smallcapschaptrue - \suftesi@italicsectrue - \suftesi@rightchaptrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle4}{ - \suftesi@smallcapschaptrue - \suftesi@italicsectrue - \suftesi@numparchaptrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle5}{ - \suftesi@smallcapschaptrue - \suftesi@italicsectrue - \suftesi@centerchaptrue - \suftesi@numparchaptrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle6}{ - \suftesi@smallcapschaptrue - \suftesi@italicsectrue - \suftesi@rightchaptrue - \suftesi@numparchaptrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle7}{ - \suftesi@smallcapschaptrue - \suftesi@smallcapssectrue - \suftesi@italicsubsectrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle8}{ - \suftesi@smallcapschaptrue - \suftesi@centerchaptrue - \suftesi@italicsubsectrue - \suftesi@smallcapssectrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle9}{ - \suftesi@smallcapschaptrue - \suftesi@rightchaptrue - \suftesi@italicsubsectrue - \suftesi@smallcapssectrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle10}{ - \suftesi@smallcapschaptrue - \suftesi@numparchaptrue - \suftesi@italicsubsectrue - \suftesi@smallcapssectrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle11}{ - \suftesi@smallcapschaptrue - \suftesi@centerchaptrue - \suftesi@italicsubsectrue - \suftesi@numparchaptrue - \suftesi@smallcapssectrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} -\DeclareOption{scstyle12}{ - \suftesi@smallcapschaptrue - \suftesi@rightchaptrue - \suftesi@italicsubsectrue - \suftesi@numparchaptrue - \suftesi@smallcapssectrue - \suftesi@smallcapsLheadtrue - \suftesi@smallcapsRheadtrue} +\newif\ifsuftesi@elementschap +\newif\ifsuftesi@elementsheader +\newif\ifsuftesi@elementsstructure +\newif\ifsuftesi@elementspagelayout \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} -\ExecuteOptions{artemisia,rmstyle1} \ProcessOptions \relax \LoadClass{book} +\define@choicekey{}{documentstructure}[\val\nr] + {book,article}[book]{% +\ifcase\nr\relax +\or +\suftesi@articletrue +\@titlepagefalse +\fi} +\RequirePackage{geometry} + \geometry{heightrounded} +\define@choicekey{}{pagelayout}[\val\nr] + {standard,periodical,compact,supercompact,elements}[standard]{% +\ifcase\nr\relax + \DeclareRobustCommand{\SUF@chaptersize}{\Large} +\geometry{% + a4paper, + includeheadfoot=true, + textwidth= 110mm, + textheight= 220mm, + marginratio= 1:2, + marginparwidth= 30mm, + marginparsep= 12pt} +\or +\suftesi@periodicaltrue + \DeclareRobustCommand{\SUF@chaptersize}{\large} + \geometry{ + includeheadfoot=false, + textheight= 165mm, + textwidth= 110mm, + paperwidth= 170mm, + paperheight= 240mm, + marginratio= 2:3, + marginparwidth= 26mm, + marginparsep= 10pt} +\or +\suftesi@compacttrue + \DeclareRobustCommand{\SUF@chaptersize}{\large} + \geometry{ + includeheadfoot=false, + textheight= 165mm, + textwidth= 110mm, + paperwidth= 160mm, + paperheight= 240mm, + marginratio= 2:3, + marginparwidth= 22mm, + marginparsep= 9pt} +\or +\suftesi@supercompacttrue + \DeclareRobustCommand{\SUF@chaptersize}{\large} + \geometry{ + includeheadfoot=false, + textheight= 150mm, + textwidth= 100mm, + paperwidth= 140mm, + paperheight= 210mm, + marginratio= 2:3, + marginparwidth= 18mm, + marginparsep= 8pt} +\or +\suftesi@elementspagelayouttrue + \geometry{% + includeheadfoot=false, + textwidth= 251pt, + textheight= 502pt, + paperwidth= 374pt, + paperheight= 648pt, + vmarginratio= 1:2, + marginparwidth= 60pt, + marginparsep= 18pt, + outer= 90pt} +\fi} +\define@choicekey{}{partstyle}[\val\nr]{% + left,center,right,parleft,parcenter,parright}[left]{% +\ifcase\nr\relax + \def\SUF@lr@PARTSwitch{\filright} +\or + \def\SUF@lr@PARTSwitch{\filcenter} +\or + \def\SUF@lr@PARTSwitch{\filleft} +\or%numpar + \def\SUF@lr@PARTSwitch{\filright} + \suftesi@numparparttrue +\or + \def\SUF@lr@PARTSwitch{\filcenter} + \suftesi@numparparttrue +\or + \def\SUF@lr@PARTSwitch{\filleft} + \suftesi@numparparttrue +\fi} +\define@choicekey{}{chapstyle}[\val\nr]{% + left,center,right,parleft,parcenter,parright,elements}[left]{% +\ifcase\nr\relax + \def\SUF@lr@CHAPSwitch{\filright} +\or + \def\SUF@lr@CHAPSwitch{\filcenter} +\or + \def\SUF@lr@CHAPSwitch{\filleft} +\or%numparchap + \def\SUF@lr@CHAPSwitch{\filright} + \suftesi@numparchaptrue +\or + \def\SUF@lr@CHAPSwitch{\filcenter} + \suftesi@numparchaptrue +\or + \def\SUF@lr@CHAPSwitch{\filleft} + \suftesi@numparchaptrue +\or + \suftesi@elementschaptrue +\fi} +\define@choicekey{}{secstyle}[\val\nr]{% + left,center,right,parleft,parcenter,parright}[left]{% +\ifcase\nr\relax + \def\SUF@lr@SECSwitch{\filright} +\or + \def\SUF@lr@SECSwitch{\filcenter} +\or + \def\SUF@lr@SECSwitch{\filleft} +\or%numparsec + \def\SUF@lr@SECSwitch{\filright} + \suftesi@numparsectrue +\or + \def\SUF@lr@SECSwitch{\filcenter} + \suftesi@numparsectrue +\or + \def\SUF@lr@SECSwitch{\filleft} + \suftesi@numparsectrue +\fi} +\define@choicekey{}{subsecstyle}[\val\nr]{left,center,right}[left]{% +\ifcase\nr\relax + \def\SUF@lr@SUBSECSwitch{\filright} +\or + \def\SUF@lr@SUBSECSwitch{\filcenter} +\or + \def\SUF@lr@SUBSECSwitch{\filleft} +\fi} +\define@choicekey{}{subsubsecstyle}[\val\nr]{left,center,right}[left]{% +\ifcase\nr\relax + \def\SUF@lr@SUBSUBSECSwitch{\filright} +\or + \def\SUF@lr@SUBSUBSECSwitch{\filcenter} +\or + \def\SUF@lr@SUBSUBSECSwitch{\filleft} +\fi} +\define@choicekey{}{partfont}[\val\nr]{roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax +\def\SUF@PART@StyleSwitch{\relax} +\or +\def\SUF@PART@StyleSwitch{\itshape} +\or +\def\SUF@PART@StyleSwitch{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{chapfont}[\val\nr]{roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax +\def\SUF@CHAP@StyleSwitch{\relax} +\or +\def\SUF@CHAP@StyleSwitch{\itshape} +\or +\def\SUF@CHAP@StyleSwitch{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{secfont}[\val\nr]{roman,italic,smallcaps}[italic]{% +\ifcase\nr\relax +\def\SUF@SEC@StyleSwitch{\relax} +\or +\def\SUF@SEC@StyleSwitch{\itshape} +\or +\def\SUF@SEC@StyleSwitch{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{subsecfont}[\val\nr]{roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax +\def\SUF@SUBSEC@StyleSwitch{\relax} +\or +\def\SUF@SUBSEC@StyleSwitch{\itshape} +\or +\def\SUF@SUBSEC@StyleSwitch{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{subsubsecfont}[\val\nr]{roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax +\def\SUF@SUBSUBSEC@StyleSwitch{\relax} +\or +\def\SUF@SUBSUBSEC@StyleSwitch{\itshape} +\or +\def\SUF@SUBSUBSEC@StyleSwitch{\expandafter\SUF@titlesmallcaps} +\fi} +\define@choicekey{}{partnumstyle}[\val\nr] + {arabic,roman,Roman,dotarabic,dotroman,dotRoman}[arabic]{% +\ifcase\nr\relax + \def\SUF@thepart{\arabic{part}} + \def\SUF@dotpart{} +\or + \def\SUF@thepart{\textsc{\roman{part}}} + \def\SUF@dotpart{} +\or + \def\SUF@thepart{\Roman{part}} + \def\SUF@dotpart{} +\or + \def\SUF@thepart{\arabic{part}} + \def\SUF@dotpart{.} +\or + \def\SUF@thepart{\textsc{\roman{part}}} + \def\SUF@dotpart{.} +\or + \def\SUF@thepart{\Roman{part}} + \def\SUF@dotpart{.} +\fi} +\define@choicekey{}{chapnumstyle}[\val\nr]{arabic,roman,Roman,dotarabic,dotroman,dotRoman}[arabic]{% +\ifcase\nr\relax + \def\SUF@thechapter{\arabic{chapter}} + \def\SUF@dotchap{} +\or + \def\SUF@thechapter{\textsc{\roman{chapter}}} + \def\SUF@dotchap{} +\or + \def\SUF@thechapter{\Roman{chapter}} + \def\SUF@dotchap{} +\or + \def\SUF@thechapter{\arabic{chapter}} + \def\SUF@dotchap{.} +\or + \def\SUF@thechapter{\textsc{\roman{chapter}}} + \def\SUF@dotchap{.} +\or + \def\SUF@thechapter{\Roman{chapter}} + \def\SUF@dotchap{.} +\fi} +\define@choicekey{}{secnumstyle}[\val\nr] + {arabic,roman,Roman,dotarabic,dotroman,dotRoman}[arabic]{% +\ifsuftesi@article +\ifcase\nr\relax + \def\SUF@thesection{\arabic{section}} + \def\SUF@dotsec{} +\or + \def\SUF@thesection{\textsc{\roman{section}}} + \def\SUF@dotsec{} +\or + \def\SUF@thesection{\Roman{section}} + \def\SUF@dotsec{} +\or + \def\SUF@thesection{\arabic{section}} + \def\SUF@dotsec{.} +\or + \def\SUF@thesection{\textsc{\roman{section}}} + \def\SUF@dotsec{.} +\or + \def\SUF@thesection{\Roman{section}} + \def\SUF@dotsec{.} +\fi +\else + \def\SUF@thesection{\arabic{section}} + \def\SUF@dotsec{} +\fi} +\define@choicekey{}{headerstyle}[\val\nr] + {inner,center,plain,authortitleinner, + authortitlecenter,elements}[inner]{% +\ifcase\nr\relax + \def\SUF@rightmark{\SUF@Rheadstyle{\rightmark}} + \def\SUF@leftmark{\SUF@Lheadstyle{\SUF@leftrightmark}} +\or + \suftesi@centerheadertrue + \def\SUF@rightmark{\SUF@Rheadstyle{\rightmark}} + \def\SUF@leftmark{\SUF@Lheadstyle{\SUF@leftrightmark}} +\or + \suftesi@sufplaintrue +\or + \suftesi@authortitletrue + \def\SUF@rightmark{\SUF@Rheadstyle{\@headtitle}} + \def\SUF@leftmark{\SUF@Lheadstyle{\@author}} +\or + \suftesi@authortitletrue + \def\SUF@rightmark{\SUF@Rheadstyle{\@headtitle}} + \def\SUF@leftmark{\SUF@Lheadstyle{\@author}} + \suftesi@centerheadertrue +\or + \suftesi@elementsheadertrue +\fi} +\define@choicekey{}{headerfont}[\val\nr] + {roman,italic,smallcaps}[roman]{% +\ifcase\nr\relax + \def\SUF@Rheadstyle{} + \def\SUF@Lheadstyle{} + \def\SUF@thepage{\thepage} +\or + \def\SUF@Rheadstyle{\itshape} + \def\SUF@Lheadstyle{\itshape} + \def\SUF@thepage{\thepage} +\or + \def\SUF@Rheadstyle{\SUF@headingsmallcaps} + \def\SUF@Lheadstyle{\SUF@headingsmallcaps} + \def\SUF@thepage{\SUF@headingsmallcaps{\thepage}} +\fi} +\RequirePackage[inline]{enumitem} +\renewcommand\labelitemi{\color{sufgray}\textbullet} +\setlist{itemsep=.5ex,parsep=0pt} +\setlist[description]{font=\normalfont\itshape} +\define@choicekey{}{liststyle}[\val\nr] + {bulged,aligned,indented}[bulged]{% +\ifcase\nr\relax + \setlist[enumerate,1]{leftmargin=0pt,label=\arabic*.} + \setlist[enumerate,2]{leftmargin= 1.3\parindent,label=\alph*.} + \setlist[enumerate,3]{leftmargin= 1.3\parindent,label=\roman*.} + \setlist[itemize,1]{leftmargin=0pt} + \setlist[itemize,2]{leftmargin=1.3\parindent} + \setlist[itemize,3]{leftmargin=1.3\parindent} +\or + \setlist[enumerate,1]{leftmargin=1\parindent,label=\arabic*.} + \setlist[enumerate,2]{leftmargin= 1.5\parindent,label=\alph*.} + \setlist[enumerate,3]{leftmargin= 1.5\parindent,label=\roman*.} + \setlist[itemize,1]{leftmargin=1\parindent} + \setlist[itemize,2]{leftmargin=1.5\parindent} + \setlist[itemize,3]{leftmargin=1.5\parindent} +\or + \setlist[enumerate,1]{leftmargin=2\parindent,label=\arabic*.} + \setlist[enumerate,2]{leftmargin= 2.5\parindent,label=\alph*.} + \setlist[enumerate,3]{leftmargin= 2.5\parindent,label=\roman*.} + \setlist[itemize,1]{leftmargin=2\parindent} + \setlist[itemize,2]{leftmargin=2.5\parindent} + \setlist[itemize,3]{leftmargin=2.5\parindent} +\fi} +\define@choicekey{}{quotestyle}[\val\nr] + {center,right}[center]{% +\ifcase\nr\relax +\def\SUF@quote@style{\rightmargin=\parindent} +\or +\def\SUF@quote@style{} +\fi} +\define@choicekey{}{quotesize}[\val\nr] + {footnotesize,small}[footnotesize]{% +\ifcase\nr\relax +\def\SUF@quotation@size{\footnotesize} +\or +\def\SUF@quotation@size{\small} +\fi} +\define@choicekey{}{footnotestyle}[\val\nr] + {bulged,hung,dotted,superscript}[bulged]{% +\ifcase\nr\relax + \renewcommand\@makefntext{% + \hskip-2.5em\makebox[2em][r]{\@thefnmark}\hskip.5em} +\or + \renewcommand\@makefntext{% + \leftskip=1em\hskip-1.5em% + \makebox[1em][r]{\@thefnmark}\hskip.5em} +\or + \renewcommand\@makefntext{% + \@thefnmark.\hskip.5em} +\or + \renewcommand\@makefntext{% + \textsuperscript{\@thefnmark}\hskip.3em} +\fi} +\define@choicekey{}{fewfootnotes}[\val\nr] + {true,false}[true]{% +\ifcase\nr\relax + \suftesi@fewfootnotestrue +\or + \relax +\fi} +\RequirePackage{caption} +\define@choicekey{}{captionstyle}[\val\nr] + {standard,elements}[standard]{% +\ifcase\nr\relax + \captionsetup{labelsep=period,font=small,singlelinecheck=false} +\or + \captionsetup{labelsep=period,font=small,singlelinecheck=false} + \captionsetup{font+=sf} +\fi +} +\define@choicekey{}{marginpar}[\val\nr] + {true,false}[true]{% +\ifcase\nr\relax + \relax +\or + \renewcommand\marginpar[2][]{} +\fi} +\define@choicekey{}{tocstyle}[\val\nr]{% + standard,dotted,ragged,leftpage}[standard]{% +\ifcase\nr\relax + \def\SUF@titlerule{\titlerule*{}} + \def\SUF@chaptitlerule{\titlerule*{}} +\or +\suftesi@dottedtoctrue + \def\SUF@titlerule{\titlerule*{\footnotesize .\ }} + \def\SUF@chaptitlerule{\titlerule*{}} +\or +\suftesi@raggedtoctrue + \def\SUF@titlerule{\hspace{1em}} + \def\SUF@chaptitlerule{\hspace{1em}} +\or +\suftesi@pagelefttoctrue +\fi} +\define@choicekey{}{defaultfont}[\val\nr]{% + palatino,standard}[palatino]{% +\ifcase\nr\relax +\or + \suftesi@cmfonttrue + \setkeys{suftesi.cls}{greekfont=cbgreek} +\fi} +\define@choicekey{}{greekfont}[\val\nr]{% + artemisia,porson,cbgreek}[artemisia]{% +\ifcase\nr\relax +\def\SUF@greekfamily{artemisiaeuler} +\or +\def\SUF@greekfamily{porson} +\or +\def\SUF@greekfamily{lmr} +\fi} +\define@choicekey{}{parindent}[\val\nr] + {compact,wide}[compact]{% +\ifcase\nr\relax +\setlength\parindent{1em} +\or +\setlength\parindent{1.5em} +\fi} +\define@choicekey{}{partpage}[\val\nr]{true,false}[true]{% +\ifcase\nr\relax + \suftesi@partpagetrue +\or + \relax +\fi} +\define@choicekey{}{crop}[\val\nr] + {true,false}[true]{% +\ifcase\nr\relax +\or + \suftesi@nocroptrue +\fi} +\define@choicekey{}{titlepage}[\val\nr] + {true,false}[true]{% +\ifcase\nr\relax + \@titlepagetrue +\or + \@titlepagetrue +\fi} +\define@choicekey{}{bozza}[\val\nr] + {true,false}[true]{% +\ifcase\nr\relax + \suftesi@bozzatrue +\or +\fi} +\define@choicekey{}{style}[\val\nr] + {roman1,roman2,roman3,roman4,roman5,roman6, + italic1,italic2,italic3,italic4,italic5,italic6, + italic7,italic8,italic9,italic10,italic11,italic12, + smallcaps1,smallcaps2,smallcaps3,smallcaps4,smallcaps5,smallcaps6, + smallcaps7,smallcaps8,smallcaps9,smallcaps10,smallcaps11,smallcaps12, + elements,sufelements} + [roman1]{% +\ifcase\nr\relax + \setkeys{}{chapstyle=left} +\or + \setkeys{}{chapstyle=center} +\or + \setkeys{}{chapstyle=right} +\or + \setkeys{}{chapstyle=parleft} +\or + \setkeys{}{chapstyle=parcenter} +\or + \setkeys{}{chapstyle=parright} +\or + \setkeys{}{chapstyle=left,chapfont=italic} +\or + \setkeys{}{chapstyle=center,chapfont=italic} +\or + \setkeys{}{chapstyle=right,chapfont=italic} +\or + \setkeys{}{chapstyle=parleft,chapfont=italic} +\or + \setkeys{}{chapstyle=parcenter,chapfont=italic} +\or + \setkeys{}{chapstyle=parright,chapfont=italic} +\or + \setkeys{}{chapstyle=left,chapfont=italic,secfont=smallcaps} +\or + \setkeys{}{chapstyle=center,chapfont=italic,secfont=smallcaps} +\or + \setkeys{}{chapstyle=right,chapfont=italic,secfont=smallcaps} +\or + \setkeys{}{chapstyle=parleft,chapfont=italic,secfont=smallcaps} +\or + \setkeys{}{chapstyle=parcenter,chapfont=italic,secfont=smallcaps} +\or + \setkeys{}{chapstyle=parright,chapfont=italic,secfont=smallcaps} +\or + \setkeys{}{chapstyle=left,chapfont=smallcaps} +\or + \setkeys{}{chapstyle=center,chapfont=smallcaps} +\or + \setkeys{}{chapstyle=right,chapfont=smallcaps} +\or + \setkeys{}{chapstyle=parleft,chapfont=smallcaps} +\or + \setkeys{}{chapstyle=parcenter,chapfont=smallcaps} +\or + \setkeys{}{chapstyle=parright,chapfont=smallcaps} +\or + \setkeys{}{chapstyle=left,chapfont=smallcaps,secfont=smallcaps} +\or + \setkeys{}{chapstyle=center,chapfont=smallcaps,secfont=smallcaps} +\or + \setkeys{}{chapstyle=right,chapfont=smallcaps,secfont=smallcaps} +\or + \setkeys{}{chapstyle=parleft,chapfont=smallcaps,secfont=smallcaps} +\or + \setkeys{}{chapstyle=parcenter,chapfont=smallcaps,secfont=smallcaps} +\or + \setkeys{}{chapstyle=parright,chapfont=smallcaps,secfont=smallcaps} +\or + \setkeys{}{ + pagelayout=elements, + headerstyle=elements, + chapstyle=elements, + secfont=smallcaps, + subsecfont=italic, + captionstyle=elements} +\disable@keys{} + {pagelayout,headerstyle,chapstyle,secfont,subsecfont,captionstyle} +\or + \setkeys{}{ + chapstyle=elements, + headerfont=smallcaps, + secfont=smallcaps, + subsecfont=italic} +\disable@keys{} + {headerstyle,chapstyle,secfont,subsecfont} +\fi} +\ExecuteOptionsX<>{ + marginpar=true, + captionstyle=standard, + parindent=compact, + tocstyle=standard, + greekfont=artemisia, + pagelayout=standard, + headerstyle=inner, + liststyle=bulged, + footnotestyle=bulged, + quotesize=footnotesize, + quotestyle=center, + partstyle=left, + chapstyle=left, + secstyle=left, + subsecstyle=left, + subsubsecstyle=left, + partfont=roman, + chapfont=roman, + secfont=italic, + subsecfont=roman, + subsubsecfont=roman, + headerfont=roman, + secnumstyle=arabic, + partnumstyle=Roman, + chapnumstyle=arabic} +\ProcessOptionsX<>\relax \RequirePackage{color} \definecolor{sufred}{rgb}{0.5,0,0} \definecolor{sufgray}{rgb}{0.5,0.5,0.5} -\RequirePackage{ifxetex,ifluatex} -\ifxetex - \relax - \else - \RequirePackage{microtype} -\fi -\RequirePackage{textcase} \RequirePackage{multicol} \RequirePackage{emptypage} -\RequirePackage{mparhack} +\RequirePackage{textcase} +\RequirePackage{ifxetex,ifluatex} \ifxetex \relax \else +\RequirePackage{microtype} \RequirePackage[LGR,T1]{fontenc} \AtBeginDocument{\fontencoding{T1}\selectfont} -\ifsuftesi@defaultfont +\ifsuftesi@cmfont \relax - \else -\RequirePackage[osf,sc]{mathpazo} -\RequirePackage[scaled=0.8]{beramono} - \linespread{1.05} - \renewcommand{\sfdefault}{iwona} - \fi -\ifsuftesi@artemisia -\def\SUF@greekfamily{artemisiaeuler} - \fi -\ifsuftesi@defaultgreek -\def\SUF@greekfamily{cmr} - \fi + \else + \RequirePackage[osf,sc]{mathpazo} + \RequirePackage[scaled=0.8]{beramono} + \renewcommand{\sfdefault}{iwona} +\fi \ifsuftesi@porson \sbox\z@{\fontsize{10}{10}\normalfont A} \sbox\tw@{\font\temp=gporsonrg6a at 10pt \temp A} @@ -427,89 +640,17 @@ \DeclareFontShape{LGR}{porson}{bx}{n} {<-> ssub * porson/m/n}{} \DeclareFontShape{LGR}{porson}{bx}{it}{<-> ssub * porson/m/n}{} \DeclareFontShape{LGR}{porson}{bx}{sl}{<-> ssub * porson/m/n}{} - \def\SUF@greekfamily{porson} \fi \AtBeginDocument{ \DeclareRobustCommand{\greektext}{% \fontencoding{LGR}\fontfamily{\SUF@greekfamily}\selectfont \def\encodingdefault{LGR}}} \fi -\RequirePackage{geometry} -\ifsuftesi@defaultparindent - \relax - \else - \parindent1em -\fi - \geometry{heightrounded} \ifsuftesi@nocrop \relax \else \RequirePackage[a4,cam,center]{crop} \fi -\ifsuftesi@periodical - \geometry{ - textheight= 165mm, - textwidth= 110mm, - paperwidth= 170mm, - paperheight= 240mm, - marginratio= 2:3, - marginparwidth= 75pt, - marginparsep= 10pt} -\else -\ifsuftesi@compact - \geometry{ - textheight= 165mm, - textwidth= 110mm, - paperwidth= 160mm, - paperheight= 240mm, - marginratio= 2:3, - marginparwidth= 65pt, - marginparsep= 10pt} -\else -\ifsuftesi@supercompact - \geometry{ - textheight= 150mm, - textwidth= 100mm, - paperwidth= 140mm, - paperheight= 210mm, - marginratio= 2:3, - marginparwidth= 50pt, - marginparsep= 9pt} -\else -\ifsuftesi@elements - \geometry{% - textwidth= 251pt, - textheight= 502pt, - paperwidth= 374pt, - paperheight= 648pt, - marginparwidth= 60pt, - marginparsep= 18pt, - outer= 90pt, - top= 64pt} - \else -\ifcase\@ptsize\relax -\geometry{% - textwidth= 312pt, - textheight= 624pt}\or -\geometry{% - textwidth= 324pt, - textheight= 648pt}\or -\geometry{% - textwidth= 324pt, - textheight= 648pt} - \fi -\geometry{% - a4paper, - includehead, - heightrounded, - marginparwidth= 82pt, - marginparsep= 12pt, - hmarginratio= 1:2, - vmarginratio= 1:2} - \fi - \fi - \fi -\fi \if@twoside \relax \else @@ -518,27 +659,14 @@ \RequirePackage{titlesec} \newlength{\sectionsep} \setlength{\sectionsep}{\dimexpr(\baselineskip) plus 1pt minus 1pt} -\ifsuftesi@periodical - \DeclareRobustCommand{\SUF@chaptersize}{\large} - \else - \ifsuftesi@compact - \DeclareRobustCommand{\SUF@chaptersize}{\large} - \else - \ifsuftesi@supercompact - \DeclareRobustCommand{\SUF@chaptersize}{\large} - \else - \DeclareRobustCommand{\SUF@chaptersize}{\Large} - \fi - \fi -\fi \ifxetex \DeclareRobustCommand{\SUF@titlesmallcaps}[1]{% \addfontfeature{LetterSpace=6}\scshape\MakeTextLowercase{#1}} \DeclareRobustCommand{\SUF@headingsmallcaps}[1]{% \addfontfeature{LetterSpace=6}\scshape\MakeTextLowercase{#1}} \newcommand{\chapnumfont}[1]{% - \def\SUF@chapnumfont{\fontspec[Numbers=OldStyle]{#1}}} - \chapnumfont{Palatino} + \def\SUF@chapnumfont{#1}} + \chapnumfont{\fontspec[Numbers=OldStyle]{Junicode}} \else \DeclareRobustCommand{\SUF@titlesmallcaps}[1]{% \scshape\MakeTextLowercase{\textls[110]{#1}}}% @@ -548,103 +676,28 @@ \def\SUF@chapnumfont{\fontfamily{#1}}} \chapnumfont{pplj} \fi -\ifsuftesi@romanchap - \def\SUF@thechapter{\Roman{chapter}} - \else - \def\SUF@thechapter{\arabic{chapter}} -\fi -\ifsuftesi@centerpart - \def\SUF@lr@PARTSwitch{\filcenter} - \else - \ifsuftesi@rightpart - \def\SUF@lr@PARTSwitch{\filleft} - \else - \def\SUF@lr@PARTSwitch{\filright} - \fi -\fi -\ifsuftesi@centerchap - \def\SUF@lr@CHAPSwitch{\filcenter} - \else - \ifsuftesi@rightchap - \def\SUF@lr@CHAPSwitch{\filleft} - \else - \def\SUF@lr@CHAPSwitch{\filright} - \fi -\fi -\ifsuftesi@centersec - \def\SUF@lr@SECswitch{\filcenter} - \else - \ifsuftesi@rightsec - \def\SUF@lr@SECswitch{\filleft} - \else - \def\SUF@lr@SECswitch{\filright} - \fi -\fi -\ifsuftesi@centersubsec - \def\SUF@lr@SUBSECswitch{\filcenter} - \else - \ifsuftesi@rightsubsec - \def\SUF@lr@SUBSECswitch{\filleft} - \else - \def\SUF@lr@SUBSECswitch{\filright} - \fi -\fi -\ifsuftesi@centersubsubsec - \def\SUF@lr@SUBSUBSECswitch{\filcenter} - \else - \ifsuftesi@rightsubsubsec - \def\SUF@lr@SUBSUBSECswitch{\filleft} - \else - \def\SUF@lr@SUBSUBSECswitch{\filright} - \fi -\fi -\ifsuftesi@dottedchap - \def\SUF@dotchap{.} - \else - \def\SUF@dotchap{} -\fi -\ifsuftesi@dottedpart - \def\SUF@dotpart{.} - \else - \def\SUF@dotpart{} -\fi -\def\SUF@chapnumpos{-73} -\ifsuftesi@sufelements - \titleformat{\chapter}[block] - {}% +\define@key[SUF]{elements}{chapsize}[90]{% + \def\cmdSUF@elements@chapsize{\fontsize{#1}{#1}\selectfont}} +\define@key[SUF]{elements}{chapposition}[-83]{% + \def\cmdSUF@elements@chapposition{#1}} +\def\SUF@elements@CHAPTER{% + \titleformat{\chapter}[block] + {\Large}% {\begin{picture}(0,0) \setlength{\unitlength}{1pt} \SUF@chapnumfont% - \ifsuftesi@elements - \ifsuftesi@periodical - \fontsize{80}{80}\selectfont% - \def\SUF@chapnumpos{-83} - \else - \ifsuftesi@compact - \fontsize{80}{80}\selectfont% - \def\SUF@chapnumpos{-83} - \else - \ifsuftesi@supercompact - \fontsize{64}{64}\selectfont% - \def\SUF@chapnumpos{-73} - \else - \fontsize{64}{64}\selectfont% - \def\SUF@chapnumpos{-73} - \fi\fi\fi - \else - \fontsize{95}{95}\selectfont% - \def\SUF@chapnumpos{-83} - \fi - \put(0,\SUF@chapnumpos){% - \hskip\dimexpr(\textwidth+\marginparsep)% - \textcolor{sufgray}{\SUF@thechapter}}% + \cmdSUF@elements@chapsize + \put(0,\cmdSUF@elements@chapposition){% + \hskip\dimexpr(\textwidth+0.9\marginparsep)% + \textcolor{sufgray}{\SUF@thechapter}}% \end{picture}}% {0pt} - {\Large\SUF@titlesmallcaps} - [\rule{\textwidth}{.1pt}] - \titlespacing*{\chapter}{0em}{-16pt}{10pt}[0em] + {\SUF@titlesmallcaps} + [\vspace*{-6pt}\rule{\textwidth}{.1pt}] + } +\def\SUF@elements@SECTIONS{ \titleformat{\section}[block] - {\filright} + {\extramarks{}{}\filright} {\textnormal\thesection} {1em} {\SUF@titlesmallcaps} @@ -661,88 +714,8 @@ {1em} {} \titlespacing*{\subsubsection}{0em}{\baselineskip}{\baselineskip}[0em] - \else -\def\SUF@PART@StyleSwitch{% - \ifsuftesi@smallcapspart - \expandafter\SUF@titlesmallcaps - \else - \ifsuftesi@italicpart - \itshape - \else - \fi -\fi} -\def\SUF@CHAP@StyleSwitch{% - \ifsuftesi@smallcapschap - \expandafter\SUF@titlesmallcaps - \else - \ifsuftesi@italicchap - \itshape - \else - \fi -\fi} -\def\SUF@SEC@StyleSwitch{% - \ifsuftesi@smallcapssec - \expandafter\SUF@titlesmallcaps - \else - \ifsuftesi@italicsec - \itshape - \else - \fi -\fi} -\def\SUF@SUBSEC@StyleSwitch{% - \ifsuftesi@smallcapssubsec - \expandafter - \SUF@titlesmallcaps - \else - \ifsuftesi@italicsubsec - \itshape - \else - \fi -\fi } -\def\SUF@SUBSUBSEC@StyleSwitch{% - \ifsuftesi@smallcapssubsubsec - \expandafter - \SUF@titlesmallcaps - \else - \ifsuftesi@italicsubsubsec - \itshape - \else - \fi -\fi} -\ifsuftesi@article -\def\chapter#1{\ClassError{suftesi} - {\noexpand\chapter level is not defined using 'article' option} - {\noexpand\chapter level is not defined using 'article' option}} - \setcounter{tocdepth}{3} - \setcounter{secnumdepth}{3} - \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} -\titleclass{\part}{straight} -\titlespacing*{\part}{0ex}{2\sectionsep}{2\sectionsep}[0ex] -\else -\fi -\ifsuftesi@numparpart -\titleformat{\part}[display] - {\SUF@chaptersize\SUF@lr@PARTSwitch} - {\SUF@PART@StyleSwitch\partname\hskip1em\thepart\SUF@dotpart} - {2ex} - {\SUF@PART@StyleSwitch} -\else -\titleformat{\part}[hang] - {\SUF@chaptersize\SUF@lr@PARTSwitch} - {\SUF@PART@StyleSwitch\partname\hskip1em\thepart\SUF@dotpart} - {3em} - {\SUF@PART@StyleSwitch} -\fi +\def\SUF@default@CHAPTER{ \ifsuftesi@numparchap \titleformat{\chapter}[display] {\SUF@chaptersize\SUF@lr@CHAPSwitch} @@ -760,50 +733,33 @@ \def\SUF@ADJnumparchap{-2.5\baselineskip} \else \def\SUF@ADJnumparchap{0pt} -\fi -\ifsuftesi@periodical - \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex} - \titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex} - \else - \ifsuftesi@compact - \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex} - \titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex} - \else - \ifsuftesi@supercompact - \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex} - \titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex} - \else - \titlespacing*{\chapter}{0em}{% - \dimexpr(6ex+\SUF@ADJnumparchap)}{18ex} - \titlespacing*{name=\chapter,numberless}{0em}{6ex}{18ex} - \fi - \fi -\fi +\fi} +\def\SUF@default@SECTIONS{ \ifsuftesi@numparsec \titleformat{\section}[display] - {\SUF@lr@SECswitch} - {\thesection} + {\SUF@lr@SECSwitch} + {\SUF@thesection\SUF@dotsec} {0ex} {\SUF@SEC@StyleSwitch} \titlespacing*{\section}{0em}{\sectionsep}{\sectionsep}[0em] \else \titleformat{\section}[hang] - {\SUF@lr@SECswitch} - {\thesection} + {\SUF@lr@SECSwitch} + {\SUF@thesection\SUF@dotsec} {1em} {\SUF@SEC@StyleSwitch} \titlespacing*{\section}{0ex}{\sectionsep}{\sectionsep}[0ex] \fi \ifsuftesi@numparsubsec \titleformat{\subsection}[display] - {\SUF@lr@SUBSECswitch} + {\SUF@lr@SUBSECSwitch} {\textnormal\thesubsection} {0ex} {\SUF@SUBSEC@StyleSwitch} \titlespacing*{\subsection}{0em}{\sectionsep}{\sectionsep}[0em] \else \titleformat{\subsection}[hang] - {\SUF@lr@SUBSECswitch} + {\SUF@lr@SUBSECSwitch} {\textnormal\thesubsection} {1em} {\SUF@SUBSEC@StyleSwitch} @@ -811,20 +767,121 @@ \fi \ifsuftesi@numparsubsubsec \titleformat{\subsubsection}[display] - {\SUF@lr@SUBSUBSECswitch} + {\SUF@lr@SUBSUBSECSwitch} {\textnormal\thesubsubsection} {0ex} {\SUF@SUBSUBSEC@StyleSwitch} \titlespacing*{\subsubsection}{0em}{\sectionsep}{\sectionsep}[0em] \else \titleformat{\subsubsection}[hang] - {\SUF@lr@SUBSUBSECswitch} + {\SUF@lr@SUBSUBSECSwitch} {\textnormal\thesubsubsection} {1em} {\SUF@SUBSUBSEC@StyleSwitch} \titlespacing*{\subsubsection}{\parindent}{\sectionsep}{\sectionsep}[0ex] \fi +} +\ifsuftesi@elementschap +\RequirePackage{extramarks} + \SUF@elements@CHAPTER + \SUF@elements@SECTIONS +\ifsuftesi@periodical + \titlespacing*{\chapter}{0em}{-\baselineskip}{10pt}[0pt] + \setkeys[SUF]{elements}{chapsize=80,chapposition=-83} +\else +\ifsuftesi@compact + \titlespacing*{\chapter}{0em}{-1\baselineskip}{10pt}[0pt] + \setkeys[SUF]{elements}{chapsize=75,chapposition=-83} +\else +\ifsuftesi@supercompact + \titlespacing*{\chapter}{0em}{-1\baselineskip}{10pt}[0pt] + \setkeys[SUF]{elements}{chapsize=70,chapposition=-73} +\else +\ifsuftesi@elementspagelayout + \titlespacing*{\chapter}{0em}{-\baselineskip}{10pt}[0pt] + \setkeys[SUF]{elements}{chapsize=60,chapposition=-73} +\else + \titlespacing*{\chapter}{0em}{-\baselineskip}{10pt}[0pt] + \setkeys[SUF]{elements}{chapsize=90,chapposition=-83} + \fi + \fi + \fi +\fi +\else + \SUF@default@CHAPTER + \SUF@default@SECTIONS +\ifsuftesi@periodical + \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex} + \titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex} + \else + \ifsuftesi@compact + \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex} + \titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex} + \else + \ifsuftesi@supercompact + \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex} + \titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex} + \else + \titlespacing*{\chapter}{0em}{% + \dimexpr(6ex+\SUF@ADJnumparchap)}{18ex} + \titlespacing*{name=\chapter,numberless}{0em}{6ex}{18ex} + \fi + \fi +\fi \fi +\ifsuftesi@article +\def\chapter#1{\ClassError{suftesi} + {\noexpand\chapter level is not defined + using 'documentstructure=article'} + {\noexpand\chapter level is not defined + using 'documentstructure=article'}} + \setcounter{tocdepth}{3} + \setcounter{secnumdepth}{3} + \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} +\ifsuftesi@partpage + \relax + \else + \titleclass{\part}{straight} + \titlespacing*{\part}{0ex}{2\sectionsep}{2\sectionsep}[0ex] +\fi +\ifsuftesi@numparpart +\titleformat{\part}[display] + {\SUF@chaptersize\SUF@lr@PARTSwitch} + {\SUF@PART@StyleSwitch\partname\hskip.5em\SUF@thepart\SUF@dotpart} + {2ex} + {\SUF@PART@StyleSwitch} +\else +\titleformat{\part}[hang] + {\SUF@chaptersize\SUF@lr@PARTSwitch} + {\SUF@PART@StyleSwitch\partname\hskip.5em\SUF@thepart\SUF@dotpart} + {1em} + {\SUF@PART@StyleSwitch} +\fi +\else +\ifsuftesi@numparpart +\titleformat{\part}[display] + {\SUF@chaptersize\SUF@lr@PARTSwitch} + {\SUF@PART@StyleSwitch\partname\hskip.5em\SUF@thepart\SUF@dotpart} + {2ex} + {\SUF@PART@StyleSwitch} +\else +\titleformat{\part}[hang] + {\SUF@chaptersize\SUF@lr@PARTSwitch} + {\SUF@PART@StyleSwitch\partname\hskip.5em\SUF@thepart\SUF@dotpart} + {1em} + {\SUF@PART@StyleSwitch} +\fi +\fi + \titleformat{\paragraph}[runin] {} {\theparagraph} @@ -1025,33 +1082,47 @@ \vskip 1.5em} \fi \AtBeginDocument{% -\@ifpackageloaded{frontespizio}{% - \ifsuftesi@periodical - \Margini {5.5cm}{7cm}{4.5cm}{1cm} +\@ifpackagewith{frontespizio}{suftesi} + {\ifsuftesi@periodical + \Margini {5.5cm}{7cm}{4.5cm}{0cm} \else \ifsuftesi@compact - \Margini{1cm}{7cm}{6cm}{1cm}% - \Rientro{1cm}% + \Margini {4.5cm}{7cm}{4.5cm}{0cm} \else \ifsuftesi@supercompact - \Margini{1cm}{10cm}{8cm}{1cm}% - \Rientro{1cm}% + \Margini {4.5cm}{10cm}{6cm}{1cm} \else \fi \fi -\fi - }% -{\relax}} +\fi} +{\@ifpackageloaded{frontespizio} + {\ifsuftesi@periodical + \Margini {1cm}{7cm}{5cm}{1cm} + \else + \ifsuftesi@compact + \Margini {1cm}{7cm}{6cm}{1cm} + \else + \ifsuftesi@supercompact + \Margini {1cm}{10cm}{8cm}{1cm} + \else + \fi + \fi +\fi} +{\relax}}} \renewenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi + \ifsuftesi@article + \twocolumn[\section*{\indexname}]% + \else \twocolumn[\@makeschapterhead{\indexname}]% + \fi \@mkboth{\indexname}{\indexname}% \thispagestyle{plain}% - \raggedright\small% + \raggedright% \parindent\z@ \parskip\z@ \@plus .3\p@\relax \columnseprule \z@ @@ -1107,7 +1178,7 @@ \renewcommand\appendix{\par \setcounter{section}{0}% \setcounter{subsection}{0}% - \gdef\thesection{\@Alph\c@section}} + \gdef\SUF@thesection{\@Alph\c@section}} \else \renewcommand\appendix{\par \setcounter{chapter}{0}% @@ -1121,7 +1192,7 @@ \renewcommand{\headrulewidth}{0pt} \renewcommand{\footnoterule}{} \def\SUF@versionstring{\texttt{Version of \today}} -\ifsuftesi@elements% +\ifsuftesi@elementsheader% \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}} \renewcommand{\sectionmark}[1]{\markright{#1}} \fancypagestyle{elements}{% @@ -1145,27 +1216,17 @@ \renewcommand{\chaptermark}[1]{% \markboth{\chaptertitlename\ \SUF@thechapter}{#1}} \ifsuftesi@article - \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} + \renewcommand{\sectionmark}[1]{\markright{\SUF@thesection.\ #1}} \else \renewcommand{\sectionmark}[1]{} \fi \fi -\fancypagestyle{plain}{\pagestyle{sufplain}} +\fancypagestyle{plain}{\fancyhf{}} \fancypagestyle{sufplain}{% \fancyhf{}% \fancyfoot[RE,LO]{% \ifsuftesi@bozza\footnotesize\SUF@versionstring\else\fi} \fancyfoot[C]{\footnotesize\SUF@thepage}} -\def\SUF@LR@MarkSwitch{% - \ifsuftesi@article - \ifsuftesi@authortitle - \SUF@leftmark - \else - \SUF@rightmark - \fi - \else - \SUF@leftmark - \fi} \fancypagestyle{centerheader}{% \fancyhf{}% \fancyfoot[RE,LO]{% @@ -1184,119 +1245,36 @@ \fancyhead[RE]{\footnotesize\xheadbreakfalse% \SUF@LR@MarkSwitch} }% -\ifsuftesi@italicRhead - \def\SUF@Rheadstyle{\itshape} - \else - \ifsuftesi@smallcapsRhead - \def\SUF@Rheadstyle{\SUF@headingsmallcaps} - \else - \def\SUF@Rheadstyle{} - \fi -\fi -\ifsuftesi@italicLhead - \def\SUF@Lheadstyle{\itshape} - \else - \ifsuftesi@smallcapsLhead - \def\SUF@Lheadstyle{\SUF@headingsmallcaps} - \else - \def\SUF@Lheadstyle{} - \fi +\ifsuftesi@article +\ifsuftesi@authortitle +\def\SUF@LR@MarkSwitch{\SUF@leftmark} +\else +\def\SUF@LR@MarkSwitch{\SUF@rightmark} \fi - \ifsuftesi@authortitle - \def\SUF@rightmark{\SUF@Rheadstyle{\@headtitle}} - \def\SUF@leftmark{\SUF@Lheadstyle{\@author}} - \else - \def\SUF@rightmark{\SUF@Rheadstyle{\rightmark}} - \def\SUF@leftmark{\SUF@Lheadstyle{\SUF@leftrightmark}} - \fi -\ifsuftesi@smallcapsheader - \def\SUF@thepage{\SUF@headingsmallcaps{\thepage}} - \else - \def\SUF@thepage{\thepage} +\else + \def\SUF@LR@MarkSwitch{\SUF@leftmark} \fi \def\SUF@leftrightmark{% \if@mainmatter\leftmark\else\rightmark\fi} \pagestyle{sufdefault} \ifsuftesi@centerheader\pagestyle{centerheader}\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} -\else - \captionsetup{labelsep=period,font=small,singlelinecheck=false} -\fi -\RequirePackage{epigraph} -\ifsuftesi@elements - \relax - \else - \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 -\fi -\RequirePackage[inline]{enumitem} - \setlist{labelsep=0.5\parindent,noitemsep,font=\normalfont} - \setdescription{font=\normalfont\itshape,noitemsep} -\ifsuftesi@alignlist - \setenumerate[1]{leftmargin=1\parindent,label=\arabic*.} - \setenumerate[2]{leftmargin= 1.5\parindent,label=\alph*.} - \setenumerate[3]{leftmargin= 1.5\parindent,label=\roman*.} - \setitemize[1]{leftmargin=1\parindent} - \setitemize[2]{leftmargin=1.5\parindent} - \setitemize[3]{leftmargin=1.5\parindent} -\else -\ifsuftesi@indentlist - \setenumerate[1]{leftmargin=2\parindent,label=\arabic*.} - \setenumerate[2]{leftmargin= 2.5\parindent,label=\alph*.} - \setenumerate[3]{leftmargin= 2.5\parindent,label=\roman*.} - \setitemize[1]{leftmargin=2\parindent} - \setitemize[2]{leftmargin=2.5\parindent} - \setitemize[3]{leftmargin=2.5\parindent} - \else - \setenumerate[1]{leftmargin=0pt,label=\arabic*.} - \setenumerate[2]{leftmargin= 1.3\parindent,label=\alph*.} - \setenumerate[3]{leftmargin= 1.3\parindent,label=\roman*.} - \setitemize[1]{leftmargin=0pt} - \setitemize[2]{leftmargin=1.3\parindent} - \setitemize[3]{leftmargin=1.3\parindent} - \fi -\fi -\renewcommand\labelitemii{\normalfont \textendash} + \ifsuftesi@elementsheader\pagestyle{elements}\else\fi \renewenvironment{quotation} {\list{}{\listparindent\parindent% \itemindent \listparindent \leftmargin \parindent - \ifsuftesi@ralignquotation - \else - \rightmargin \parindent - \fi - \parsep \z@ \@plus\p@}% + \SUF@quote@style + \parsep \z@ \@plus\p@}% \item\relax% - \ifsuftesi@smallquotation - \small - \else - \footnotesize - \fi\noindent\ignorespaces} + \SUF@quotation@size% + \noindent\ignorespaces} {\endlist} \renewenvironment{quote} {\list{}{\leftmargin \parindent - \ifsuftesi@ralignquotation\ - \else - \rightmargin \parindent - \fi}% + \SUF@quote@style}% \item\relax% - \ifsuftesi@smallquotation - \small - \else - \footnotesize - \fi}%\ignorespaces? + \SUF@quotation@size}%\ignorespaces? {\endlist} \renewenvironment{verse} {\let\\\@centercr @@ -1306,24 +1284,31 @@ \rightmargin \leftmargin \advance\leftmargin 1.5em}% \item\relax - \ifsuftesi@smallquotation - \small - \else - \footnotesize - \fi} + \SUF@quotation@size} {\endlist} -\ifsuftesi@standardfootnote - \relax - \else - \ifsuftesi@dottedfootnote - \renewcommand\@makefntext{\@thefnmark.\hskip.5em} - \else - \renewcommand\@makefntext{% - \hskip-2.5em\makebox[2em][r]{\@thefnmark}\hskip.5em} - \fi -\fi -\def\SUF@mpsetup{%thanks to Lorenzo Pantieri and Enrico Gregorio - \ifsuftesi@elements\relax +\let\oldfootnote\footnote +\ifsuftesi@fewfootnotes +\def\@fnsymbol#1{\ensuremath{\ifcase#1 + \or * \or ** \or *** \ClassError{suftesi} + {Too many footnotes\MessageBreak + Use class option 'fewfootnote=false'} + {Too many footnotes\MessageBreak + Use class option 'fewfootnote=false'} + \else\@ctrerr\fi}} +\renewcommand{\footnote}[1]{% + \begingroup + \@addtoreset{footnote}{page} + \renewcommand\thefootnote{\fnsymbol{footnote}}\oldfootnote{#1} + \endgroup} +\else\fi +\newcommand{\xfootnote}[2]{% + \begingroup + \addtocounter{footnote}{-1} + \@addtoreset{footnote}{page} + \renewcommand\thefootnote{\ensuremath{#1}}\oldfootnote{#2} + \endgroup} +\def\SUF@mpsetup{% + \ifsuftesi@elementsheader\relax \else\itshape\fi \footnotesize% \parindent=0pt \lineskip=0pt \lineskiplimit=0pt % @@ -1334,10 +1319,6 @@ \renewcommand{\marginpar}[1]{\oldmarginpar% [\SUF@mpsetup\raggedleft\hspace{0pt}{#1}]% {\SUF@mpsetup\raggedright\hspace{0pt}{#1}}} -\ifsuftesi@nomarginpar - \renewcommand\marginpar[2][]{} - \else - \fi \if@titlepage \newenvironment{abstract}{% \titlepage @@ -1362,16 +1343,6 @@ {\if@twocolumn\else\endquotation\fi} \fi \newcommand\abstractname{Abstract} -\edef\SUF@engine{% - \ifxetex - \noexpand\XeLaTeX - \else - \ifluatex - Lua\noexpand\LaTeX - \else - \noexpand\LaTeX - \fi - \fi} \newcommand{\colophon}[3][]{% \thispagestyle{empty} \null @@ -1379,10 +1350,10 @@ \def\next{#2} \ifx\next\@empty\else \noindent Copyright \copyright{} \the\year~#2\\[1ex] - Tutti i diritti riservato + Tutti i diritti riservati \fi \vfill - {\small\noindent Questo lavoro รจ stato composto con \SUF@engine{}% + {\small\noindent Questo lavoro \`e stato composto con \LaTeX{}% \def\next{#1} \ifx\next\@empty\else su #1 \fi usando la classe \textsf{suftesi} di @@ -1409,26 +1380,8 @@ \centering\small #1 \end{minipage} \end{center} - \vspace*{\stretch{6}} - } + \vspace*{\stretch{6}}} \RequirePackage{titletoc} -\ifsuftesi@elements - \def\SUF@tochapsize{} - \else - \def\SUF@tochapsize{\large} -\fi -\ifsuftesi@dottedtoc - \def\SUF@titlerule{\titlerule*{\footnotesize .\ }} - \def\SUF@chaptitlerule{\titlerule*{}} - \else - \ifsuftesi@raggedtoc - \def\SUF@titlerule{\hspace{1.5em}} - \def\SUF@chaptitlerule{\hspace{1.5em}} - \else - \def\SUF@titlerule{\titlerule*{}} - \def\SUF@chaptitlerule{\titlerule*{}} - \fi -\fi \newlength\SUF@label@chapter \setlength\SUF@label@chapter{.5em} \newcommand*{\toclabelwidth}[1]{\setlength\SUF@label@chapter{#1}} @@ -1456,18 +1409,18 @@ \setlength\SUF@label@subparagraph {\dimexpr(\SUF@label@paragraph+.5em)} \setlength\SUF@label@figure - {\SUF@label@chapter} + {\SUF@label@section} \setlength\SUF@label@table - {\SUF@label@chapter} + {\SUF@label@section} } \titlecontents{part} [0em] - {\addvspace{3ex}\SUF@tocchapsize\partname~} + {\addvspace{3ex}\partname\hspace*{.5em}} {\makebox[\SUF@label@part][l]{\thecontentslabel}\hspace*{1em}} {} {} [\addvspace{1ex}] -\ifsuftesi@tocpageleft +\ifsuftesi@pagelefttoc \contentsmargin{0pt} \AtBeginDocument{ \newlength\SUF@tochang@chap @@ -1515,18 +1468,21 @@ \setlength\SUF@addto@tochang@subpar {\dimexpr(\SUF@addto@tochang@par+\SUF@label@subparagraph+.5em)} \setlength\SUF@addto@tochang@fig - {\SUF@addto@tochang@chap} + {\dimexpr(\SUF@addto@tochang@chap-\SUF@label@section+\SUF@label@chapter)} \setlength\SUF@addto@tochang@tab - {\SUF@addto@tochang@chap} + {\dimexpr(\SUF@addto@tochang@chap-\SUF@label@section+\SUF@label@chapter)} } \titlecontents{chapter} [\SUF@tochang@chap] {\addvspace{2ex}} {\hskip-\SUF@tochang@chap% - \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@chap% - \makebox[\SUF@label@chapter][l]{\thecontentslabel}\hspace*{1em}} + \makebox[1em][l]{\thecontentspage}% + \hskip\SUF@addto@tochang@chap% + \makebox[\SUF@label@chapter][l]{\thecontentslabel}% + \hspace*{1em}} {\hskip-\SUF@tochang@chap% - \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@chap} + \makebox[1em][l]{\thecontentspage}% + \hskip\SUF@addto@tochang@chap} {} [\addvspace{1ex}] \titlecontents{section} @@ -1584,7 +1540,7 @@ {} {\hskip-\SUF@tochang@fig% \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@fig% - \makebox[\SUF@label@figure][l]{\thecontentslabel}\hspace*{1em}} + \makebox[\SUF@label@table][l]{\thecontentslabel}\hspace*{1em}} {} {} \titlecontents{table} @@ -1618,16 +1574,17 @@ \setlength\SUF@tocindent@subpar {\dimexpr(\SUF@tocindent@par+\SUF@label@subparagraph+1em)} \setlength\SUF@tocindent@fig - {\SUF@tocindent@chap} + {\dimexpr(\SUF@tocindent@chap+\SUF@label@section-\SUF@label@chapter)} \setlength\SUF@tocindent@tab - {\SUF@tocindent@chap} + {\dimexpr(\SUF@tocindent@chap+\SUF@label@section-\SUF@label@chapter)} } \titlecontents{chapter} [\SUF@tocindent@chap] {\addvspace{2ex}} {\hskip-\SUF@tocindent@chap% - \makebox[\SUF@label@chapter][l]{\thecontentslabel}\hspace*{1em}\SUF@tochapsize} - {\hskip-\SUF@tocindent@chap\SUF@tochapsize} + \makebox[\SUF@label@chapter][l]{\thecontentslabel}% + \hspace*{1em}} + {\hskip-\SUF@tocindent@chap} {\SUF@chaptitlerule\contentspage} [\addvspace{1ex}] \titlecontents{section} @@ -1674,38 +1631,38 @@ \titlecontents{figure} [\SUF@tocindent@fig] {} - {\hskip-\dimexpr(\SUF@label@figure+1em)% - \makebox[\SUF@label@figure][l]{\thecontentslabel}} + {\hskip-\SUF@tocindent@fig% + \makebox[\SUF@label@figure][l]{\thecontentslabel}\hspace*{1em}} {} {\SUF@titlerule\contentspage} \titlecontents{table} [\SUF@tocindent@tab] {} - {\hskip-\dimexpr(\SUF@label@table+1em)% - \makebox[\SUF@label@table][l]{\thecontentslabel}} + {\hskip-\SUF@tocindent@tab% + \makebox[\SUF@label@table][l]{\thecontentslabel}\hspace*{1em}} {} {\SUF@titlerule\contentspage} \fi \ifsuftesi@article \renewcommand\tableofcontents{% -\thispagestyle{empty} - \section*{\contentsname - \@mkboth{\contentsname}{\contentsname}}% + \vspace{2ex}% + \section*{\contentsname% + \@mkboth{\contentsname}{\contentsname}}% + \thispagestyle{empty} \@starttoc{toc}% \vspace{2ex}% } \renewcommand\listoffigures{% - \section*{\listfigurename}% - \@mkboth{\listfigurename}% - {\listfigurename}% + \section*{\listfigurename% + \@mkboth{\listfigurename}{\listfigurename}}% + \thispagestyle{empty} \@starttoc{lof}% \vspace{2ex}% } \renewcommand\listoftables{% - \section*{\listtablename}% - \@mkboth{% - \listtablename}% - {\listtablename}% + \section*{\listtablename% + \@mkboth{\listtablename}{\listtablename}}% + \thispagestyle{empty} \@starttoc{lot}% \vspace{2ex}% } @@ -1716,10 +1673,11 @@ \else \@restonecolfalse \fi - \chapter*{\contentsname + \chapter*{\contentsname% \@mkboth{% \contentsname} {\contentsname}}% + \thispagestyle{empty} \@starttoc{toc}% \if@restonecol\twocolumn\fi } @@ -1729,9 +1687,10 @@ \else \@restonecolfalse \fi - \chapter*{\listfigurename}% + \chapter*{\listfigurename% \@mkboth{\listfigurename}% - {\listfigurename}% + {\listfigurename}}% + \thispagestyle{empty} \@starttoc{lof}% \if@restonecol\twocolumn\fi } @@ -1741,10 +1700,11 @@ \else \@restonecolfalse \fi - \chapter*{\listtablename}% + \chapter*{\listtablename% \@mkboth{% \listtablename}% - {\listtablename}% + {\listtablename}}% + \thispagestyle{empty} \@starttoc{lot}% \if@restonecol\twocolumn\fi } |