summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/toptesi/toptesi.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/toptesi/toptesi.dtx')
-rw-r--r--macros/latex/contrib/toptesi/toptesi.dtx41
1 files changed, 33 insertions, 8 deletions
diff --git a/macros/latex/contrib/toptesi/toptesi.dtx b/macros/latex/contrib/toptesi/toptesi.dtx
index 843f5659b1..16091dc618 100644
--- a/macros/latex/contrib/toptesi/toptesi.dtx
+++ b/macros/latex/contrib/toptesi/toptesi.dtx
@@ -10,7 +10,7 @@
\preamble
______________________________________________________
The TOPtesi bundle
- Copyright (C) 2015-2019 Claudio Beccari
+ Copyright (C) 2015-2020 Claudio Beccari
All rights reserved
License information appended
@@ -18,7 +18,7 @@
\endpreamble
\postamble
-Copyright 2005-2019 Claudio Beccari
+Copyright 2005-2020 Claudio Beccari
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -102,7 +102,7 @@ School of Turin.
\endgroup
%</internal>
%
-% Copyright 1989--2019 Claudio Beccari
+% Copyright 1989--2020 Claudio Beccari
%
% This file is part of the TOPtesi bundle
% -------------------------------------------
@@ -142,7 +142,7 @@ School of Turin.
%<topmag>\ProvidesPackage{toptesi-magistrale}[%
%<topdoc>\ProvidesPackage{toptesi-dottorale}[%
%<*driver,class,topsty,topcmn,topfrn,topscu,topmon,topsss,topmag,topdoc>
-2020-05-12 v.6.4.02
+2020-05-29 v.6.4.04
%<class>Class for typesetting university theses]
%<topsty>Extension for toptesi.cls]
%<topcmn>Additional commands for the TOPtesi bundle]
@@ -258,7 +258,7 @@ School of Turin.
%</driver>
% \fi
%
-% \CheckSum{7981}
+% \CheckSum{8000}
%
% \begin{abstract}
% This file describes the TOPtesi bundle; it consists of a set of files
@@ -3494,9 +3494,30 @@ School of Turin.
% Acknowledgements chapters, as defined above, are regularly
% typeset in the front matter style, opening on any page
% (even or odd) and possibly with folios numbered with small
-% caps roman numerals. The |\chapter*| dos not switch from
-% front to main matter; while the starred one does.
+% caps roman numerals. The |\chapter*| does not switch from
+% front to main matter; while the unstarred one does.
+% Moreover |\chapter*|, besides avoiding numbering the specific chapter,
+% inhibits its entry in the |toc| file.
+% In previous versions of this bundle the |\chapter*| command would
+% set the |secnumdepth| counter to $-3$ in a global manner. This did
+% not produce any effects while in front or back matters, except
+% avoiding the chapter entry in the |toc| file, but it inhibited
+% chapter numbering in all following chapters while in main matter.
+% This had no consequences if a final main matter unnumbered
+% chapter, such as a |Conclusions| one, or a postface had to be
+% typeset; but if numbered appendices had to conclude the main matter,
+% these could not be numbered\footnote{Thanks to Damiano Del Sarto who
+% spotted this bug.}. To avoid this “feature”, the user had to mask
+% the |\chapter*| command and its argument(s) within a group, like this:
+%\begin{flushleft}\obeylines
+%\Marg{\cs{chapter}*\oarg{header entry}\marg{chapter title}}
+%\end{flushleft}
+% With the new definition there is non need to employ such (actually
+% simple) trick, because the |secnumdepth| counter value is saved, and
+% this previous value is restored after the |\chapter| command is fully
+% completed.
% \begin{macrocode}
+\newcount\TOPsecnumdepth
\RenewDocumentCommand{\chapter}
{s O{#4} O{#2} m O{plain}}{%
\if@openright\cleardoublepage
@@ -3504,6 +3525,7 @@ School of Turin.
\thispagestyle{#5}%
\global\@topnum\z@
\@afterindentfalse
+ \TOPsecnumdepth=\c@secnumdepth
\IfBooleanTF{#1}{%
\c@secnumdepth=-3\relax
\let\iftoc\iffalse
@@ -3540,6 +3562,7 @@ School of Turin.
\@makechapterhead{#4}%
\@afterheading
\fi
+ \c@secnumdepth=\TOPsecnumdepth
}
% \end{macrocode}
% It would be possible to redefine in a similar manner also
@@ -9095,7 +9118,9 @@ This class is available in every up-to-date and complete
% \begin{macrocode}
\ifBlank{\@SSSLogo}%
{\vspace{\stretch{1}}}%
- {\includegraphics[height=30mm]{\@SSSLogo}}\par\vspace{\stretch{1}}
+ {\vspace{\stretch{1}}\setbox0\hbox{\includegraphics[height=30mm]{\@SSSLogo}}
+ \ifdim\wd0>\linewidth \resizebox{\linewidth}{!}{\box0}\else\box0\fi
+ \par\vspace{\stretch{1}}}
% \end{macrocode}
%
% The examining committee chairperson name and the Ministry