summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/toptesi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-05 23:19:37 +0000
committerKarl Berry <karl@freefriends.org>2013-11-05 23:19:37 +0000
commitbb1c53dfd5963b465b5a50b11aa9ba72589c4416 (patch)
tree71564fccb45ea99a29f2046eec0b1a1d64e10d1f /Master/texmf-dist/source/latex/toptesi
parent2fd432ec53c36370e2e19510695d2fe6c43a1521 (diff)
toptesi (5nov13)
git-svn-id: svn://tug.org/texlive/trunk@32081 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/toptesi')
-rw-r--r--Master/texmf-dist/source/latex/toptesi/toptesi.dtx438
1 files changed, 276 insertions, 162 deletions
diff --git a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx
index 2da82ca05cc..c39f2646366 100644
--- a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx
+++ b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx
@@ -3,6 +3,8 @@
\begingroup
\input docstrip.tex
\keepsilent
+
+
\preamble
______________________________________________________
The TOPtesi package
@@ -50,11 +52,12 @@ its source file is another example of how to use toptesi.
\askforoverwritefalse
-\generateFile{toptesi.cls}{t}{\from{toptesi.dtx}{class}}
-\generateFile{toptesi.sty}{t}{\from{toptesi.dtx}{topsty}}
-\generateFile{topcoman.sty}{t}{\from{toptesi.dtx}{topcmn}}
-\generateFile{topfront.sty}{t}{\from{toptesi.dtx}{topfrn}}
-\generateFile{toptesi.cfg}{t}{\from{toptesi.dtx}{topcfg}}
+\generate{\file{toptesi.cls}{\from{toptesi.dtx}{class}}
+ \file{toptesi.sty}{\from{toptesi.dtx}{topsty}}
+ \file{topcoman.sty}{\from{toptesi.dtx}{topcmn}}
+ \file{topfront.sty}{\from{toptesi.dtx}{topfrn}}
+ \file{toptesi.cfg}{\from{toptesi.dtx}{topcfg}}
+ }
\def\tmpa{plain}
\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
@@ -88,25 +91,28 @@ its source file is another example of how to use toptesi.
% \iffalse
%<*driver>
\documentclass{ltxdoc}
-\ProvidesFile{toptesi.dtx}[2013/09/01 v.5.73 Documented TeX file for
+\ProvidesFile{toptesi.dtx}[2013/09/11 v.5.75 Documented TeX file for
the TOPtesi bundle]
\GetFileInfo{toptesi.dtx}
\title{The TOPtesi bundle}
\date{\fileversion\space--- \filedate}
\author{Claudio Beccari}
-\usepackage{metalogo}
+\usepackage{metalogo,multicol}
\def\prog#1{\textsf{#1}}
\def\pack#1{\textsf{\slshape#1}}
\begin{document}\errorcontextlines=9
\maketitle
+\begin{multicols}{2}
+\tableofcontents
+\end{multicols}
\setlength\hfuzz{20pt}
\DocInput{toptesi.dtx}
\end{document}
%</driver>
% \fi
%
-% \CheckSum{2705}
+% \CheckSum{2791}
%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -709,7 +715,7 @@ the TOPtesi bundle]
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{toptesi}%
-[2013/09/01 v.5.73 Class for typesetting university theses]
+[2013/09/11 v.5.75 Class for typesetting university theses]
% \end{macrocode}
%
% The class itself is very simple since it requires just the \texttt{report} document
@@ -765,7 +771,7 @@ the TOPtesi bundle]
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{toptesi}%
-[2013/09/01 v.5.73 Extension for toptesi.cls]%
+[2013/09/11 v.5.75 Extension for toptesi.cls]%
% \end{macrocode}
%
% We start with defining the debugging macros; these trace commands and macros
@@ -1580,7 +1586,8 @@ Skipping any redefinition\MessageBreak}%
% printing the new tome title page.
% \begin{macrocode}
\newcounter{tomo}
-\newcommand*{\tomo}{\clearpage\stepcounter{tomo}\frontespizio}
+\newcommand*{\tomo}{\clearpage\stepcounter{tomo}%
+ \ifbool{classica}{\frontespizio*}{\frontespizio}}
% \end{macrocode}
% Folios as well are to be redefined and also the page styles require a redefinition so as
% to being able to use old style numbers. The macro |\lapagina| (it's not a case the this
@@ -1797,7 +1804,7 @@ Skipping any redefinition\MessageBreak}%
% \fi
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{topfront}[2013/09/01 v.5.73 Title page for TOPtesi]
+\ProvidesPackage{topfront}[2013/09/11 v.5.75 Title page for TOPtesi]
% \end{macrocode}
% Per l'uso di topfront come pacchetto autonomo bisogna verificare che l'opzione |classica|
% corrisponda ad una impostazione corretta di |\ifclassica|; siccome questo |\if| รจ definito
@@ -1812,6 +1819,59 @@ Skipping any redefinition\MessageBreak}%
}{}
% \end{macrocode}
%
+% For the title page we need a special style, in order to put some information
+% in the header and some other in the footer, without actually changing the
+% page layout, except for centering the grid horizontally in the page.
+% The headers, due to a specific request of Politecnico di Torino, is to have
+% the university logo(s) in the header; other universities maintains their
+% logo(s) in the lower part of the page as it was done all the time in the
+% past. We need the some device to switch positions to the logos, without
+% actually changing the page layout. Since the logo(s) are sort of large,
+% the header must smash the header contents, so as to avoid any modification
+% of the position and size of the other parts of the page. The |TPT@logobox| box is being denied later on and the |\logosede| command takes care of filling it up/
+% \begin{macrocode}
+\def\headstrut{\vrule \@depth4\p@ \@height\z@ \@width\z@}
+\def\ps@titlepage{\let\@mkboth\@gobbletwo
+ \def\@oddfoot{\vbox to 0.05\paperheight{\vss
+ \hbox to\hsize{\hfil{\Large{\@submitdate}}\hfil}}}%
+ \let\@evenfoot\@oddfoot
+ \def\@oddhead{
+ \vbox to\headheight{\vss
+ \hbox to\textwidth{%
+ \headstrut\hfil
+ \raisebox{3\baselineskip}{\usebox\TPT@logobox}\hfil\null%
+ }%
+ \vss
+ }%
+ }%
+ \let\@evenhead\@oddhead
+ \def\chaptermark##1{}\def\sectionmark##1{}%
+}
+% \end{macrocode}
+%
+% similarly a different title page style for typesetting the logos in the lower half of the page is defined; since it is the only style usable with the classic option, wi call it the |classica| page style:
+% \begin{macrocode}
+ \def\ps@classica{\let\@mkboth\markboth
+ \def\@oddhead{\vbox{%
+ \hbox to \hsize{\hfill {\LARGE \@ateneo}\hfill}%
+ \ifclassica
+ \hbox to \hsize{\hfil\vrule\@width\z@
+ \@height2ex\vrule\@height1.4\p@\@depth-\p@\@width50mm\hfil}%
+ \fi
+ }}%
+ \def\@oddfoot{\vbox to \dimexpr\paperheight/20\relax{\vss
+ \ifclassica
+ \hbox to \hsize{\hfil\raisebox{-.3ex}[\z@][\z@]{%
+ \vrule\@height-2.6\p@\@depth3\p@\@width\dimexpr\textwidth/3}\hfil}%
+ \fi
+ \hbox to\hsize{\hfill{\Large{\@submitdate}}\hfill}}%
+ }%
+ \let\@evenhead\@oddhead
+ \let\@evenfoot\@oddfoot
+ }%
+% \end{macrocode}
+
+%
% The title page information depends on the type of ``thesis' that is being typeset.
% The following commands specify the kind of information that is going to be typeset.
% Some boolean variables are automatically set by the commands in order to change some
@@ -2087,20 +2147,31 @@ Skipping any redefinition\MessageBreak}%
\ifcsundef{interno}{%\
\newlength\interno
\setlength\interno{\dimexpr\paperwidth/7}}{}
-\newcommand\logosede[2][\interno]{\def\@logosede{#2}\TPT@logoheight=#1}
+
+\newcommand\logosede[2][\interno]{\def\@logosede{#2}\TPT@logoheight=#1\relax
+\ifcsvoid{@logosede}{\sbox{\TPT@logobox}{}}{\begin{lrbox}{\TPT@logobox}\expandafter\fillup@TCP@logobox\@logosede,!}}
+
+\def\fillup@TCP@logobox#1,#2!{%
+ \ifblank{#1}{\end{lrbox}\ifdim\wd\TPT@logobox>\textwidth
+ \sbox\TPT@logobox{\resizebox{\textwidth}{!}{\box\TPT@logobox}}\fi}%
+ {\def\@logosede{#2}%
+ \includegraphics[height=\TPT@logoheight]{#1}\hskip\TPT@logospace
+ \expandafter\fillup@TCP@logobox\@logosede,!}}
-\newcommand\printloghi{\ifdefvoid{\@logosede}{}{%
-\begin{lrbox}{\TPT@logobox}\hskip\TPT@logospace
- \expandafter\@printloghi\@logosede,!}}
+\newcommand\printloghi{\unless\ifvoid\TPT@logobox\usebox{\TPT@logobox}\fi}
-\def\@printloghi#1,#2!{%
-\ifblank{#1}{\hskip\TPT@logospace\end{lrbox}\vspace*{\bigskipamount}%
-\leavevmode
-\ifdim\wd\TPT@logobox<\textwidth \box\TPT@logobox
-\else\resizebox{\textwidth}{!}{\box\TPT@logobox}%
-\fi}{\def\@logosede{#2}%
-\includegraphics[height=\TPT@logoheight]{#1}\hskip\TPT@logospace
- \expandafter\@printloghi\@logosede,!}}
+%\newcommand\printloghi{\ifdefvoid{\@logosede}{}{%
+%\begin{lrbox}{\TPT@logobox}\hskip\TPT@logospace
+% \expandafter\@printloghi\@logosede,!}}
+%
+%\def\@printloghi#1,#2!{%
+%\ifblank{#1}{\hskip\TPT@logospace\end{lrbox}\vspace*{\bigskipamount}%
+%\leavevmode
+%\ifdim\wd\TPT@logobox<\textwidth \box\TPT@logobox
+%\else\resizebox{\textwidth}{!}{\box\TPT@logobox}%
+%\fi}{\def\@logosede{#2}%
+%\includegraphics[height=\TPT@logoheight]{#1}\hskip\TPT@logospace
+% \expandafter\@printloghi\@logosede,!}}
\def\tutoreaziendale#1{\gdef\@tutoreaziendale{#1}}
@@ -2160,6 +2231,7 @@ Skipping any redefinition\MessageBreak}%
\newcommand\NomeSecondoTomo[1]{\gdef\SecondoTomo{#1}}
\newcommand\NomeTerzoTomo[1]{\gdef\TerzoTomo{#1}}
\newcommand\NomeQuartoTomo[1]{\gdef\QuartoTomo{#1}}
+\newcommand\IDN{\\\quad matricola:\space}
% \end{macrocode}
%
% Now we can read the configuration file if it exists; in any case what is possibly
@@ -2242,97 +2314,113 @@ Skipping any redefinition\MessageBreak}%
\@ifundefined{@InName}{\def\@InName{in}}{}
% \end{macrocode}
%
-% Finally we have the only active macro |\frontespizio|, the real macro that actually
-% typesets the title page. The macro starts with a local redefinition of the
-% \texttt{myheadings} page style; with this style the university name goes into the header,
-% while the exam date goes into the footer; in this way the information that must be typeset in
-% the title page is not crunched in too little a space and the overall text bounding box assumes
-% a shape similar to that of the page.
+% Finally we have the real macro |\frontespizio|, the real macro that actually
+% typesets the title page. Actually the macro starts with some tests in order
+% to decide if logos have to be set on topo or in the lower half of the title
+% page; if the |classica| option has been set, the logos can be typeset only
+% in the lower half of the title page, else the procedure tests if the
+% |\frontespizio command| is followed by the asterisk. The macro |\fr@ntespizio|
+% is the one that is invoked after such tests; it starts with the selection of the title page style; t local redefinition%>>>>>>
+% of the
+% \texttt{myheadings} page style or a new |titlepage| page style; with the former one
+% the university name goes into the header, while the exam date goes into the footer;
+% with the latter style, on the opposite, the university logo(s) go in the header,
+% while the Exam date remains in the footer. In this way the information that must
+% be typeset on the title page is not crunched in too little a space and the overall
+% text bounding box assumes a shape similar to that of the page.
%
% Everything is closed within a group so all definitions remain local.
% \begin{macrocode}
-\gdef\frontespizio{%
+\newif\iftopTPTlogos
+\def\frontespizio{%
+ \ifbool{classica}{\topTPTlogosfalse\fr@ntespizio}% else
+ {\@ifstar{\topTPTlogosfalse\fr@ntespizio}%
+ {\topTPTlogostrue\fr@ntespizio}}}
+
+\def\fr@ntespizio{%
\begingroup
- \def\ps@myheadings{\let\@mkboth\markboth
- \def\@oddhead{\vbox{%
- \hbox to \hsize{\hfill {\LARGE \@ateneo}\hfill}%
- \ifclassica
- \hbox to \hsize{\hfil\vrule\@width\z@
- \@height2ex\vrule\@height1.4\p@\@depth-\p@\@width50mm\hfil}%
- \fi
- }}%
- \def\@oddfoot{\vbox to \dimexpr\paperheight/20\relax{\vss
- \ifclassica
- \hbox to \hsize{\hfil\raisebox{-.3ex}[\z@][\z@]{%
- \vrule\@height-2.6\p@\@depth3\p@\@width\dimexpr\textwidth/3}\hfil}%
- \fi
- \hbox to\hsize{\hfill{\Large{\@submitdate}}\hfill}}%
- }%
- \let\@evenhead\@oddhead
- \let\@evenfoot\@oddfoot
- }%
+ \iftopTPTlogos
+ \thispagestyle{titlepage}
+ \else
+ \thispagestyle{classica}
+ \fi
% \end{macrocode}
%
% We want also the title page to be set in the middle of the page irrespective of
% the binding correction; so we assign the average of the two side margins to each margin.
% \begin{macrocode}
- \advance\oddsidemargin \evensidemargin
- \divide\oddsidemargin \tw@
+ \oddsidemargin=\dimexpr(\oddsidemargin+\evensidemargin)/2\relax
\evensidemargin \oddsidemargin
% \end{macrocode}
%
-% We select the \texttt{myheadings} page style; the |\null| command inserts a void horizontal
-% box into the vertical list; it is useful to act as a block against which the vertical glue
-% pushes for setting the subsequent material. The normal font is chosen in case preceding
+% The |\null| command inserts a void horizontal box into the vertical list;
+% it is useful to act as a block against which the vertical glue pushes for
+% setting the subsequent material. The normal font is chosen in case preceding
% commands did change the font characteristics.
% \begin{macrocode}
- \thispagestyle{myheadings}%
\null\setcounter{page}{1}%
\normalfont
% \end{macrocode}
-% The generic university name is already in the header; if it is non blank the first thing
+% The generic university name should already be in the header either in the logo
+% or in the header text; but in spite of this we test if the university generic
+% name macro is void, if it contains something, then we typeset also the generic
+% name; some candidates might obey to university regulations require the name
+% of the university be at the top, just under the logo. The switch |\ifcsvoid|
+% is true if |@ateneo| is empty or blank, false otherwise
+% \begin{macrocode}
+\iftopTPTlogos
+ \ifcsvoid{@ateneo}{}{%
+ {\centering\LARGE \@ateneo\par}\bigskip
+ }
+\fi
+% \end{macrocode}
+
+
+%if it is non blank
+% the first thing
% we set in the page is the university proper name and some vertical glue.
% \begin{macrocode}
\ifx\@nomeat\empty \else
- {\vspace*{-1.5\baselineskip}\centering
+ {%
+ \centering
{\Large \@nomeat}\par}\vfill
\fi
% \end{macrocode}
-% Then the faculty name comes next; but for the doctoral school it uses the doctoral school
-% name entered with |\scuoladidottorato|, otherwise it inserts the faculty ordinal number or
-% prefix and name already entered with the optional and required arguments of |\facolta|.
+% Then the faculty name comes next; but for the doctoral school it uses the doctoral
+% school name entered with |\scuoladidottorato|, otherwise it inserts the faculty
+% ordinal number or prefix and name already entered with the optional and required
+% arguments of |\facolta|.
% \begin{macrocode}
\begin{center}
{\rmfamily\mdseries
\ifdottorato
\large \@phdschool\par\medskip
\else
- \unless\ifx\@faculty\empty
+ \ifcsvoid{@faculty}{}{%
\LARGE\ifx\@facnumber\empty\else\@facnumber\space\fi
\@faculty\@facname\par\medskip
- \fi%
+ }
\fi
}%
% \end{macrocode}
-% Further specification: it inserts the field of the PhD research or the degree course name;
-% for example it inserts the line ``Philosophy Degree in Applied Tetratricotomy~--~XVI~cycle''
-% or ``Master of Science in Applied Tetratricotomy''.
+% Further specification: it inserts the field of the PhD research or the degree course
+% name; it inserts a line such as, for example, ``Philosophy Degree in Applied
+% Tetratricotomy~--~XVI~cycle'' or ``Master of Science in Applied Tetratricotomy''.
% \begin{macrocode}
- \ifx\@corso\empty \else{\large
+ \ifcsvoid{@corso}{}{{\large
\ifdottorato
\@PhDname\@corso\ifx\@ciclo\empty\else~--~\@ciclo\fi
\else
\@laureaname\@corso
\fi
- \par}
- \fi
+ \par}}
\end{center}
% \end{macrocode}
-% It now centers the name of the report, be it ``Doctoral Dissertation'' or ``Master Thesis''
-% or whatever; in case the command |\materia| was used, it then centers the area which the
-% thesis deals with.
+% It now centers the name of the report, be it ``Doctoral Dissertation'' or ``Master
+% Thesis'' or whatever; in case the command |\materia| was used, it then centers
+% the area which the thesis deals with.
% \begin{macrocode}
- \vfill
+ \vspace{\stretch{0.2}}
\begin{center}
\LARGE
\ifdottorato
@@ -2349,25 +2437,29 @@ Skipping any redefinition\MessageBreak}%
\fi
\end{center}
% \end{macrocode}
-% Next comes the real title entered with |\titolo| or |\monografia| and the possible subtitle.
+%
+% Next comes the real title entered with |\titolo| or |\monografia| and the possible
+% subtitle.
% \begin{macrocode}
- \vfill
+ \vspace{\stretch{0.2}}
\begin{center}
{\huge\bfseries \baselineskip=0.95em plus 1pt
\@title \par}
\end{center}
-% con l'eventuale sottotitolo
+% \end{macrocode}
+% con l'eventuale sottotitolo:
+% \begin{macrocode}
\ifx\@subtitle\empty \else
\begin{center}%
\large\textrm{\@subtitle}\par
\end{center}%
\fi
% \end{macrocode}
-% If the option \texttt{classica} is in force the thesis might be divided in several volumes;
-% theses in humanities are apparently often oversized. In this case the |\frontespizio|
-% command may be given at the beginning of every volume and the counter \texttt{tomo} is
-% stepped up; the volume number is therefore printed in each title page; the infix string
-% may be redefined as it was shown above.
+% If the option \texttt{classica} is in force the thesis might be divided in several
+% volumes; theses in humanities are apparently often oversized. In this case the
+% |\frontespizio| command may be given at the beginning of every volume and the
+% counter \texttt{tomo} is stepped up; the volume number is therefore printed in
+% each title page; the infix string may be redefined as it was shown above.
% \begin{macrocode}
\ifclassica
\ifnum\value{tomo}>\z@
@@ -2382,20 +2474,26 @@ Skipping any redefinition\MessageBreak}%
\else
\PackageWarning{toptesi}{%
Counter tomo equals \the\c@tomo\MessageBreak
- It was not considered a thesis might get
+ We never considered a thesis might get
divided in more than four volumes}%
\fi}}%
\fi
+ \vspace{1em}
\fi
\par
% \end{macrocode}
-% Going down in the title page now comes the optional insertion of the university logo(s);
-% this is a simple task once |\@logosede| has been defined, and this was done either with
-% an explicit command |\logosede| with its argument in the preamble, or a specific line
-% in the configuration file. If the internal |\@logosede| list is empty, the already
-% defined |\printloghi| macro does not do anything.
+% Going down in the title page, now comes the optional insertion of the university
+% logo(s);``optional'' in both meanings: lone or more university logos are not generally
+% required in a thesis, and in case it depends if the logo(s) have to be put in the
+% header or here.
+% This is a simple task since the |\logosede| already defined the contents to the box
+% |\TPT@logobox|, and this was done either with % an explicit command |\logosede|
+% with its argument in the preamble, or with a specific line in the configuration file.
+% If such box |\TPT@logobox| is void, the already defined |\printloghi| macro does
+% not do anything.
% \begin{macrocode}
- {\centering \printloghi\par}
+ \unless\iftopTPTlogos
+ {\centering \printloghi\par}\fi
% \end{macrocode}
%
% The final task is to typeset the possible supervisors' names, the candidates' names
@@ -2413,60 +2511,82 @@ Skipping any redefinition\MessageBreak}%
\ifdottorato
\edef\@nomerelatore{\@PhDdirector}%
\else
- \ifx\@principaladviser\empty\else
- \def\@nomerelatore{\Relatore:}%
- \fi
+ \ifcsvoid{@principaladviser}{}{%
+ \def\@nomerelatore{\Relatore}}
\unless\ifclassica
- \ifx\@secondadviser\empty \else
- \def\@nomerelatore{\Relatori:}%
- \fi
+ \ifcsvoid{@secondadviser}{}{%
+ \def\@nomerelatore{\Relatori}}%
\fi
\fi
\fi
% \end{macrocode}
-% Similarly the label names for the exam candidates are chosen; in Italian the names are infix
-% strings that are selected according the gender and the number; if these labels have to be
-% set in a different language it is necessary to define one string that has to be selected by
-% the user according to number and gender. The label for the PhD candidate is left empty.
+% Similarly the label names for the exam candidates are chosen; in Italian such
+% names are infix strings that are selected according the gender and the number;
+% if these labels have to be set in a different language it is necessary to define
+% one string that has to be selected by the user according to number and gender.
+% The label for the PhD candidate is left empty.
% \begin{macrocode}
\ifdottorato
\let\@nomecandidato\empty
\else
- \iflanguage{italian}{%
+ \iflanguage{italian}{%
\iffemminile
- \def\@nomecandidato{\Candidata:}%
+ \def\@nomecandidato{\Candidata}%
\else
- \def\@nomecandidato{\Candidato:}%
+ \def\@nomecandidato{\Candidato}%
\fi
- \ifx\@secondauthor\empty \else
+ \ifcsvoid{@secondauthor}{}{%
\iffemminile
- \def\@nomecandidato{\Candidate:}%
+ \def\@nomecandidato{\Candidate}%
\else
- \def\@nomecandidato{\Candidati:}%
- \fi
- \fi}{}
- \fi
+ \def\@nomecandidato{\Candidati}%
+ \fi}
+ }{}%
+ \fi
% \end{macrocode}
%
-% For the supervisor(s) and of the candidate(s) name(s) a different approach is used for
-% each one of the three categories of theses. If a bachelor degree report is dealt with, the
-% name of the \emph{only} candidate is centered and written in caps-and-small-caps.
+% For the supervisor(s) and of the candidate(s) name(s) a different approach
+% is used for each one of the three categories of theses. If a bachelor degree
+% report is dealt with, the name of the \emph{only} candidate is centered and
+% written in caps-and-small-caps.
% \begin{macrocode}
\iflaureatriennale
\begin{center}%
\large\mdseries\textsc{\@author}
\end{center}%
% \end{macrocode}
-% For doctoral and master theses two virtual boxes (actually macros) are filled up so as to
-% align the supervisor name(s) and, in a second virtual box, the candidate name(s). The label is
-% set in the first line with proper number and gender; in the second line the first name, and
-% in the subsequent lines, if there are any, the other names. These virtual boxes actually
-% contain a tabular environment each; these environments shall be actually typeset when these
-% virtual box macros are executed. If the \texttt{classica} option is in force no label is set
-% over the principal advisor name, but a label is set over the co-advisor name(s). The type
-% size is also a little different for the \texttt{classica} option. The |\protect| command
-% is used to protect the names in case they contain accent macros that might be expanded at
-% the wrong moment.
+% For doctoral and master theses two virtual boxes (actually macros) are filled
+% up so as to align the supervisor name(s) and, in a second virtual box,
+% the candidate name(s). The label is set in the first line with proper number
+% and gender; in the second line the first name, and in the subsequent lines,
+% if there are any, the other names. These virtual boxes actually contain a tabular
+% environment each; these environments shall be actually typeset when these virtual
+% box macros are executed. If the \texttt{classica} option is in force no label is
+% set over the principal advisor name, but a label is set over the co-advisor name(s).
+% The type size is also a little different for the \texttt{classica} option. The
+% |\protect| command is used to protect the names in case they contain accent macros
+% that might be expanded at the wrong moment.
+% The candidate name(s) are typeset in another nested tabular environment of two
+% lines when the user typesets the entry in such a way:
+%\begin{verbatim}
+%\candidato{Mario Rossi \IDN 123456}
+%\end{verbatim}
+% where if just the name is used or the command |\IDN| is omitted but the
+% the ID number is entered, the whole string is written in one line without
+% any label before e the ID number; if, on the other side, the |\IDN| command
+% is redefined as not to produce a new line and the ID number is entered, the
+% latter is typeset in a new line after the candidate's name. By default the
+% |\IDN| macro is defined as:
+%\begin{verbatim}
+%\newcommand{\IDN}{\\\quad matricola:\space}
+%\end{verbatim}
+% but with |\renewcommand| the user can redefine it as s/he prefers, in
+% particular by changing the Italian name into a proper English one, may be
+% simply `ID'. It is necessary to recall that the ID number must be entered
+% only if required by the University regulations; il must not be typeset in
+% the title page just because it is possible to do it. If no number is entered,
+% the |\IDN| must not be used.
+
% \begin{macrocode}
\else
% Per laurea e dottorato con relatori e correlatori...
@@ -2493,60 +2613,54 @@ Skipping any redefinition\MessageBreak}%
\end{tabular}%
}%
% \end{macrocode}
-% A similar approach is taken for the candidate name(s)
+% A similar approach is taken for the candidate name(s),although for code
+% clarity I prefer to define two secondary macros in order to format the
+% other candidates names and ID in the clearer way.
% \begin{macrocode}
+ \def\print@secondocandidato{\\\relax
+ \hbox{\large\tabular{@{}l@{}}\@secondauthor\endtabular}}
+ \def\print@terzocandidato{\\\relax
+ \hbox{\large\tabular{@{}l@{}}\@thirdauthor\endtabular}}
\def\BoxCandidati{%
\begin{tabular}[t]{l}%
\hbox{\unless\ifclassica\large\fi
\textbf{\protect\@nomecandidato}}\\[.6ex]
- \hbox{\large\textrm{\protect\@author}}%
- \ifx\@secondauthor\empty
- \else
- \\\hbox{\large\textrm{\protect\@secondauthor}}%
- \fi
- \ifx\@thirdauthor\empty
- \else
- \\\hbox{\large\textrm{\protect\@thirdauthor}}%
- \fi
+ \hbox{\large\tabular{@{}l@{}}\@author\endtabular}%
+ \ifcsvoid{@secondauthor}{}{\print@secondocandidato}%
+ \ifcsvoid{@thirdauthor}{}{\print@terzocandidato}%
\end{tabular}%
}%
% \end{macrocode}
-% The real typesetting of these name lists takes place now; if the thesis is referred to the
-% PhD school one type of layout is used, otherwise the default master thesis layout is used;
-% remember that the bachelor degree case has already taken place. For the doctoral
-% dissertation the doctoring person name is typeset centered in one line by itself and
-% everything else is set 3em below into a three column table extended to the |\hsize|, the
-% first line containing the person labels and the second line containing the true names. The
-% central column is used just for spacing, but it does not contain anything.
+% The real typesetting of these name lists takes place now; if the thesis is
+% referred to the PhD school one type of layout is used, otherwise the default
+% master thesis layout is used; remember that the bachelor degree case has
+% already taken place. For the doctoral dissertation the doctoral candidate name
+% is typeset centered in one line by itself and everything else is set 3em below
+% into a three column table extended to the |\hsize|, the first line containing
+% the person labels and the second line containing the true names. The central
+% column is used just for spacing, but it does not contain anything.
% \begin{macrocode}
\ifdottorato
\begin{center}\large
\textbf{\@author}\\[3em]
{\normalsize
- \begin {tabular*}{\hsize}{@{\extracolsep{\fill}}ccc}
- \ifx\@tutore\empty\else
- \textbf{\Tutore}
- \fi
- &\relax&
- \ifx\@principaladviser\empty\else
- \textbf{\@nomerelatore}
- \fi
- \\
- \ifx\@tutore\empty\else
- \@tutore
- \fi
- &\relax&
- \ifx\@principaladviser\empty\else
- \@principaladviser
- \fi
- \end{tabular*}
+ \begin {tabular*}{\hsize}{@{\extracolsep{\fill}}ccc}
+ \ifcsvoid{@tutore}{}{\textbf{\Tutore}}
+ &\relax&
+ \ifcsvoid{@principaladviser}{}{\textbf{\@nomerelatore}}
+ \\
+ \ifcsvoid{@tutore}{}{\@tutore}
+ &\relax&
+ \ifcsvoid{@principaladviser}{}{\@principaladviser}
+ \end{tabular*}
}%
\end{center}
\else
% \end{macrocode}
-% For the master thesis the two virtual boxes are set one besides the other but skewed so that
-% to the right or, respectively, to the left of every name there is enough space for the
-% signature. With the \texttt{classica} option in force the two boxes are simply aligned.
+% For the master thesis the two virtual boxes are set one besides the other but
+% skewed so that to the right or, respectively, to the left of every name there
+% is enough space for the signature. With the \texttt{classica} option in force
+% the two boxes are simply aligned.
% \begin{macrocode}
\unless\ifclassica
\begin{flushleft}%
@@ -2554,7 +2668,8 @@ Skipping any redefinition\MessageBreak}%
\end{flushleft}\par\vspace*{-1.5\baselineskip}
\begin{flushright}%
\BoxCandidati
- \end{flushright}\else
+ \end{flushright}%
+ \else
\noindent
\makebox[\textwidth]{\BoxRelatori\hfill\BoxCandidati}\par
\fi
@@ -2563,11 +2678,10 @@ Skipping any redefinition\MessageBreak}%
% \end{macrocode}
% The final item is the optional name of the company supervisor.
% \begin{macrocode}
-\ifx\@tutoreaziendale\@empty\else
+\ifcsvoid{@tutoreaziendale}{}{%
\vfill\vfill
{\centering \textbf{\@tutoreaziendalename}\\[.6ex]
- \@tutoreaziendale\par}
-\fi
+ \@tutoreaziendale\par}}
% \end{macrocode}
% All the material now is on the page; we put some more vertical glue and handle the
% copyright page; then we close the page sending it to the output file; the final
@@ -2579,7 +2693,7 @@ Skipping any redefinition\MessageBreak}%
% text flush bottom with the text block, and then we ship out also this copyright page.
% \begin{macrocode}
\par\clearpage
- \ifdefempty{\@retrofrontespizio}{}%
+ \ifcsvoid{@retrofrontespizio}{}%
{\null\vfill\pagestyle{empty}\@retrofrontespizio\par\clearpage}%
\endgroup}
% \end{macrocode}
@@ -2637,7 +2751,7 @@ Skipping any redefinition\MessageBreak}%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e
\ProvidesPackage{topcoman}%
- [2013/09/01 v.5.73 Additional commands for the TOPtesi bundle]
+ [2013/09/11 v.5.75 Additional commands for the TOPtesi bundle]
% \end{macrocode}
% The new command |\DeclareSlantedCapitalGreekLetters| optionally sets the capital
% Greek letters in math mode with the glyphs taken from the math italic fonts, not from