%%
%% This is file `suftesi.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% suftesi.dtx  (with options: `class')
%% 
%%  Copyright 2009-2012 by Ivan Valbusa
%% 
%%  This program is provided under the terms of the
%%  LaTeX Project Public License distributed from CTAN
%%  archives in directory macros/latex/base/lppl.txt.
%% 
%%  Author: Ivan Valbusa
%%          ivan dot valbusa at univr dot it
%% 
%%  This work has the LPPL maintenance status "author-maintained".
%% 
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesClass{suftesi}
    [2012/08/31 v0.9a A class for typesetting theses, books and articles]
\newif\ifsuftesi@artemisia
\newif\ifsuftesi@porson
\newif\ifsuftesi@defaultgreek
\newif\ifsuftesi@defaultfont
\newif\ifsuftesi@centerheader
\newif\ifsuftesi@sufplain
\newif\ifsuftesi@bozza
\newif\ifsuftesi@article
\newif\ifsuftesi@authortitle
\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@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}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ExecuteOptions{artemisia,rmstyle1}
\ProcessOptions
\relax
\LoadClass{book}
\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}
\ifxetex
   \relax
      \else
\RequirePackage[LGR,T1]{fontenc}
\AtBeginDocument{\fontencoding{T1}\selectfont}
\ifsuftesi@defaultfont
  \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
\ifsuftesi@porson
\sbox\z@{\fontsize{10}{10}\normalfont A}
\sbox\tw@{\font\temp=gporsonrg6a at 10pt \temp A}
\dimen@=
\dimexpr(0.001\dimexpr\numexpr(\dimexpr(1000\ht\z@)/\ht\tw@)\p@)
\edef\art@scale{\strip@pt\dimen@}
\DeclareFontFamily{LGR}{porson}{}
\DeclareFontShape{LGR}{porson}{m}{n}  {<-> s * [\art@scale] gporsonrg6a}{}
\DeclareFontShape{LGR}{porson}{m}{it} {<-> ssub * porson/m/n}{}
\DeclareFontShape{LGR}{porson}{b}{n}  {<-> ssub * porson/m/n}{}
\DeclareFontShape{LGR}{porson}{b}{it} {<-> ssub * porson/m/n}{}
\DeclareFontShape{LGR}{porson}{m}{sl} {<-> ssub * porson/m/n}{}
\DeclareFontShape{LGR}{porson}{b}{sl} {<-> ssub * porson/m/n}{}
\DeclareFontShape{LGR}{porson}{m}{sc} {<-> ssub * porson/m/n}{}
\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
   \geometry{hmarginratio=1:1}
