diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/toptesi/toptesi.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/toptesi/toptesi.sty | 238 |
1 files changed, 167 insertions, 71 deletions
diff --git a/Master/texmf-dist/tex/latex/toptesi/toptesi.sty b/Master/texmf-dist/tex/latex/toptesi/toptesi.sty index d555c989524..b495f33db69 100644 --- a/Master/texmf-dist/tex/latex/toptesi/toptesi.sty +++ b/Master/texmf-dist/tex/latex/toptesi/toptesi.sty @@ -14,11 +14,10 @@ %% \NeedsTeXFormat{LaTeX2e}[2018/01/01] \ProvidesPackage{toptesi}[% -2019-07-26 v.6.3.06 +2020-05-12 v.6.4.02 Extension for toptesi.cls] - \def\TRON{\tracingcommands \tw@ \tracingmacros \tw@} \def\TROFF{\tracingcommands\z@ \tracingmacros \z@} \let\TROF\TROFF @@ -37,6 +36,9 @@ Extension for toptesi.cls] \newif\ifsecondaria\secondariafalse \newif\ifcustom\customfalse \newif\ifTOPnumerazioneromana\TOPnumerazioneromanafalse +\newif\ifTOPnocenterfolio \TOPnocenterfoliofalse +\newif\ifTOPnocenterhead \TOPnocenterheadfalse +\newif\ifTOPfolioinhead \TOPfolioinheadfalse \newlength\T@Pbinding \def\setbindingcorrection#1{\T@Pbinding=#1} \newif\if@binding \@bindingfalse @@ -68,6 +70,11 @@ Extension for toptesi.cls] \fi} \DeclareOptionX{autoretitolo}[true]{\ifclassica\@utoretitolotrue\fi} \DeclareOptionX{oldstyle}[true]{\ifclassica\@ldstyletrue\fi} +\DeclareOptionX{nocenterfolio}[true]% + {\unless\ifclassica\TOPnocenterfoliotrue\fi} +\DeclareOptionX{nocenterhead}[true]% + {\unless\ifclassica\TOPnocenterheadtrue\fi} +\DeclareOptionX{folioinhead}[true]{\unless\ifclassica\TOPfolioinheadtrue\fi} \DeclareOptionX{pdfa}{\PackageWarning{toptesi}{% ***********************************************\MessageBreak% Option pdfa ignored.\MessageBreak% @@ -169,37 +176,122 @@ Extension for toptesi.cls] \mark{{}{}} \newbox\@intesta \def\ps@plain{\let\@mkboth\@gobbletwo -\def\@oddfoot{\null\hfill {\scshape\lapagina}\hfill \null}\def\@oddhead{} -\def\@evenhead{}\let\@evenfoot\@oddfoot} +\let\@oddhead\@empty\let\@evenhead\@empty% \if@twoside - \def\ps@headings{\let\@mkboth\markboth% autoretitolo - \def\@oddfoot{\null\hfill {\scshape\lapagina} \hfill\null} - \let\@evenfoot\@oddfoot - % - \def\@evenhead{\setbox\@intesta\hbox{\footnotesize\slshape - \leftmark}% + \ifTOPnocenterfolio + \def\@oddfoot{\makebox[\textwidth][r]{\scshape\lapagina}} + \def\@evenfoot{\makebox[\textwidth][l]{\scshape\lapagina}} + \else + \def\@oddfoot{\makebox[\textwidth][c]{\scshape\lapagina}}% + \def\@evenfoot{\makebox[\textwidth][c]{\scshape\lapagina}}% + \fi +\else + \ifTOPnocenterfolio + \def\@oddfoot{\makebox[\textwidth][r]{\scshape\lapagina}}% + \let\@evenfoot\@oddfoot + \else + \def\@oddfoot{\makebox[\textwidth][c]{\scshape\lapagina}}% + \let\@evenfoot\@oddfoot + \fi +\fi +} + +\if@twoside % two side + \def\ps@headings{% + \let\@mkboth\markboth\let\@oddhead\@empty\let\@evenhead\@empty + \unless\ifTOPfolioinhead % folio in head + \ifTOPnocenterfolio + \def\@oddfoot{\makebox[\textwidth][r]{\scshape\lapagina}} + \def\@evenfoot{\makebox[\textwidth][l]{\scshape\lapagina}} + \else + \def\@oddfoot{\makebox[\textwidth][c]{\scshape\lapagina}} + \def\@evenfoot{\makebox[\textwidth][c]{\scshape\lapagina}} + \fi + \def\@oddhead{\setbox\@intesta\hbox{\footnotesize\slshape + \rightmark}% \ifdim\wd\@intesta>\textwidth \headWarn{\chapter}\fi% - \underline{\makebox[\textwidth]{\footnotesize\slshape - \strut\leftmark}}}% + \ifTOPnocenterhead + \underline{\makebox[\textwidth][r]{\footnotesize\slshape + \strut\rightmark}}% + \else + \underline{\makebox[\textwidth][c]{\footnotesize\slshape + \strut\rightmark}}% + \fi}% + \def\@evenhead{\setbox\@intesta\hbox{\footnotesize\slshape + \rightmark}% + \ifdim\wd\@intesta>\textwidth \headWarn{\section}\fi% + \ifTOPnocenterhead + \underline{\makebox[\textwidth][r]{\footnotesize\slshape + \strut\leftmark}}% + \else + \underline{\makebox[\textwidth][c]{\footnotesize\slshape + \strut\leftmark}}% + \fi}% + \else % folio in foot + \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@oddhead{\setbox\@intesta\hbox{\footnotesize\slshape \rightmark}% \ifdim\wd\@intesta>\textwidth \headWarn{\section}\fi% - \underline{\makebox[\textwidth]{\footnotesize\slshape - \strut\rightmark}}}% - \def\chaptermark##1{% - \markboth{\thechapter\ -- ##1}{\thechapter\ -- ##1}} - \def\sectionmark##1{\markright{\ifnum\c@secnumdepth>\z@ - \thesection\ -- \fi ##1}}} -\else - \def\ps@headings{\let\@mkboth\markboth - \def\@oddfoot{\null\hfill {\scshape\lapagina} \hfill\null} - \def\@evenfoot{} + \ifTOPnocenterhead + \underline{\makebox[\textwidth][r]{\footnotesize\slshape + \strut\rightmark}}\rlap{\quad\scshape\lapagina}% + \else + \underline{\makebox[\textwidth][c]{\footnotesize\slshape + \strut\rightmark}}\rlap{\quad\scshape\lapagina}% + \fi} + \def\@evenhead{\setbox\@intesta\hbox{\footnotesize\slshape + \rightmark}% + \ifdim\wd\@intesta>\textwidth \headWarn{\chapter}\fi% + \ifTOPnocenterhead + \underline{\llap{\scshape\lapagina\quad}% + \makebox[\textwidth][l]{\footnotesize\slshape\strut\rightmark}}% + \else + \underline{\llap{\scshape\lapagina\quad}% + \makebox[\textwidth][c]{\footnotesize\slshape\strut\rightmark}}% + \fi} + \fi + \def\chaptermark##1{\markboth{\thechapter\ -- ##1}{\thechapter\ -- ##1}} + \def\sectionmark##1{\markright{\ifnum\c@secnumdepth>\z@ + \thesection\ -- \fi ##1}}% + } +\else% oneside + \def\ps@headings{% + \let\@mkboth\markboth\let\@oddhead\@empty\let\@evenhead\@empty + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenfoot{}\def\@evenhead{}% + \unless\ifTOPfolioinhead % folio in head + \ifTOPnocenterfolio + \def\@oddfoot{\makebox[\textwidth][r]{\scshape\lapagina}} + \else + \def\@oddfoot{\makebox[\textwidth][c]{\scshape\lapagina}} + \fi + \def\@oddhead{% + \setbox\@intesta\hbox{\footnotesize\slshape + \rightmark}% + \ifdim\wd\@intesta>\textwidth \headWarn{\chapter}\fi% + \ifTOPnocenterhead + \underline{\makebox[\textwidth][r]{\footnotesize\slshape + \strut\rightmark}}% + \else + \underline{\makebox[\textwidth][c]{\footnotesize\slshape + \strut\rightmark}}% + \fi + }% + \else % folio in foot + \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@oddhead{\setbox\@intesta\hbox{\footnotesize\slshape \rightmark}% \ifdim\wd\@intesta>\textwidth \headWarn{\chapter}\fi% - \underline{\makebox[\textwidth]{\footnotesize\slshape - \strut\rightmark}}}% - \def\chaptermark##1{\markright{\thechapter\ -- ##1}}} + \ifTOPnocenterhead + \underline{\makebox[\textwidth][r]{\footnotesize\slshape + \strut\rightmark}}\makebox[\z@][l]{\enspace\scshape\lapagina}% + \else + \underline{\makebox[\textwidth][c]{\footnotesize\slshape + \strut\rightmark}}\makebox[\z@][l]{\enspace\scshape\lapagina}% + \fi} + \fi + \def\chaptermark##1{\markright{\thechapter\ -- ##1}}% + } \fi \def\headWarn#1{\PackageWarning{toptesi}{% @@ -270,6 +362,8 @@ Extension for toptesi.cls] \iffrontmatter\else\frontmattertrue\fi \chapter*{\acknowledgename}} \let\acknowledgements\ringraziamenti +\newenvironment{pdfxmetadata}{% +\VerbatimOut{\jobname.xmpdata}}{\endVerbatimOut} \RenewDocumentCommand{\chapter} {s O{#4} O{#2} m O{plain}}{% \if@openright\cleardoublepage @@ -311,6 +405,9 @@ Extension for toptesi.cls] \@afterheading \fi } +\RenewDocumentCommand\part{s O{#3} m}{\iffrontmatter\mainmatter\fi +\if@openright \cleardoublepage \else \clearpage \fi +\thispagestyle{plain}\if@twocolumn \onecolumn \@tempswatrue \else \@tempswafalse \fi \null \vfil \IfBooleanTF{#1}{\@spart{#3}}{\@part[#2]{#3}}} \def\@part[#1]#2{\iffrontmatter\mainmatter\fi \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% @@ -329,7 +426,6 @@ Extension for toptesi.cls] \fi \Huge \bfseries #2\par}% \@endpart} - \renewcommand\tableofcontents{% \chapter*{\contentsname}% \@starttoc{toc}% @@ -356,7 +452,7 @@ Extension for toptesi.cls] \clearpage \if@restonecol\twocolumn\fi } -\def\indici{% If headings are desired, the pagestyle must be set in advance +\def\indici{% If headings are desired, the page style must be set in advance \iffrontmatter\else\frontmattertrue\fi \tableofcontents \iftablespage @@ -684,51 +780,51 @@ Skipping any redefinition\MessageBreak}% \fi } \if@utoretitolo - \if@twoside - \renewcommand*{\ps@headings}{\let\@mkboth\markboth% - \def\@oddfoot{\null \hfill \textbf{\lapagina} \hfill \null}% - \let\@evenfoot\@oddfoot - \def\@evenhead{% - \setbox\@intesta\hbox{\ifPDFTeX\latintext\fi - \footnotesize\strut\textsc{% - \@@author\ifcsvoid{@secondauthor}{\ et al.}: \@stitle}% - }% - \ifdim\wd\@intesta>\textwidth\headwrn{\titolo}\fi - \underline{\makebox[\textwidth]{\box\@intesta}}}% - \def\@oddhead{\ifPDFTeX\latintext\fi - \setbox\@intesta\hbox{% - \footnotesize\strut\textsl{\rightmark}}% - \ifdim\wd\@intesta>\textwidth \headWarn{\section}\fi% - \underline{\makebox[\textwidth]{\box\@intesta}}}% - \def\chaptermark##1{\markright{\thechapter\ -- ##1}}% - \def\sectionmark##1{}}% - \else - \renewcommand*{\ps@headings}{\let\@mkboth\markboth - \def\@oddfoot{\null \hfill \textbf{\lapagina}\hfill \null}% - \let\@evenfoot\empty\let\@evenhead\empty - \def\@oddhead{{\setbox\z@\hbox{\ifPDFTeX\latintext\fi - \footnotesize\textsc{% - \@@author\ifcsvoid{@secondauthor}{}{\ et al.}: \@stitle}}% - \setbox\tw@\hbox{\ifPDFTeX\latintext\fi - \footnotesize\textsl{\rightmark}}% - \dimen@=\dimexpr2em + \wd\z@ + \wd\tw@\relax - \ifdim\dimen@<\textwidth \relax - \else - \setbox\z@\vbox{\hsize.48\textwidth\parindent\z@ - \raggedright - \ifPDFTeX\latintext\fi\footnotesize\textsc{% - \@@author\ifcsvoid{@secondauthor}{}{\ et al.}: \@stitle - }}% - \setbox\tw@\vbox{\hsize.48\textwidth\parindent\z@ - \raggedleft - \ifPDFTeX\latintext\fi\footnotesize - \textsl{\rightmark}}% - \fi - \setbox\@intesta\vbox to\z@{% - \vss\hbox to\textwidth{\strut\box\z@\hfill\box\tw@}}% - \underline{\box\@intesta}}}% - \def\chaptermark##1{\markright{\thechapter\ -- ##1}}} + \if@twoside + \renewcommand*{\ps@headings}{\let\@mkboth\markboth% + \def\@oddfoot{\null \hfill \textbf{\lapagina} \hfill \null}% + \let\@evenfoot\@oddfoot + \def\@evenhead{% + \setbox\@intesta\hbox{\ifPDFTeX\latintext\fi + \footnotesize\strut\textsc{% + \@@author\ifcsvoid{@secondauthor}{\ et al.}: \@stitle}% + }% + \ifdim\wd\@intesta>\textwidth\headwrn{\titolo}\fi + \underline{\makebox[\textwidth]{\box\@intesta}}}% + \def\@oddhead{\ifPDFTeX\latintext\fi + \setbox\@intesta\hbox{% + \footnotesize\strut\textsl{\rightmark}}% + \ifdim\wd\@intesta>\textwidth \headWarn{\section}\fi% + \underline{\makebox[\textwidth]{\box\@intesta}}}% + \def\chaptermark##1{\markright{\thechapter\ -- ##1}}% + \def\sectionmark##1{}}% + \else + \renewcommand*{\ps@headings}{\let\@mkboth\markboth + \def\@oddfoot{\null \hfill \textbf{\lapagina}\hfill \null}% + \let\@evenfoot\empty\let\@evenhead\empty + \def\@oddhead{{\setbox\z@\hbox{\ifPDFTeX\latintext\fi + \footnotesize\textsc{% + \@@author\ifcsvoid{@secondauthor}{}{\ et al.}: \@stitle}}% + \setbox\tw@\hbox{\ifPDFTeX\latintext\fi + \footnotesize\textsl{\rightmark}}% + \dimen@=\dimexpr2em + \wd\z@ + \wd\tw@\relax + \unless\ifdim\dimen@<\textwidth + \setbox\z@\vbox{\hsize.48\textwidth\parindent\z@ + \raggedright + \ifPDFTeX\latintext\fi + \footnotesize\textsc{% + \@@author\ifcsvoid{@secondauthor}{}{\ et al.}: \@stitle + }}% + \setbox\tw@\vbox{\hsize.48\textwidth\parindent\z@ + \raggedleft + \ifPDFTeX\latintext\fi\footnotesize + \textsl{\rightmark}}% \fi + \setbox\@intesta\vbox to\z@{% + \vss\hbox to\textwidth{\strut\box\z@\hfill\box\tw@}}% + \underline{\box\@intesta}}}% + \def\chaptermark##1{\markright{\thechapter\ -- ##1}}} + \fi \fi \renewcommand\footnoterule{% \kern-6\p@ |