summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/toptesi/toptesi.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/toptesi/toptesi.sty')
-rw-r--r--Master/texmf-dist/tex/latex/toptesi/toptesi.sty93
1 files changed, 63 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/toptesi/toptesi.sty b/Master/texmf-dist/tex/latex/toptesi/toptesi.sty
index 360e258ddba..81f8789f570 100644
--- a/Master/texmf-dist/tex/latex/toptesi/toptesi.sty
+++ b/Master/texmf-dist/tex/latex/toptesi/toptesi.sty
@@ -12,9 +12,9 @@
%%
%% License information appended
%%
-\NeedsTeXFormat{LaTeX2e}[2016/01/01]
+\NeedsTeXFormat{LaTeX2e}[2018/01/01]
\ProvidesPackage{toptesi}[%
-2019-05-01 v.6.3.04
+2019-07-01 v.6.3.05
Extension for toptesi.cls]
@@ -227,19 +227,23 @@ Extension for toptesi.cls]
\newif\iffigurespage
\newif\iftablespage
\newif\ifnumeriromani
+\newif\if@mainmatter
\newif\iffrontmatter
-\def\frontmatter{\clearpage\ps@plain%
+\def\frontmatter{\clearpage\ps@plain\@mainmatterfalse
\ifTOPnumerazioneromana\numeriromanitrue\fi
\frontmattertrue\@openrightfalse\c@secnumdepth=-2\relax
}
-\def\mainmatter{\if@twoside\@openrighttrue\fi
+\def\mainmatter{\@mainmattertrue
+\if@twoside\@openrighttrue\fi
\ifTOPnumerazioneromana\numeriromanifalse\fi
- \frontmatterfalse\c@secnumdepth=2
+ \frontmatterfalse
+ \c@secnumdepth=2
\clearpage\ps@headings
\ifTOPnumerazioneromana\pagenumbering{arabic}\fi
}
\newcommand\backmatter{\cleardoublepage[empty]%
+\@mainmatterfalse
\setcounter{secnumdepth}{-1}\if@twoside\@openrightfalse\fi}
\AtBeginDocument{%
@@ -247,6 +251,7 @@ Extension for toptesi.cls]
}
\figurespagefalse
\tablespagefalse
+
\let\ps@blank\ps@plain
\newcommand*\blankpagestyle[1]{%
\expandafter\let\expandafter\ps@blank\csname ps@#1\endcsname}
@@ -256,6 +261,7 @@ Extension for toptesi.cls]
\if@openright
\null\thispagestyle{#1}\clearpage
\fi\fi\fi}
+
\def\sommario{%
\iffrontmatter\else\frontmattertrue\fi
\chapter*{\summaryname}}
@@ -264,24 +270,47 @@ Extension for toptesi.cls]
\iffrontmatter\else\frontmattertrue\fi
\chapter*{\acknowledgename}}
\let\acknowledgements\ringraziamenti
-\def\@chapter[#1]#2{\iffrontmatter\mainmatter\fi
- \ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}#1}%
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
- \if@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi}
+\RenewDocumentCommand{\chapter}
+ {s O{#4} O{#2} m O{plain}}{%
+ \if@openright\cleardoublepage
+ \else\clearpage\fi
+ \thispagestyle{#5}%
+ \global\@topnum\z@
+ \@afterindentfalse
+\IfBooleanTF{#1}{%
+ \c@secnumdepth=-3\relax
+ \let\iftoc\iffalse
+}{%
+ \iffrontmatter\mainmatter\fi
+ \let\iftoc\iftrue
+}%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter % where \if@mainmatter is defined
+ % (e.g. book.cls, toptesi.cls)
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \iftoc\addcontentsline{toc}{chapter}{%
+ \protect\numberline{\thechapter}#2}\fi
+ \else %
+ \iftoc\addcontentsline{toc}{chapter}{#2}\fi
+ \fi
+ \else % Were \mainmatter is not defined (e.g.report.cls)
+ \iftoc\addcontentsline{toc}{chapter}{#2}\fi
+ \fi
+ \markboth{#3}{#3}% No \MakeUppercase
+ \iftoc
+ \addtocontents{lof}%
+ {\protect\addvspace{10\p@}}%
+ \addtocontents{lot}%
+ {\protect\addvspace{10\p@}}%
+ \fi
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#4}]%
+ \else
+ \@makechapterhead{#4}%
+ \@afterheading
+ \fi
+}
\def\@part[#1]#2{\iffrontmatter\mainmatter\fi
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
@@ -300,30 +329,34 @@ Extension for toptesi.cls]
\fi
\Huge \bfseries #2\par}%
\@endpart}
+
\renewcommand\tableofcontents{%
\chapter*{\contentsname}%
- \@mkboth{\contentsname}{\contentsname}%
\@starttoc{toc}%
\clearpage
\if@restonecol\twocolumn\fi
}
+
+\providecommand\phantomsection{}% in case \hyperref was not loaded
+
\renewcommand\listoffigures{%
- \chapter*{\listfigurename}
- \@mkboth{\listfigurename}{\listfigurename}%
+ \phantomsection
+ \chapter*{\listfigurename}%
\addcontentsline{toc}{chapter}{\listfigurename}
\@starttoc{lof}%
\clearpage
\if@restonecol\twocolumn\fi
}
+
\renewcommand\listoftables{%
+ \phantomsection
\chapter*{\listtablename}%
\addcontentsline{toc}{chapter}{\listtablename}
- \@mkboth{\listtablename}{\listtablename}%
\@starttoc{lot}%
\clearpage
\if@restonecol\twocolumn\fi
}
-\def\indici{%
+\def\indici{% If headings are desired, the pagestyle must be set in advance
\iffrontmatter\else\frontmattertrue\fi
\tableofcontents
\iftablespage
@@ -333,7 +366,7 @@ Extension for toptesi.cls]
\listoftables
\let\addvspace=\saveaddvspace}
\fi
- \iffigurespage
+ \iffigurespage%
{\addvspace{10pt}
\let\saveaddvspace=\addvspace
\def\addvspace##1{}
@@ -342,6 +375,7 @@ Extension for toptesi.cls]
\fi
\ifbool{@twoside}{\cleardoublepage[empty]}{}}
\let\allcontents\indici
+
\onecolumn
\if@twoside
\unless\ifScuDo
@@ -557,7 +591,6 @@ Extension for toptesi.cls]
\usecounter{enumi}}
\else
\chapter*{\bibname}\relax
- \@mkboth{\bibname}{\bibname}\relax
\addcontentsline{toc}{chapter}{\bibname}\relax
\list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}%
\leftmargin\labelwidth