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.sty115
1 files changed, 73 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/latex/toptesi/toptesi.sty b/Master/texmf-dist/tex/latex/toptesi/toptesi.sty
index 0ae7076ef2f..566af875499 100644
--- a/Master/texmf-dist/tex/latex/toptesi/toptesi.sty
+++ b/Master/texmf-dist/tex/latex/toptesi/toptesi.sty
@@ -7,7 +7,7 @@
%% toptesi.dtx (with options: `topsty')
%% ______________________________________________________
%% The TOPtesi package
-%% Copyright (C) 2013 Claudio Beccari
+%% Copyright (C) 2014 Claudio Beccari
%% All rights reserved
%%
%% License information appended
@@ -29,13 +29,15 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{toptesi}%
-[2014/09/15 v.5.77 Extension for toptesi.cls]%
+[2014/10/15 v.5.81 Extension for toptesi.cls]%
\def\TRON{\tracingcommands \tw@ \tracingmacros \tw@}
\def\TROFF{\tracingcommands\z@ \tracingmacros \z@}
\let\TROF\TROFF
\newif\if@utoretitolo \@utoretitolofalse
\newif\if@ldstyle \@ldstylefalse
\newif\if@xivpt \@xivptfalse
+\newif\ifT@Pfrontespizio \T@Pfrontespiziofalse
+\newif\ifTOPfront \TOPfronttrue
\newlength\T@Pbinding\setlength\T@Pbinding{7mm}
\def\setbindingcorrection#1{\T@Pbinding=#1}
\newif\if@binding \@bindingfalse
@@ -50,6 +52,8 @@
\DeclareOption{autoretitolo}{\ifclassica\@utoretitolotrue\fi}
\DeclareOption{oldstyle}{\ifclassica\@ldstyletrue\fi}
\DeclareOption{pdfa}{\T@Ppdfatrue}
+\DeclareOption{usefrontespizio}{\T@Pfrontespiziotrue\TOPfrontfalse}
+\DeclareOption{noTOPfront}{\T@Pfrontespiziotrue\TOPfrontfalse}
\ProcessOptions\relax
\RequirePackage{graphicx}
\RequirePackage{etoolbox}
@@ -146,48 +150,65 @@
\newif\ifnumeriromani
\newif\iffrontmatter
\def\frontmatter{\clearpage\ps@plain\pagenumbering{roman}%
- \numeriromanitrue\frontmattertrue\@openrightfalse}
+ \numeriromanitrue\frontmattertrue\@openrightfalse\c@secnumdepth=-2}
\def\mainmatter{\if@twoside\@openrighttrue\fi
+ \numeriromanifalse\frontmatterfalse\c@secnumdepth=2
\clearpage\ps@headings\pagenumbering{arabic}%
- \numeriromanifalse\frontmatterfalse}
+ }
\AtBeginDocument{\frontmatter}
\figurespagefalse
\tablespagefalse
-\newcommand\blankpagestyle[1]{\def\blank@ps{#1}}
-\def\blank@ps{plain}
-\renewcommand\cleardoublepage{\clearpage\ifodd\value{page}\else
+\let\ps@blank\ps@plain
+\newcommand*\blankpagestyle[1]{\expandafter\let\expandafter\blank@ps\csname ps@#1\endcsname}
+\renewcommand\cleardoublepage[1][blank]{\clearpage\ifodd\value{page}\else
\if@twoside\if@openright
-\clearpage\null\thispagestyle{\blank@ps}\clearpage\fi\fi\fi}
+\clearpage\null\thispagestyle{#1}\clearpage\fi\fi\fi}
\def\sommario{%
\iffrontmatter\else\frontmattertrue\fi
- \if@openright\cleardoublepage\else\clearpage\fi
- \global\@topnum\z@
- \@afterindentfalse
- \@schapter{\summaryname}%
+ \chapter*{\summaryname}%
\addcontentsline{toc}{chapter}{\summaryname}%
}
\def\ringraziamenti{%
\iffrontmatter\else\frontmattertrue\fi
- \if@openright\cleardoublepage\else\clearpage\fi
- \global\@topnum\z@
- \@afterindentfalse
- \@schapter{\acknowledgename}%
+ \chapter*{\acknowledgename}%
\addcontentsline{toc}{chapter}{\acknowledgename}%
}
-\renewcommand\chapter{%
- \iffrontmatter\mainmatter\fi
- \if@openright\cleardoublepage\else\clearpage\fi
- \thispagestyle{plain}%
- \global\@topnum\z@
- \@afterindentfalse
- \secdef\@chapter\@schapter}
-\renewcommand\part{%
- \iffrontmatter\mainmatter\fi
- \if@openright\cleardoublepage\else\clearpage\fi
- \thispagestyle{empty}%
- \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
- \null\vfil
- \secdef\@part\@spart}
+\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}
+\def\@part[#1]#2{\iffrontmatter\mainmatter\fi
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ \markboth{}{}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >-2\relax
+ \huge\bfseries \partname\nobreakspace\thepart
+ \par
+ \vskip 20\p@
+ \fi
+ \Huge \bfseries #2\par}%
+ \@endpart}
\renewcommand\tableofcontents{%
\if@twocolumn\@restonecoltrue\onecolumn\else\@restonecolfalse\fi
\if@openright\cleardoublepage\else\clearpage\fi
@@ -368,11 +389,16 @@ Skipping any redefinition\MessageBreak}%
\renewcommand\@chapapp{\chaptername}%
}
\ifxetex
-\AtBeginDocument{%
-\RequirePackage{topfront}%
-\RequirePackage{topcoman}%
-}\else
-\RequirePackage{topfront}%
+ \AtBeginDocument{%
+ \unless\ifT@Pfrontespizio
+ \RequirePackage{topfront}
+ \fi
+ \RequirePackage{topcoman}%
+ }
+\else
+\unless\ifT@Pfrontespizio
+ \RequirePackage{topfront}
+\fi
\RequirePackage{topcoman}%
\fi
\ifxetex\else
@@ -403,12 +429,13 @@ Skipping any redefinition\MessageBreak}%
\RequirePackage{hyperref}
\fi
\fi
+\ifTOPfront
\ifclassica
\def\Candidato{Laureando}
\def\Candidata{Laureanda}
\def\Candidati{Laureandi}
\def\Candidate{Laureande}
-\fi
+\fi\fi
\newcounter{tomo}
\newcommand*{\tomo}{\clearpage\stepcounter{tomo}\frontespizio}
\renewcommand*{\lapagina}{%
@@ -516,7 +543,7 @@ Skipping any redefinition\MessageBreak}%
\endlist\clearpage
}
%%
-%% Copyright 2005-2013 Claudio Beccari
+%% Copyright 2005-2014 Claudio Beccari
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
@@ -531,22 +558,26 @@ Skipping any redefinition\MessageBreak}%
%% toptesi.cfg, and the English documentation toptesi.pdf.
%%
%% Furthermore the bundle contains the documentation source
-%% file toptesi-doc-xetex.tex and the derived file
-%% toptesi-doc-xetex.pdf.
+%% file toptesi-it-xetex.tex and the derived file
+%% toptesi-it-xetex.pdf.
%%
%% The toptesi-example.tex source file is just an example
%% that shows how to use the various commands; by commenting
%% or uncommenting certain source lines it is possible to
-%% typeset different kind of theses and their frontpages.
+%% typeset different kind of theses and their front pages.
+%%
+%% The topfront-example.tex source file is an example of how
+%% to produce just the title page with toptesi and the external
+%% package frontespizio.
%%
%% The toptesi.cfg file is a sample of a local configuration
%% file that can be freely edited and modified.
%%
%% By running pdflatex on toptesi.dtx the user gets the class,
%% sty and cfg files and the English documentation file in
-%% pdf format.
+%% pdf format.
%%
-%% The documentation file toptesi-doc-xetex.pdf is in Italian;
+%% The documentation file toptesi-it-xetex.pdf is in Italian;
%% its source file is another example of how to use toptesi.
%%
%% End of file `toptesi.sty'.