\fi
\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}
\else
  \DeclareRobustCommand{\SUF@titlesmallcaps}[1]{%
    \scshape\MakeTextLowercase{\textls[110]{#1}}}%
  \DeclareRobustCommand{\SUF@headingsmallcaps}[1]{%
    \scshape\MakeTextLowercase{\textls[110]{#1}}}%
  \newcommand{\chapnumfont}[1]{%
    \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]
     {}%
     {\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}}%
   \end{picture}}%
  {0pt}
  {\Large\SUF@titlesmallcaps}
  [\rule{\textwidth}{.1pt}]
  \titlespacing*{\chapter}{0em}{-16pt}{10pt}[0em]
\titleformat{\section}[block]
  {\filright}
  {\textnormal\thesection}
  {1em}
  {\SUF@titlesmallcaps}
\titlespacing*{\section}{0em}{1em}{1em}[0em]
\titleformat{\subsection}[block]
  {\filright\normalsize\itshape}
  {\textnormal\thesubsection}
  {1em}
  {}
  \titlespacing*{\subsection}{0em}{\baselineskip}{\baselineskip}[0em]
\titleformat{\subsubsection}[block]
  {\filright\normalsize}
  {\textnormal\thesubsubsection}
  {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
\ifsuftesi@numparchap
  \titleformat{\chapter}[display]
    {\SUF@chaptersize\SUF@lr@CHAPSwitch}
    {\SUF@thechapter\SUF@dotchap}
    {2ex}
    {\SUF@CHAP@StyleSwitch}
  \else
  \titleformat{\chapter}[hang]
    {\SUF@chaptersize\SUF@lr@CHAPSwitch}
    {\SUF@thechapter\SUF@dotchap}
    {3em}
    {\SUF@CHAP@StyleSwitch}
  \fi
\ifsuftesi@numparchap
  \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
\ifsuftesi@numparsec
\titleformat{\section}[display]
  {\SUF@lr@SECswitch}
  {\thesection}
  {0ex}
  {\SUF@SEC@StyleSwitch}
\titlespacing*{\section}{0em}{\sectionsep}{\sectionsep}[0em]
\else
\titleformat{\section}[hang]
  {\SUF@lr@SECswitch}
  {\thesection}
  {1em}
  {\SUF@SEC@StyleSwitch}
\titlespacing*{\section}{0ex}{\sectionsep}{\sectionsep}[0ex]
\fi
\ifsuftesi@numparsubsec
\titleformat{\subsection}[display]
  {\SUF@lr@SUBSECswitch}
  {\textnormal\thesubsection}
  {0ex}
  {\SUF@SUBSEC@StyleSwitch}
\titlespacing*{\subsection}{0em}{\sectionsep}{\sectionsep}[0em]
\else
\titleformat{\subsection}[hang]
  {\SUF@lr@SUBSECswitch}
  {\textnormal\thesubsection}
  {1em}
  {\SUF@SUBSEC@StyleSwitch}
\titlespacing*{\subsection}{\parindent}{\sectionsep}{\sectionsep}[0ex]
\fi
\ifsuftesi@numparsubsubsec
\titleformat{\subsubsection}[display]
  {\SUF@lr@SUBSUBSECswitch}
  {\textnormal\thesubsubsection}
  {0ex}
  {\SUF@SUBSUBSEC@StyleSwitch}
\titlespacing*{\subsubsection}{0em}{\sectionsep}{\sectionsep}[0em]
\else
\titleformat{\subsubsection}[hang]
  {\SUF@lr@SUBSUBSECswitch}
  {\textnormal\thesubsubsection}
  {1em}
  {\SUF@SUBSUBSEC@StyleSwitch}
\titlespacing*{\subsubsection}{\parindent}{\sectionsep}{\sectionsep}[0ex]
  \fi
\fi
\titleformat{\paragraph}[runin]
  {}
  {\theparagraph}
  {.5em}
  {\itshape}
  [{.}\hspace*{1em}]
\titlespacing*{\paragraph}{\parindent}{.5\sectionsep}{.5\sectionsep}
\titleformat{\subparagraph}[runin]
  {}
  {\thesubparagraph}
  {.5em}
  {}
  [{.}\hspace*{1em}]
\titlespacing*{\subparagraph}{\parindent}{.5\sectionsep}{.5\sectionsep}
\ifsuftesi@article
\AtBeginDocument{%
\@ifpackageloaded{biblatex}{%
  \defbibheading{bibliography}[\refname]{%
    \section*{#1}%
    \markboth{#1}{#1}}
  \defbibheading{shorthands}[\losname]{%
    \section*{#1}%
    \markboth{#1}{#1}}
  \defbibheading{bibintoc}[\refname]{%
    \section*{#1}%
    \addcontentsline{toc}{section}{#1}%
    \markboth{#1}{#1}}
  \defbibheading{losintoc}[\losname]{%
    \section*{#1}%
    \addcontentsline{toc}{section}{#1}%
    \markboth{#1}{#1}}
  \defbibheading{bibnumbered}[\refname]{%
    \section{#1}%
    \if@twoside\markright{#1}\fi}
  \defbibheading{losnumbered}[\losname]{%
    \section{#1}%
    \if@twoside\markright{#1}\fi}
  \defbibheading{subbibliography}[\refname]{%
    \subsection*{#1}}
  \defbibheading{subbibintoc}[\refname]{%
    \subsection*{#1}%
    \addcontentsline{toc}{subsection}{#1}}
  \defbibheading{subbibnumbered}[\refname]{%
    \subsection{#1}}}%
    {\relax}%
}%
\else
\AtBeginDocument{%
\@ifpackageloaded{biblatex}{%
  \defbibheading{bibliography}[\bibname]{%
    \chapter*{#1}%
    \markboth{#1}{#1}}
  \defbibheading{shorthands}[\losname]{%
    \chapter*{#1}%
    \markboth{#1}{#1}}
  \defbibheading{bibintoc}[\bibname]{%
    \chapter*{#1}%
    \addcontentsline{toc}{chapter}{#1}%
    \markboth{#1}{#1}}
  \defbibheading{losintoc}[\losname]{%
    \chapter*{#1}%
    \addcontentsline{toc}{chapter}{#1}%
    \markboth{#1}{#1}}
  \defbibheading{bibnumbered}[\bibname]{%
    \chapter{#1}%
    \if@twoside\markright{#1}\fi}
  \defbibheading{losnumbered}[\losname]{%
    \chapter{#1}%
    \if@twoside\markright{#1}\fi}
  \defbibheading{subbibliography}[\refname]{%
    \section*{#1}%
    \if@twoside\markright{#1}\fi}
  \defbibheading{subbibintoc}[\refname]{%
    \section*{#1}%
    \addcontentsline{toc}{section}{#1}%
    \if@twoside\markright{#1}\fi}
  \defbibheading{subbibnumbered}[\refname]{%
    \section{#1}}}
    {\relax}%
}%
\fi
\renewcommand*{\title}[2][]{\gdef\@headtitle{#1}\gdef\@title{#2}}
    \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}}
\let\standardtitle\maketitle
\if@titlepage% titlepage
  \renewcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
  \null\vfil
  \vskip 60\p@
  \begin{center}%
    {\SUF@chaptersize\color{sufred}\sffamily%
    \ifsuftesi@smallcapschap%
     \SUF@titlesmallcaps{\@title}
      \else
      \ifsuftesi@article
       \ifsuftesi@smallcapssec
        \SUF@titlesmallcaps{\@title}
         \else
          \@title
        \fi
       \else
      \@title
     \fi
    \fi\par}%
    \vskip 3em%
    {\small\lineskip .75em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
      \vskip 1.5em%
    {\small\@date\par}%
  \end{center}\par
  \@thanks
  \vfil\null
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
     \global\let\@date\@empty
  \global\let\date\relax
  \global\let\and\relax
}
\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}
     \def\@maketitle{%
   \newpage
   \null
   \vskip 2em%
   \begin{center}%
   \let \footnote \thanks
     {\SUF@chaptersize\color{sufred}\sffamily%
    \ifsuftesi@smallcapschap%
     \SUF@titlesmallcaps{\@title}
      \else
      \ifsuftesi@article
       \ifsuftesi@smallcapssec
        \SUF@titlesmallcaps{\@title}
         \else
          \@title
        \fi
       \else
      \@title
     \fi
  \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}
\fi
\AtBeginDocument{%
\@ifpackageloaded{frontespizio}{%
      \ifsuftesi@periodical
          \Margini {5.5cm}{7cm}{4.5cm}{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}
               {\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \twocolumn[\@makeschapterhead{\indexname}]%
                \@mkboth{\indexname}{\indexname}%
                \thispagestyle{plain}%
                \raggedright\small%
                \parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \columnseprule \z@
                \columnsep 35\p@
                \let\item\@idxitem}
               {\if@restonecol\onecolumn\else\clearpage\fi}
\newcommand{\appendicesname}[1]{\def\SUF@appendices{#1}}
    \appendicesname{Appendici}
    \newcommand{\appendixpage}{\SUF@appendixpage}
\def\SUF@appendixpage{%
  \@mainmattertrue
    \titlecontents{part}
      [0em]
      {\addvspace{3ex}}
      {}
      {}
      {}
      [\addvspace{1ex}]
\let\contentspage\relax
    \cleardoublepage
       \thispagestyle{empty}
         \addcontentsline{toc}{part}{\SUF@appendices}
     \begingroup
       \centering
          \null\vfil
        {\LARGE\SUF@appendices\par}
          \vfil
   \endgroup
    \cleardoublepage
\titlecontents{part}
   [0em]
  {\addvspace{3ex}\partname~}
  {\makebox[\SUF@label@part][l]{\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\SUF@titlesmallcaps{\appendixname}~\Alph{chapter}:\hskip.5em}
      {0pt}
      {\small\SUF@titlesmallcaps}
      [\rule{\textwidth}{.4pt}]
      \titlespacing*{\chapter}{0em}{-16pt}{10pt}[0em]}
    \else
      \ifsuftesi@article
          \renewcommand\appendix{\par
              \setcounter{section}{0}%
              \setcounter{subsection}{0}%
              \gdef\thesection{\@Alph\c@section}}
   \else
         \renewcommand\appendix{\par
             \setcounter{chapter}{0}%
             \setcounter{section}{0}%
             \gdef\@chapapp{\appendixname}%
             \gdef\thechapter{\@Alph\c@chapter}}
    \fi
\fi
\RequirePackage{fancyhdr}
  \pagestyle{fancy}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footnoterule}{}
\def\SUF@versionstring{\texttt{Version of \today}}
\ifsuftesi@elements%
  \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
  \renewcommand{\sectionmark}[1]{\markright{#1}}
 \fancypagestyle{elements}{%
  \setlength{\unitlength}{1pt}
   \fancyhf{}
   \fancyfoot[LE,RO]{\thepage}
   \fancyhead[RO]{%
    \begin{picture}(0,0)
      \put(0,-104){%
      \hskip\marginparsep
      \parbox[t]{\marginparwidth}{\itshape\raggedright\leftmark}}%
    \end{picture}}
   \fancyhead[LE]{%
     \begin{picture}(0,0)
       \put(0,-104){%
       \hskip-\dimexpr(\marginparwidth+\marginparsep)
       \parbox[t]{\marginparwidth}{\itshape\raggedleft\rightmark}}%
    \end{picture}}%
  }%
\else
\renewcommand{\chaptermark}[1]{%
    \markboth{\chaptertitlename\ \SUF@thechapter}{#1}}
\ifsuftesi@article
  \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
    \else
  \renewcommand{\sectionmark}[1]{}
\fi
\fi
\fancypagestyle{plain}{\pagestyle{sufplain}}
\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]{%
    \ifsuftesi@bozza\footnotesize\SUF@versionstring\else\fi}
  \fancyhead[CO]{\footnotesize\xheadbreakfalse\SUF@rightmark}
  \fancyhead[CE]{\footnotesize\xheadbreakfalse%
    \SUF@LR@MarkSwitch}
  \fancyfoot[C]{\footnotesize\SUF@thepage}%
  }%
\fancypagestyle{sufdefault}{%
  \fancyhf{}%
  \fancyfoot[RE,LO]{%
    \ifsuftesi@bozza\footnotesize\SUF@versionstring\else\fi}
  \fancyhead[LE,RO]{\footnotesize\SUF@thepage}
  \fancyhead[LO]{\footnotesize\xheadbreakfalse\SUF@rightmark}
  \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
\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}
\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}
\renewenvironment{quotation}
            {\list{}{\listparindent\parindent%
                     \itemindent    \listparindent
                     \leftmargin     \parindent
                     \ifsuftesi@ralignquotation
                      \else
                        \rightmargin   \parindent
                       \fi
                        \parsep        \z@ \@plus\p@}%
               \item\relax%
                 \ifsuftesi@smallquotation
                   \small
                     \else
                   \footnotesize
                 \fi\noindent\ignorespaces}
               {\endlist}
\renewenvironment{quote}
            {\list{}{\leftmargin \parindent
                     \ifsuftesi@ralignquotation\
                      \else
                        \rightmargin   \parindent
                       \fi}%
               \item\relax%
                 \ifsuftesi@smallquotation
                   \small
                     \else
                   \footnotesize
                 \fi}%\ignorespaces?
               {\endlist}
\renewenvironment{verse}
               {\let\\\@centercr
                \list{}{\itemsep      \z@
                        \itemindent   -1.5em%
                        \listparindent\itemindent
                        \rightmargin  \leftmargin
                        \advance\leftmargin 1.5em}%
                \item\relax
                  \ifsuftesi@smallquotation
                   \small
                     \else
                   \footnotesize
                 \fi}
               {\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
      \else\itshape\fi
    \footnotesize%
    \parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
    \tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
    \doublehyphendemerits=100000%
    \finalhyphendemerits=\doublehyphendemerits}
\let\oldmarginpar\marginpar
\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
      \null\vfil
      \@beginparpenalty\@lowpenalty
      \begin{center}%
         \abstractname
        \@endparpenalty\@M
      \end{center}}%
     {\par\vfil\null\endtitlepage}
\else
  \newenvironment{abstract}{%
      \if@twocolumn
        \section*{\abstractname}%
      \else
        \small
        \begin{center}%
          {\abstractname\vspace{-.5em}\vspace{\z@}}%
        \end{center}%
        \quotation
      \fi}
      {\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
    \vfill
     \def\next{#2}
         \ifx\next\@empty\else
            \noindent Copyright \copyright{} \the\year~#2\\[1ex]
          Tutti i diritti riservato
        \fi
  \vfill
  {\small\noindent Questo lavoro è stato composto con \SUF@engine{}%
     \def\next{#1}
        \ifx\next\@empty\else su #1
      \fi usando la classe \textsf{suftesi} di
      Ivan Valbusa\index{Valbusa, Ivan}. #3\par}
      \cleardoublepage}
\newcommand{\bookcolophon}[2]{%
  \thispagestyle{empty}
  \null
    \vfill
            \noindent #1
  \vfill
  {\small\noindent #2\par}
      \cleardoublepage}
\newcommand{\artcolophon}[1]{%
\thispagestyle{empty}
  \null
    \vfill
  {\small\noindent #1\par}}
\newcommand{\finalcolophon}[1]{%
\thispagestyle{empty}
  \null\vspace*{\stretch{1}}
  \begin{center}
  \begin{minipage}{.5\textwidth}
  \centering\small #1
  \end{minipage}
  \end{center}
    \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}}
\newlength{\SUF@tochang}
\setlength{\SUF@tochang}{3em}
\AtBeginDocument{
\newlength\SUF@label@part
\newlength\SUF@label@section
\newlength\SUF@label@subsection
\newlength\SUF@label@subsubsection
\newlength\SUF@label@paragraph
\newlength\SUF@label@subparagraph
\newlength\SUF@label@figure
\newlength\SUF@label@table
\setlength\SUF@label@part
    {\SUF@label@chapter}
\setlength\SUF@label@section
    {\dimexpr(\SUF@label@chapter+.5em)}
\setlength\SUF@label@subsection
    {\dimexpr(\SUF@label@section+.5em)}
\setlength\SUF@label@subsubsection
    {\dimexpr(\SUF@label@subsection+.5em)}
\setlength\SUF@label@paragraph
    {\dimexpr(\SUF@label@subsubsection+.5em)}
\setlength\SUF@label@subparagraph
    {\dimexpr(\SUF@label@paragraph+.5em)}
\setlength\SUF@label@figure
    {\SUF@label@chapter}
\setlength\SUF@label@table
    {\SUF@label@chapter}
}
\titlecontents{part}
  [0em]
  {\addvspace{3ex}\SUF@tocchapsize\partname~}
  {\makebox[\SUF@label@part][l]{\thecontentslabel}\hspace*{1em}}
  {}
  {}
  [\addvspace{1ex}]
\ifsuftesi@tocpageleft
\contentsmargin{0pt}
\AtBeginDocument{
\newlength\SUF@tochang@chap
\newlength\SUF@tochang@sec
\newlength\SUF@tochang@subsec
\newlength\SUF@tochang@subsubsec
\newlength\SUF@tochang@par
\newlength\SUF@tochang@subpar
\newlength\SUF@tochang@fig
\newlength\SUF@tochang@tab
\newlength\SUF@addto@tochang@chap
\newlength\SUF@addto@tochang@sec
\newlength\SUF@addto@tochang@subsec
\newlength\SUF@addto@tochang@subsubsec
\newlength\SUF@addto@tochang@par
\newlength\SUF@addto@tochang@subpar
\newlength\SUF@addto@tochang@fig
\newlength\SUF@addto@tochang@tab
\setlength\SUF@tochang@chap
    {\dimexpr(1em+\SUF@tochang+\SUF@label@chapter+1em)}
\setlength\SUF@tochang@sec
    {\dimexpr(\SUF@tochang@chap+\SUF@label@section+1em)}
\setlength\SUF@tochang@subsec
    {\dimexpr(\SUF@tochang@sec+\SUF@label@subsection+1em)}
\setlength\SUF@tochang@subsubsec
    {\dimexpr(\SUF@tochang@subsec+\SUF@label@subsubsection+1em)}
\setlength\SUF@tochang@par
    {\dimexpr(\SUF@tochang@subsubsec+\SUF@label@paragraph+1em)}
\setlength\SUF@tochang@subpar
    {\dimexpr(\SUF@tochang@par+\SUF@label@subparagraph+1em)}
\setlength\SUF@tochang@fig
    {\SUF@tochang@chap}
\setlength\SUF@tochang@tab
    {\SUF@tochang@chap}
\setlength\SUF@addto@tochang@chap
    {\SUF@tochang}
\setlength\SUF@addto@tochang@sec
    {\dimexpr(\SUF@addto@tochang@chap+\SUF@label@section+.5em)}
\setlength\SUF@addto@tochang@subsec
    {\dimexpr(\SUF@addto@tochang@sec+\SUF@label@subsection+.5em)}
\setlength\SUF@addto@tochang@subsubsec
    {\dimexpr(\SUF@addto@tochang@subsec+\SUF@label@subsubsection+.5em)}
\setlength\SUF@addto@tochang@par
    {\dimexpr(\SUF@addto@tochang@subsubsec+\SUF@label@paragraph+.5em)}
\setlength\SUF@addto@tochang@subpar
    {\dimexpr(\SUF@addto@tochang@par+\SUF@label@subparagraph+.5em)}
\setlength\SUF@addto@tochang@fig
    {\SUF@addto@tochang@chap}
\setlength\SUF@addto@tochang@tab
    {\SUF@addto@tochang@chap}
}
\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}}
  {\hskip-\SUF@tochang@chap%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@chap}
  {}
  [\addvspace{1ex}]
\titlecontents{section}
  [\SUF@tochang@sec]
  {}
  {\hskip-\SUF@tochang@sec%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@sec%
    \makebox[\SUF@label@section][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\SUF@tochang@sec%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@sec%
    \makebox[\SUF@label@section][l]{\thecontentslabel}\hspace*{1em}}
  {}
\titlecontents{subsection}
  [\SUF@tochang@subsec]
  {}
  {\hskip-\SUF@tochang@subsec%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsec%
    \makebox[\SUF@label@subsection][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\SUF@tochang@subsec%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsec%
    \makebox[\SUF@label@subsection][l]{\thecontentslabel}\hspace*{1em}}
  {}
\titlecontents{subsubsection}
  [\SUF@tochang@subsubsec]
  {}
  {\hskip-\SUF@tochang@subsubsec%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsubsec%
    \makebox[\SUF@label@subsubsection][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\SUF@tochang@subsubsec%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsubsec%
    \makebox[\SUF@label@subsubsection][l]{\thecontentslabel}\hspace*{1em}}
  {}
\titlecontents{paragraph}
  [\SUF@tochang@par]
  {}
  {\hskip-\SUF@tochang@par%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@par%
    \makebox[\SUF@label@paragraph][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\SUF@tochang@par%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@par%
    \makebox[\SUF@label@paragraph][l]{\thecontentslabel}\hspace*{1em}}
  {}
\titlecontents{subparagraph}
  [\SUF@tochang@subpar]
  {}
  {\hskip-\SUF@tochang@subpar%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subpar%
    \makebox[\SUF@label@subparagraph][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\SUF@tochang@subpar%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subpar%
    \makebox[\SUF@label@subparagraph][l]{\thecontentslabel}\hspace*{1em}}
  {}
\titlecontents{figure}
  [\SUF@tochang@fig]
  {}
  {\hskip-\SUF@tochang@fig%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@fig%
     \makebox[\SUF@label@figure][l]{\thecontentslabel}\hspace*{1em}}
  {}
  {}
\titlecontents{table}
  [\SUF@tochang@tab]
  {}
  {\hskip-\SUF@tochang@tab%
   \makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@tab%
     \makebox[\SUF@label@table][l]{\thecontentslabel}\hspace*{1em}}
  {}
  {}
\else
\AtBeginDocument{
\newlength\SUF@tocindent@chap
\newlength\SUF@tocindent@sec
\newlength\SUF@tocindent@subsec
\newlength\SUF@tocindent@subsubsec
\newlength\SUF@tocindent@par
\newlength\SUF@tocindent@subpar
\newlength\SUF@tocindent@fig
\newlength\SUF@tocindent@tab
\setlength\SUF@tocindent@chap
    {\dimexpr(\SUF@label@chapter+1em)}
\setlength\SUF@tocindent@sec
    {\dimexpr(\SUF@tocindent@chap+\SUF@label@section+1em)}
\setlength\SUF@tocindent@subsec
    {\dimexpr(\SUF@tocindent@sec+\SUF@label@subsection+1em)}
\setlength\SUF@tocindent@subsubsec
    {\dimexpr(\SUF@tocindent@subsec+\SUF@label@subsubsection+1em)}
\setlength\SUF@tocindent@par
    {\dimexpr(\SUF@tocindent@subsubsec+\SUF@label@paragraph+1em)}
\setlength\SUF@tocindent@subpar
    {\dimexpr(\SUF@tocindent@par+\SUF@label@subparagraph+1em)}
\setlength\SUF@tocindent@fig
    {\SUF@tocindent@chap}
\setlength\SUF@tocindent@tab
    {\SUF@tocindent@chap}
}
\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}
  {\SUF@chaptitlerule\contentspage}
  [\addvspace{1ex}]
\titlecontents{section}
  [\SUF@tocindent@sec]
  {}
  {\hskip-\dimexpr(\SUF@label@section+1em)%
    \makebox[\SUF@label@section][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\dimexpr(\SUF@label@section+1em)%
    \makebox[\SUF@label@section][l]{\thecontentslabel}\hspace*{1em}}
  {\ifsuftesi@article\SUF@chaptitlerule%
       \else\SUF@titlerule\fi\contentspage}
\titlecontents{subsection}
  [\SUF@tocindent@subsec]
  {}
  {\hskip-\dimexpr(\SUF@label@subsection+1em)%
    \makebox[\SUF@label@subsection][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\dimexpr(\SUF@label@subsection+1em)%
    \makebox[\SUF@label@subsection][l]{\thecontentslabel}\hspace*{1em}}
  {\SUF@titlerule\contentspage}
\titlecontents{subsubsection}
  [\SUF@tocindent@subsubsec]
  {}
  {\hskip-\dimexpr(\SUF@label@subsubsection+1em)%
    \makebox[\SUF@label@subsubsection][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\dimexpr(\SUF@label@subsubsection+1em)%
    \makebox[\SUF@label@subsubsection][l]{\thecontentslabel}\hspace*{1em}}
  {\SUF@titlerule\contentspage}
\titlecontents{paragraph}
  [\SUF@tocindent@par]
  {}
  {\hskip-\dimexpr(\SUF@label@paragraph+1em)%
    \makebox[\SUF@label@paragraph][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\dimexpr(\SUF@label@paragraph+1em)%
    \makebox[\SUF@label@paragraph][l]{\thecontentslabel}\hspace*{1em}}
  {\SUF@titlerule\contentspage}
\titlecontents{subparagraph}
  [\SUF@tocindent@subpar]
  {}
  {\hskip-\dimexpr(\SUF@label@subparagraph+1em)%
    \makebox[\SUF@label@subparagraph][l]{\thecontentslabel}\hspace*{1em}}
  {\hskip-\dimexpr(\SUF@label@subparagraph+1em)%
    \makebox[\SUF@label@subparagraph][l]{\thecontentslabel}\hspace*{1em}}
  {\SUF@titlerule\contentspage}
\titlecontents{figure}
  [\SUF@tocindent@fig]
  {}
  {\hskip-\dimexpr(\SUF@label@figure+1em)%
    \makebox[\SUF@label@figure][l]{\thecontentslabel}}
  {}
  {\SUF@titlerule\contentspage}
\titlecontents{table}
  [\SUF@tocindent@tab]
  {}
  {\hskip-\dimexpr(\SUF@label@table+1em)%
    \makebox[\SUF@label@table][l]{\thecontentslabel}}
  {}
  {\SUF@titlerule\contentspage}
\fi
\ifsuftesi@article
\renewcommand\tableofcontents{%
\thispagestyle{empty}
    \section*{\contentsname
        \@mkboth{\contentsname}{\contentsname}}%
    \@starttoc{toc}%
    \vspace{2ex}%
   }
\renewcommand\listoffigures{%
    \section*{\listfigurename}%
      \@mkboth{\listfigurename}%
              {\listfigurename}%
    \@starttoc{lof}%
    \vspace{2ex}%
    }
\renewcommand\listoftables{%
    \section*{\listtablename}%
      \@mkboth{%
          \listtablename}%
         {\listtablename}%
    \@starttoc{lot}%
    \vspace{2ex}%
    }
\else
\renewcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\contentsname
        \@mkboth{%
            \contentsname}
           {\contentsname}}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
   }
\renewcommand\listoffigures{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listfigurename}%
      \@mkboth{\listfigurename}%
              {\listfigurename}%
    \@starttoc{lof}%
    \if@restonecol\twocolumn\fi
    }
\renewcommand\listoftables{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listtablename}%
      \@mkboth{%
          \listtablename}%
         {\listtablename}%
    \@starttoc{lot}%
    \if@restonecol\twocolumn\fi
    }
\fi
\def\chapterintro{
  \@ifstar{\@tempswafalse\@chapterintro}{\@tempswatrue\@chapterintro}}
\def\@chapterintro{\phantomsection
  \if@tempswa\section*{\SUF@fchapterintroname}\fi
  \addcontentsline{toc}{section}{\SUF@fchapterintroname}}
\newcommand{\chapterintroname}[1]{\def\SUF@fchapterintroname{#1}}
\chapterintroname{Introduzione}
\newif\ifheadbreak\headbreakfalse
  \DeclareRobustCommand{\headbreak}
    {\ifheadbreak\\\else\fi}
\newif\ifxheadbreak\xheadbreaktrue
  \DeclareRobustCommand{\xheadbreak}
    {\ifxheadbreak\\\else\fi}
\let\origtableofcontents\tableofcontents
  \renewcommand{\tableofcontents}{%
    \begingroup\headbreaktrue\xheadbreakfalse%
  \origtableofcontents\endgroup}
\renewcommand\frontmatter{\cleardoublepage\@mainmatterfalse}
\renewcommand\mainmatter{\cleardoublepage\@mainmattertrue}
\newenvironment{bibliografia}{%
  \ifsuftesi@article
    \section*{\refname}
     \addcontentsline{toc}{section}{\refname}
  \else
  \chapter{\bibname}%
  \fi
      \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}
\let\hemph\emph
\ifxetex\let\@afterindenttrue\@afterindentfalse\else\fi
\frenchspacing
\endinput
%%
%% End of file `suftesi.cls'.
