From e9805aaf4506dafaec45f9d494f668cb2184ef2d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 15 Oct 2014 22:21:21 +0000 Subject: toptesi (15oct14) git-svn-id: svn://tug.org/texlive/trunk@35379 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/toptesi/toptesi.dtx | 630 ++++++++++++--------- 1 file changed, 369 insertions(+), 261 deletions(-) (limited to 'Master/texmf-dist/source/latex/toptesi') diff --git a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx index b6f86db134f..5ea70162b84 100644 --- a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx +++ b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx @@ -8,7 +8,7 @@ \preamble ______________________________________________________ The TOPtesi package - Copyright (C) 2013 Claudio Beccari + Copyright (C) 2014 Claudio Beccari All rights reserved License information appended @@ -16,7 +16,7 @@ \endpreamble \postamble -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 @@ -31,22 +31,26 @@ toptesi.cls, toptesi.sty, topfront.sty, topcommand.sty, 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. \endpostamble @@ -91,7 +95,7 @@ its source file is another example of how to use toptesi. % \iffalse %<*driver> \documentclass{ltxdoc} -\ProvidesFile{toptesi.dtx}[2014/09/15 v.5.77 Documented TeX file for +\ProvidesFile{toptesi.dtx}[2014/10/15 v.5.81 Documented TeX file for the TOPtesi bundle] \GetFileInfo{toptesi.dtx} \title{The TOPtesi bundle} @@ -112,7 +116,7 @@ the TOPtesi bundle] % % \fi % -% \CheckSum{2787} +% \CheckSum{2870} % %% \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 @@ -132,39 +136,39 @@ the TOPtesi bundle] % % \begin{abstract} % This file describes the TOPtesi bundle; it is a set of files designed to -% typeset with \LaTeX\ a university final report that in Italian is generally +% typeset a university final report that in Italian is generally % called ``tesi''; it was originally developed at the Technical University % of Turin (Politecnico di Torino) but it was adapted for typesetting theses in any % Italian university. Well\dots\ since the Erasmus student mobility is very % extended and many Italian students participate in the so called \textit{double degree} % programs, their theses, or whatever they are called in other countries, % may be typeset so as to comply also with the host university rules; therefore this -% set of files has the ambition to be suited for typesetting theses in any university in the -% world\dots\ This ambition can't be fulfilled, though, because of the complexity of the -% title page (and possibly of the legal page) requirements. This version is experimentally -% compliant with the \XeLaTeX\ program. Up to now the few conflicts that have been spotted -% have been solved with suitable corrections or additions. The most important feature with -% XeLaTeX is that the option pdfa cannot be used any more, because it resorts to a -% compilation with pdf\LaTeX; the typesetting engine \XeTeX\ does not produce directly -% any PDF output but a modified, extended DVI output, even if this format is immediately -% transformed into a PDF file through a special version, xdvipdfmx, of the conversion -% program. Another minor XeLaTeX feature is that it cannot fully exploit the -% typesetting facilities of the micro type package, but the wide choice of -% OpenType fonts replaces almost completely such missing feature. +% set of files has the ambition to be suited for typesetting theses in any university +% in the world\dots\ This ambition can't be fulfilled, though, because of the complexity +% of the title page (and possibly of the legal page) requirements. This version is +% experimentally compliant with the \XeLaTeX\ and the \LuaLaTeX\ programs. Up to now +% the few conflicts that have been spotted have been solved with suitable corrections +% or additions. The most important feature with \XeLaTeX\ is that the option pdfa +% cannot be used any more, because it resorts to a compilation with pdf\LaTeX; +% the typesetting engine \XeTeX\ does not produce directly any PDF output but +% a modified, extended DVI output, that is immediately converted into a PDF file +% through xdvipdfmx, a special version of the conversion program. Another minor +% \XeLaTeX\ feature is that it cannot fully exploit the typesetting facilities +% of the microtype package, but the wide choice of OpenType fonts replaces almost +% completely such missing features. % \end{abstract} % % \section{Introduction} % The TOPtesi bundle contains a certain number of files, specifically -% \begin{itemize} +% \begin{enumerate} % \item a class file \texttt{toptesi.cls} to be used as the main document class; the main % document may be any of a certain number of reports that in Italy % are called with various names: ``monografia'', ``monografia di laurea'', % ``tesi di laurea'', ``tesi di laurea specialistica'', ``tesi di laurea % magistrale'', ``tesi di dottorato'', ``dissertazione di dottorato'', and so on. -% All these documents have in common the fact that they all conclude a period of university -% education. Moreover since they may conclude a double degree university program, they may -% receive foreign names such as, for example, ``Projet de fin d'\'etudes'', -% ``Master thesis'', and the like. +% All these documents have in common the fact that they all conclude a period of +% university education. Moreover since they may conclude a double degree university +% program, they may receive foreign names such as, for example, ``Projet de fin d'\'etudes'', ``Master thesis'', and the like. % \item An extension package \texttt{toptesi.sty} that contains most of the code % for the real typesetting; it might be used as an extension to the report class file, % although this use is discouraged. @@ -173,6 +177,11 @@ the TOPtesi bundle] % independent extension package to be added to, say, the report class file for % typesetting just the title page; this file might be used as a template for setting % up the title page fixed information in languages different from Italian. +% This package is part of the bundle, but it is loaded automatically only if +% the user did not specify the class option |usefrontespizio|; if this option +% is specified the user is free to use whotever other external package s/he +% prefers in order to typeset the tile page; in this case we suggest to use +% the package |frontespizio| and we address the user to its documentation. % \item A third extension package \texttt{topcoman.sty} that defines a certain number % of user commands suitable for typesetting technical matters. % \item Previous version of this bundle contained also the logos of a certain number of @@ -180,39 +189,43 @@ the TOPtesi bundle] % Every one who is working on his/her degree course final report must retrieve the % logo of his/her university, but s/he should pay attention to use it according % to the rules and limitations of the university. -% \item A documentation file \texttt{toptesi-doc-xetex.pdf} written in Italian where -% every feature is explained in detail; essential information is given in this English -% documentation. The source file of the documentation \texttt{toptesi-doc-xetex.tex} -% may be used as a sample or template for typesetting one's thesis with XeLaTeX. -% \end{itemize} +% \item A documentation file \texttt{toptesi-it-xetex.pdf} written in Italian +% where every feature is explained in detail; essential information is given +% in this English documentation. The source file of the documentation +% \texttt{toptesi-it-xetex.tex} may be used as a sample or template for +% typesetting one's thesis with XeLaTeX. +% \end{enumerate} % % The above files are complemented with a configuration file that any user may -% customize at will; these customizations make it easy to configure the +% customise at will; these customisations make it easy to configure the % bundle so as to make it suitable for another language; in facts the -% \textsf{babel} and \textsf{polyglossia} packages contain localizations +% \textsf{babel} and \textsf{polyglossia} packages contain localisations % for many languages, but such localizations deal with the standard infix % \LaTeX\ names and phrases and do not cope with the thesis title page requirements. -% -% TOPtesi was specifically conceived for typesetting theses with the \LaTeX\ mark-up, and -% initially was using the \textsf{tex} typesetting engine; later on this engine was -% substantially substituted by the \textsf{pdftex} engine, which was capable of direct -% output of PDF files. Since about 2006 the typesetting engine \XeTeX\ is available; the -% most important feature of this engine is its capability of using OpentType fonts, -% among which those that are available to the operating system of the specific -% platform where the document is being typeset. For what concerns theses this -% might be of essential importance when the thesis deals with specific languages -% that use different scripts (Greek, Russian, Bulgarian, Chinese, Japanese, -% Korean, Arabic, Farsi, Thai, and so on). +% This customisation is usable only if Non |usefrontespizio| option had been +% declared to the class. +% +% TOPtesi was specifically conceived for typesetting theses with the \LaTeX\ mark-up, +% and initially it was using the \textsf{tex} typesetting engine; later on this engine +% was substantially substituted by the \textsf{pdftex} engine, which was capable +% of direct output of PDF files. Since about 2006 the typesetting engine \XeTeX\ +% is available; the most important feature of this engine is its capability +% of using OpentType fonts, among which those that are available to the +% operating system of the specific platform where the document is being typeset. +% For what concerns theses this might be of essential importance when the thesis +% deals with specific languages that use different scripts (Greek, Russian, +% Bulgarian, Chinese, Japanese, Korean, Hebrew, Arabic, Farsi, Thai, and so on). % % This version of TOPtesi has been tested with \XeLaTeX. Some conflicts have % been spotted and solved; may be there are still hidden ones, so that feedback -% from users is particularly welcome. The only main drawback still present when running -% \XeLaTeX\ is the fact that this program cannot still \emph{directly} produce the output -% file in PDF format, although it automatically transforms its specific output file into -% PDF format. This implies that the specific \textsf{pdftex} features required to produce -% a PDF/A compliant output PDF file suitable for long term archiving cannot be used. But -% with some attention the PDF file output by \XeLaTeX\ may be converted to PDF/A by using -% the program \prog{ghostscript}. +% from users is particularly welcome. The only main drawback still present +% when running \XeLaTeX\ is the fact that this program cannot still +% \emph{directly} produce the output file in PDF format, although it +% automatically transforms its specific output file into PDF format. This +% implies that the specific \textsf{pdftex} features required to produce +% a PDF/A compliant output PDF file suitable for long term archiving cannot +% be used. But with some attention the PDF file output by \XeLaTeX\ may be +% converted to PDF/A by using the program \prog{ghostscript}. % % \section{User commands} % The \texttt{toptesi.cls} is basically an extension of the standard class @@ -222,7 +235,7 @@ the TOPtesi bundle] % to typeset the thesis with the quality of a \LaTeX\ well typeset document, % not as a typewriter written one. % -% Theses very often are full of specialized material: formulas, diagrams and pictures, +% Theses very often are full of specialised material: formulas, diagrams and pictures, % texts written in non latin alphabets, special symbols for philological mark-up, and % the like; a common typewriter would not be suitable and the quality of the contents % requires professional typesetting; this is why I strongly believe that instructions @@ -234,13 +247,28 @@ the TOPtesi bundle] % than A4 or letter paper. With smaller paper sizes the layout changes % automatically, but the title page might require some more attention. The % default paper size is A4, but the user can seta any paper size among those -% accepted by the |report| standard class. -% -% Most new commands refer themselves to the information that should be typeset in the -% title page; some class options specify special stylistic page details; the rest is simple -% and traditional \LaTeX\ mark-up as it is implemented in the \LaTeX\ kernel and in the -% report document class. If \XeLaTeX\ has to be used, some essential preamble specific -% commands are to be used, but essentially the body of the thesis has the same mark-up. +% accepted by the |report| standard class. If the |usefrontespizio| option +% was specified and the package |frontepsizio| was loaded by the user, it +% is necessary to remind that it can easily create pretty nice title pages, but only +% either on A4 paper or on a paper format that mimics that of the famous book +% \emph{Elements of typographic style} by Robert Bringhurst; this is so at +% least with |frontespizio|'s version 1.4a of 2011/09/21 or earlier. +% +% Therefore if you want to typeset your thesis while typesetting the title +% page by means of the functionalities of package |frontespizio| you have +% to follow carefully how to use that package's options in the proper way +% as to bypassa the two fixed formats that it can produce; May be when you +% happen to use the TOPtesi bundle, the author of |frontespizio| has already +% extended his package in order to let it recognise the various paper formats +% used for the rest of the thesis. See also the Italian documentation contained +% in the document |toptesi-it-xetex.pdf|. +% +% Most new commands refer themselves to the information that should be typeset +% in the title page; some class options specify special stylistic page details; +% the rest is simple and traditional \LaTeX\ mark-up as it is implemented in +% the \LaTeX\ kernel and in the report document class. If \XeLaTeX\ has to be +% used, some essential preamble specific commands are to be used, but essentially +% the body of the thesis has the same mark-up. % % \subsection{Class options} % The class accepts all the options accepted by the |report| document class @@ -283,15 +311,33 @@ the TOPtesi bundle] % % \Item[oldstyle] Also this option works only if \texttt{classica} had already been % specified; it typesets several numerical data with the old style numbers. +% +% \Item[usefrontespizio] allows the user to load a different package for +% creating and typesetting the title page; of course if this option is +% specified, the native package |topfront| is not loaded, and the commands +% described in the next section are not available. On the opposite commands available +% with the chosen package become available, while possible package conflicts are +% eliminated at the root. +% +% \Item[noTOPfront] is basically equivalent to the previous option; both +% options set up the |\ifTOPfront| switch that is more mnemonic than the long +% (actually not defined) |\iffrontespizio| one; actually |\ifTOPfront| would +% be true when |\iffrontespizio| is false. % \end{description} % % \subsection{Title page commands} -% The user must specify a certain number of commands in order to have the +% Note: Skip this section if you decide to load an external package for +% the title~page. Notice also that if you want to load an external package for +% typesetting the title page, you should load it \emph{after} specifying +% the input encoding you use for your text files.\bigskip +% +% \noindent The user must specify a certain number of commands in order to have the % title page contain all the required information. It must be specified that % most of these commands may be used in the configuration file so as to avoid repeating % the same data for different ``reports''; well, a university student might write a % bachelor's ``monografia'', then a master thesis and finally a doctoral dissertation; % why should s/he repeat his/her name, the name of the institution, and so on? +% % All the user commands for the title page redefine default values or strings; % therefore if none of the required information is given, the default values and strings % are typeset, possibly with hilarious results\dots @@ -321,26 +367,29 @@ the TOPtesi bundle] % \Item[direttore] gets the name of the Doctoral School Director % \Item[coordinatore] gets the name of the Doctoral School Coordinator % \Item[QualificaDirettore] gets the phrase that describes the director or coordinator -% official position; by using the command \cs{direttore} the default phrase +% official position; by using the command \cs{direttore} the +% default phrase % ``Direttore della Scuola di Dottorato'' is printed above the % ``director's'' name; % if \cs{coordinatore} is used the default phrase ``Coordinatore della -% Scuola di Dottorato'' is printed instead. If neither one is applicable or a -% description in another language is required, this macro is available for +% Scuola di Dottorato'' is printed instead. +% If neither one is applicable or a description +% in another language is required, this macro is available for % specifying such position. % \Item[relatore] gets the name of the thesis first supervisor % \Item[secondorelatore] gets the name of the second supervisor % \Item[terzorelatore] gets the name of the third supervisor; it is assumed that the % number of supervisors never exceeds three. -% \Item[tutore] gets the name of the doctorate tutor; there is no difference with regards -% to the \cs{relatore}, but the default phrase ``Tutore'' is printed above -% this person's name. -% \Item[TutorName] gets the phrase that describes the tutor position, possibly in a different -% language. +% \Item[tutore] gets the name of the doctorate tutor; there is no difference +% with regards to the \cs{relatore}, but the default phrase +% ``Tutore'' is printed above this person's name. +% \Item[TutorName] gets the phrase that describes the tutor position, possibly +% in a different language. % \Item[AdvisorName] gets the string that qualifies the supervisor(s); the default string -% is ``Relatore:'' or ``Relatori:'' for the plural; in another language -% this command is used to define the string, say, ``Supervisors:'' if the -% thesis has been supervised by more than one person. +% is ``Relatore:'' or ``Relatori:'' for the plural; +% in another language this command is used to define the string, +% say, ``Supervisors:'' if the thesis has been supervised +% by more than one person. % \Item[CoAdvisorName] gets the string that qualifies the co-supervisor(s); the default % string is ``Correlatore:'' or ``Correlatori:'' in the plural; this % command may be used to define the string, say, ``Corapporteur:'' in a @@ -352,20 +401,20 @@ the TOPtesi bundle] % \Item[terzocandidato] gets the name of the third male author % \Item[terzacandidata] gets the name of the third female author; most often the thesis % author is just one person; but there are some institutions where group -% final works are accepted; it is assumed that the group does not contain more -% than three authors. The specification of the gender allows the software -% to determine the correct labeling phrase in the proper gender and proper -% number. +% final works are accepted; it is assumed that the group does not contain +% more than three authors. The specification of the gender allows the +% software to determine the correct labelling phrase in the proper +% gender and proper number. % For different languages there might be no difference in gender but % there is a difference in the plural ending. % \Item[CandidateName] gets the string that describes the student status in a foreign % language or even in Italian; the default string is ``Candidato:'' (with % colons) adjusted to masculine or feminine, singular or plural; with the % option \texttt{classica} the string becomes ``Laureando:''; in other -% languages it is necessary to specify this string in the proper gender and -% number. -% \Item[sedutadilaurea] gets the date of the final exam, or presentation, or defense of the -% thesis; if this date is omitted the default date is the current +% languages it is necessary to specify this string in the proper gender +% and number. +% \Item[sedutadilaurea] gets the date of the final exam, or presentation, or defense +% of the thesis; if this date is omitted the default date is the current % month and year in Italian. % \Item[esamedidottorato] an alias for \cs{sedutadilaurea} to be used for doctoral % dissertations. @@ -373,31 +422,33 @@ the TOPtesi bundle] % \Item[CycleName] redefines the string that expresses the name of the doctoral cycle; % by default this is ``ciclo'' but this command is useful to set the % name in a different language. -% \Item[corsodilaurea] gets the proper name of the degree course; the phrase that describes -% the degree course is specified, if necessary, with the following -% command; with this one you specify just, say, ``Electrical Engineering'' +% \Item[corsodilaurea] gets the proper name of the degree course; the phrase that +% describes the degree course is specified, if necessary, with the +% following command; with this one you specify just, say, +% ``Electrical Engineering'' % \Item[CorsoDiLaureaIn] gets the generic name of the degree course, for example -% ``Bachelor Degree in'' +% ``Bachelor Degree in\textvisiblespace'' % \Item[TesiDiLaurea] gets the generic phrase that describes the thesis; by default it is % ``Tesi di Laurea''; in English one might set it to ``Master Thesis''. % \Item[NomeMonografia] gets the phrase that describes the bachelor's report; by default % it is ``Monografia di Laurea''. In some Italian universities it might % be called ``Tesi di Laurea'', so that the master thesis should be given % another qualification, for example ``Tesi di Laurea Magistrale''. -% \Item[NomeDissertazione] gets the phrase that describes the doctoral thesis; by default -% it is ``Tesi di Dottorato''. -% \Item[InName] infix strings often require adjusting of the prepositions; this macro gets -% the preposition that stands for ``in'' (the default). In German it might -% become ``auf''. +% \Item[NomeDissertazione] gets the phrase that describes the doctoral thesis; +% by default it is ``Tesi di Dottorato''. +% \Item[InName] infix strings often require adjusting of the prepositions; this macro +% gets the preposition that stands for ``in'' (the default). In German +% it might become ``auf''. % \Item[NomeAnnoAccademico] defines the infix string that stands for ``Academic year''. % This macro is defined only if the option \texttt{classica} is in force; -% after all the command |\annoaccademico| is defined only with that option. +% after all the command |\annoaccademico| is defined only with that +% option. % \Item[logosede] specifies the name of the file or the files that contain the university % logos; no default is defined; rather a warning message is issued if no % name is given or the file is missing, but typesetting goes on without % the inclusion of any logo. a list of logos can be specified, useful % when a thesis is carried on in a multiple University environment -% such as, for example that takes place in a double degree Erasmus +% such as, for example, in a double degree Erasmus % program; or under the Erasmus Mundus program. The ``string'' of % logos is scaled properly so that they may fit in the |\textwidth|. % \Item[setbindingcorrection] sets up the length to displace the text block to the @@ -410,17 +461,17 @@ the TOPtesi bundle] % text or if it is not used at all, no copyright page is assumed. % \end{description} % -% Since the infix strings are all memorized into control sequences and for each of them it -% is possible to use a defining command, all strings can be modified at will, so that there -% is no difficulty to localize the package in another language; this comes particularly -% handy for the Erasmus students on double degree programs. +% Since the infix strings are all memorised into control sequences and for each of +% them it is possible to use a defining command, all strings can be modified at will, +% so that there is no difficulty to localise the package in another language; +% this comes particularly handy for the Erasmus students on double degree programs. % % As a final remark notice that the commands for typesetting the title page and the % copyright page are contained in the package \texttt{topfront.sty}, which can be used % as an autonomous extension to the \texttt{report} document class. One could easily % typeset either just the title page with a separate \TeX\ source file so as to test the % completeness of the commands and coherence of the configuration file, or for just -% printing the isolated title and copyright (if any) pages. +% printing the isolated title and copyright pages (if any). % % \subsection{Typesetting commands} % The bundle and the TOPtesi document class accept all \LaTeX\ commands provided by @@ -430,21 +481,22 @@ the TOPtesi bundle] % If the source thesis file is being typeset by means of \XeLaTeX\ the \texttt{babel} % package is not loaded; in its place the \texttt{polyglossia} package is loaded that % should implement in \XeLaTeX\ most of the functionality provided by \texttt{babel} to -% \LaTeX. ``Most'' means that not all the functionality is available, therefore it's better -% to consult the documentation of \texttt{polyglossia} before using its built in commands. +% \LaTeX. ``Most'' means that not all the functionality is available, therefore it's +% better to consult the documentation of \texttt{polyglossia} before using its built +% in commands. % % With this respect it must be underlined that the Italian and English languages are % specified by default, the Italian one being the default language. An initial -% specification of |\selectlanguage{english}| sets the English language as default. +% specification of |\selectlanguage{english}| sets the English language as the default. % Should a student typeset the thesis in French by means of \textsf{pdflatex}, it % would be necessary to specify the option \texttt{french} among the \emph{class} % options, and then start the document by specifying |\selectlanguage{french}|. % But the user should pay attention to use \texttt{babel} in the proper way: -% \begin{itemize} +% \begin{enumerate} % \item Due to the way \LaTeX\ classes load the requested files, and to the fact that the % \texttt{babel} package has already been loaded by the \texttt{toptesi} class, the user -% cannot reload it with a different list of language options; therefore the latter language -% options \emph{must be specified} as global class options; so if the thesis has +% cannot reload it with a different list of language options; therefore the latter +% language options \emph{must be specified} as global class options; so if the thesis has % to be typeset, for example, in French, is is necessary to do the following: %\begin{verbatim} %\documentclass[...,french,...]{toptesi} @@ -452,7 +504,7 @@ the TOPtesi bundle] %\begin{document} %\selectlanguage{french} %\end{verbatim} -% But if the thesis should be typeset in French by means of \XeLaTeX, then it is perfectly +% But if the thesis should be typeset in French by means of \XeLaTeX, then it i perfectly % legal to specify the auxiliary language in this way: %\begin{verbatim} %\documentclass[...]{toptesi} @@ -478,36 +530,35 @@ the TOPtesi bundle] % Should the required language(s) be missing, the user is forced to read his/her % distribution instructions, so as to find out how to configure his/her system so as to % consider the languages s/he wants to work with, and finally s/he must recreate the -% format files and put them in the proper places of the standard or the local folder -% tree. +% format files. % The user is invited to carefully investigate on these fine points and to properly % configure the system; it would be very upsetting to use fine software for producing a % perfectly typeset thesis that, unfortunately, has wrong hyphenation points! Luckily % enough, recent distributions of the \TeX\ system have all the known hyphenation rules -% preloaded; in any case even older distributions have available command line commands +% preloaded; in any case even older distributions have available command-line commands % or graphical user interfaces that make it easy to perform the tasks of changing the % list of preloaded hyphenation rules and rebuilding all the format files, moving them % to the proper places. -% \end{itemize} +% \end{enumerate} % % The TOPtesi bundle adds very little to the user commands; nevertheless the package % \texttt{topcoman.sty}, that is part of this bundle and is automatically loaded, defines -% some useful commands for typesetting technical matters in such a way as to fulfill the +% some useful commands for typesetting technical matters in such a way as to fulfil the % ISO regulations. -% Some of these commands are already defined with the \texttt{babel} Italian option, but if -% your thesis is written in different languages it may happen that such commands are not -% available any more when you select another language; with the presence of the definitions -% contained in \texttt{topcoman.sty} such useful commands remain available with every -% language. The \texttt{polyglossia} package does not produce any useful additional command -% for writing in a ISO compliant way, therefore the macros contained in the -% \texttt{topcoman.sty} package come very handy. +% Some of these commands are already defined with the \texttt{babel} Italian option, +% but if your thesis is written in different languages it may happen that such +% commands are not available any more when you select another language; with the +% presence of the definitions contained in \texttt{topcoman.sty} such useful commands +% remain available with every language. The \texttt{polyglossia} package does not +% produce any useful additional command for writing in a ISO compliant way, therefore +% the macros contained in the \texttt{topcoman.sty} package come very handy. % % The following description specifies these particular commands. % \begin{description} % \def\Item[#1]{\item[\normalfont\texttt{\char92#1}]} % \Item[DeclareSlantedCapitalGreekLetters] does exactly what its name -% means: it changes the definitions of the mathematical capital Greek -% letters so that they are typeset in ``italics''; they are in effects taken from the math +% means: it changes the definitions of the mathematical capital Greek letters so that +% they are typeset in ``italics''; they are in effects taken from the math % italic alphabet, instead of the default roman one. This option is useful with \LaTeX, % while with \XeLaTeX\ it is unnecessary due to the larger set of math alphabets and math % font commands that are available with proper UNICODE math fonts. @@ -522,7 +573,7 @@ the TOPtesi bundle] % % % \Item[ped] inserts a subscript in upright type; the ISO regulations % require the use of italics for physical or mathematical quantities, and -% upright type for anythingg that is not a variable, from the names of +% upright type for anything that is not a variable, from the names of % functions (such as sin, cos, log, etc.), to the indices that contain % information on something that is not variable. This means that $V_i$ % requires an italic index to imply that the object $V$ is the $i$-th in @@ -572,16 +623,16 @@ the TOPtesi bundle] % from an slanted ''pi'' (the angle). % % % \Item[listing] requires for its argument the name of a file and typesets it in verbatim -% mode; this command is very useful for typesetting the listings of the programs that were -% written for the thesis; for best results it is recommended that the source program has -% lines not longer than 80 characters. There exists an external package \texttt{listings}, -% that the user might want to load, that does a similar work in a more professional and -% configurable way; this package simpler command might be preferable for its simplicity, -% but of course it is not compulsory. +% mode; this command is very useful for typesetting the listings of the programs that +% were written for the thesis; for best results it is recommended that the source +% program has lines not longer than 80 characters. There exists an external package +% \texttt{listings}, that the user might want to load, that does a similar work in +% a more professional and configurable way; this package simpler command might be +% preferable for its simplicity, but of course it is not compulsory. % \end{description} % % All these commands are defined into the separate package \texttt{topcoman.sty} -% that can be used as an independent extension package with (may be) any document class. +% that might be used as an independent extension package with any document class. % % \section{PDF format suitable for archiving} % This section in general does not apply if the thesis is typeset by means of \XeLaTeX, @@ -596,7 +647,7 @@ the TOPtesi bundle] % problem of course is: ``Will it be possible to read the archived documents, say, fifty % years from now?'' % -% This essential question has been answered by the International Standards Organization +% This essential question has been answered by the International Standards Organisation % (ISO) that in 2005 published the regulation ISO~19005-1. This regulation defines a % PDF variant suitable for archiving, named PDF/A, that has two sub-formats % distinguished as PDF/A-1a, and PDF/A-1b. The `a' sub-format is more exacting, while @@ -615,20 +666,20 @@ the TOPtesi bundle] % optional information, such as the keywords that ease up library searches. % % Since version 1.40, the program \texttt{pdflatex} is capable of producing PDF/A-1b -% conforming files, provided that some attention is put into the manipulation of the source -% file of the thesis. With the distribution of the 2008 version of the \TeX\ system, the -% executable \texttt{pdflatex} has version number 1.40.9 and is capable of producing -% PDF/A-1b files. +% conforming files, provided that some attention is put into the manipulation of the +% source file of the thesis. With the distribution of the 2008 version of the \TeX\ +% system, the executable \texttt{pdflatex} has version number 1.40.9 (or higher) +% and is capable of producing PDF/A-1b files. % % The particular attention needed to avoid problems with the PDF/A certification is -% summarized as follows: -% \begin{itemize} -% \item The preliminary essential requirement is that the \texttt{pdflatex} engine used to -% typeset the thesis be sufficiently recent to support the PDF/A requirements. It's +% summarised as follows: +% \begin{enumerate} +% \item The preliminary essential requirement is that the \texttt{pdflatex} engine used +% to typeset the thesis be sufficiently recent to support the PDF/A requirements. It's % better to have the most recent distribution of the \TeX\ system installed on your PC. -% Do not try to typeset the thesis with the `old' \LaTeX; you \emph{must} process the input -% thesis file(s) with \texttt{pdflatex} or with \prog{xelatex}; in the following, no -% specific check will be made in order to verify if you are actually using +% Do not try to typeset the thesis with the `old' \LaTeX; you \emph{must} process the +% input thesis file(s) with \texttt{pdflatex} or with \prog{xelatex}; in the following, +% no specific check will be made in order to verify if you are actually using % \texttt{pdflatex}. If you really need to use the `old' \LaTeX, you get a DVI % file and you need to transform it with |dvips| into a PS file; at this point you % have lost the possibility of exploiting the internal commands of |pdflatex| version @@ -639,11 +690,13 @@ the TOPtesi bundle] % thesis is typeset by means of \XeLaTeX, and produces valid results provided some % caution is exercised when using fonts. % -% \item Download from \textsc{ctan} and install the package \textsf{pdfx}, if it is -% not already part of your \TeX\ system complete distribution. +% \item Your up-to-date complete \TeX\ distribution should contain the package +% \textsf{pdfx}; if it does not, upgrade your \TeX\ system complete distribution. +% % \item Install in the main \texttt{pdfx} directory a good version of a color model % profile file, such as, for example, \texttt{ECI-RGB-V1.0.icc} (see the download % page of the site \texttt{www.eci.org}). +% % \item If your thesis main file, the one you run your \texttt{pdflatex} on, is named, % say, \texttt{JohnSmithMasterThesis.tex}, prepare in the same directory another file % named \texttt{JohnSmithMasterThesis.xmpdata} that contains the \emph{metadata} @@ -656,13 +709,16 @@ the TOPtesi bundle] % \end{verbatim} % Keywords require a specific XML style format that can be examined in the package % documentation. +% % \item Some mathematical symbol commands obtained from the standard \LaTeX\ set-up % and the standard mathematical fonts require some patching that is already included % in this \texttt{TOPtesi} bundle; but it is not excluded that with other fonts similar % patches might be requested. The UNICODE math fonts used by \XeLaTeX\ do not require any % patch, but unfortunately its PDF byproduct is not PDF/A compliant (it must be converted % by means of \prog{ghostscript}). +% % \item Use only PNG and JPEG images with RGB color profiles. +% % \item If you include PDF images that contain some text, be sure that the fonts for % this text are completely embedded in the included file. Should the PDF file come % from an external drawing program be sure to configure that program so that it embeds @@ -670,38 +726,41 @@ the TOPtesi bundle] % the free program \texttt{inkscape} and save it back in PDF format; the missing fonts % will be replaced with their traced outlines and this will not disturb the PDF/A % conformity. +% % \item Verify your final PDF file with a suitable program and do not give up doing the % necessary corrections or modifications while the verification program keeps saying % that this or that is not conforming to the PDF/A specification. A suitable program % is the Preflight plug-in of Adobe Acrobat Professional version 8 or later, but this, % although the most authoritative, is a commercial program; probably your university % has special facilities for this task. +% % \item If you use \prog{xelatex} for typesetting your thesis, you have to accompany your -% master file with another one that contains the metadata and other necessary information. -% Be sure to call this auxiliary file as the masterfile name glued with |-def.ps|; so if +% master file with another one that contains the metadata and other necessary +% information. +% Be sure to call this auxiliary file has the masterfile name glued with |-def.ps|; so if % your mastefile is named \texttt{JohnSmithMasterThesis.tex}, name this auxiliary file as % \texttt{JohnSmithMasterThesis-def.ps} and fill in the necessary metadata and other -% thechnical information into this file in the lines marked with |% Customize|. Then run +% technical information into this file in the lines marked with |% Customize|. Then run % the \prog{ghostscript} program with the proper name (different for Windows or UNIX-like % platforms) with the proper input parameters and options. There are strong chances that % if you follow the general recommendations shown here and in the document -% |toptesi-doc-xetex.pdf| file, the output file will be PDF/A compliant. -%\end{itemize} +% |toptesi-it-xetex.pdf| file, the output file will be PDF/A compliant. +%\end{enumerate} % % Let's warn you: if you are using Adobe Reader X (or later), this program will open % a PDF file beginning with an information header claiming that the file is PDF/A % compliant; maybe it's true, but do not trust this information too much, at least don't -% believe that this information is a ``certification'' of the PDF/A compliance. I have seen -% files with this comforting information that did not pass the Preflight test! -% -% Up to today the realization of PDF/A conforming files sets forth several problems -% that are of great concern for the large Institutions that have thousands of document -% a year to archive; it is not a question implied in the free nature of the \prog{pdflatex} -% and \prog{xelatex} programs, that, on the opposite, according to my experience have -% a very high rate of success in producing PDF/A compliant documents. If you stick to -% the default \TeX\ system Type~1 256-glyph, or to the UNICODE encoded otf or ttf fonts -% and use this patched version of \texttt{TOPtesi} you should be able to avoid most -% problems. +% believe that this information is a ``certification'' of the PDF/A compliance. I have +% seen files with this comforting information that did not pass the Preflight test! +% +% Up to today the realisation of PDF/A conforming files sets forth several problems +% that are of great concern for the large Institutions that have thousands of documents +% a year to archive; it is not a question implied in the free nature of the +% \prog{pdflatex} and \prog{xelatex} programs, that, on the opposite, according to my +% experience have a very high rate of success in producing PDF/A compliant documents. +% If you stick to the default \TeX\ system Type~1 256-glyph, or to the UNICODE encoded +% otf or ttf fonts and use this patched version of \texttt{TOPtesi} you should be able +% to avoid most problems. % % \StopEventually{} ^^A qui si puo' mettere una bibliografia % @@ -717,7 +776,7 @@ the TOPtesi bundle] % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{toptesi}% -[2014/09/15 v.5.77 Class for typesetting university theses] +[2014/10/15 v.5.81 Class for typesetting university theses] % \end{macrocode} % % The class itself is very simple since it requires just the \texttt{report} document @@ -728,16 +787,17 @@ the TOPtesi bundle] % the |\ExecuteOption| command assures that |a4paper| is the default size, % but it is not being used if another paper size code is specified to the class. % The same holds true for the other class options, except for the encoding code -% string because they passing machinery does not hold true for the \pack{inputenc} +% string because their passing machinery does not hold true for the \pack{inputenc} % package; therefore this package is not loaded any more as it was in previous % versions\footnote{Thanks to Enrico Gregorio who pointed out this feature.} -% of the class. On the opposite if another language iss specified in the list of +% of the class. On the opposite if another language is specified in the list of % \pack{toptesi} class options, this language would be appended to the \pack{babel} % package default options and, beware!, it would become the default language. % \begin{macrocode} \DeclareOption{a4paper}{\PassOptionsToClass{\CurrentOption}{report}} +\DeclareOption{titlepage}{\PassOptionsToClass{\CurrentOption}{report}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}} -\ExecuteOptions{a4paper} +\ExecuteOptions{a4paper,titlepage} \ProcessOptions\relax \LoadClass{report} \RequirePackage{ifxetex} @@ -761,11 +821,11 @@ the TOPtesi bundle] % The greatest part of the \texttt{toptesi} class code is saved into a separate file % partly for backward compatibility reasons (before version 3.x \texttt{toptesi} was just % an extension to the \texttt{report} class) and partly because it might be used as a -% stand aolone package, although, take notice, it might conflict with the \texttt{book} class -% code and certainly it is incompatible with the \texttt{article} class. This package must -% contain its own \TeX\ format declaration and might have different version and subversion -% numbers compared to the class file and the other invoked packages that are part of the same -% bundle. +% stand alone package, although, take notice, it might conflict with the \texttt{book} +% class code and certainly it is incompatible with the \texttt{article} class. This +% package must contain its own \TeX\ format declaration and might have different +% version and subversion numbers compared to the class file and the other invoked +% packages that are part of the same bundle. % % \iffalse %<*topsty> @@ -773,7 +833,7 @@ the TOPtesi bundle] % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{toptesi}% -[2014/09/15 v.5.77 Extension for toptesi.cls]% +[2014/10/15 v.5.81 Extension for toptesi.cls]% % \end{macrocode} % % We start with defining the debugging macros; these trace commands and macros @@ -785,7 +845,8 @@ the TOPtesi bundle] \let\TROF\TROFF % \end{macrocode} % Now we define the specific package macros: \texttt{classica} and \texttt{trieste} -% are identical; \texttt{trieste} is maintained for backward compatibility. +% are identical; the use of \texttt{trieste} is discouraged, but this option is +% maintained for backward compatibility. % The option \texttt{14pt} is for choosing a normal size of 14pt; the class option % file \texttt{size14.clo} is distributed with the \pack{extsizes} package and % is already included in any complete distribution of the major \TeX\ system ones; @@ -795,21 +856,25 @@ the TOPtesi bundle] % % \texttt{chapterbib} allows to set a list of references at the end of each chapter. % -% For the options specific to the \texttt{classica} style a couple of boolean variables are +% For the options some boolean variables are % defined and the option definitions set them to the value ``true''. % \begin{macrocode} \newif\if@utoretitolo \@utoretitolofalse \newif\if@ldstyle \@ldstylefalse \newif\if@xivpt \@xivptfalse +\newif\ifT@Pfrontespizio \T@Pfrontespiziofalse +\newif\ifTOPfront \TOPfronttrue % \end{macrocode} % -% A binding correction is established; its default value is parametrized to +% A binding correction is established; its default value is parametrised to % the paper dimensions, even if this correction should actually not depend % on the aper size; the paper flexibility at the spine margin should be % independent from its width; nevertheless large sizes allow for larger % default corrections. In any case the user can override this setting by % using the specific command |\setbindingcorrection|. The recommendation -% to the user is to not exaggerate with this correction. +% to the user is to not exaggerate with this correction. The options +% |usefrontespizio| and |noTOPfront| are synonymous; the latter one should be +% preferred to the former one. % \begin{macrocode} \newlength\T@Pbinding\setlength\T@Pbinding{7mm} \def\setbindingcorrection#1{\T@Pbinding=#1} @@ -825,11 +890,13 @@ the TOPtesi bundle] \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 % \end{macrocode} % The \texttt{graphicx} package is loaded by default; it is required for inserting the -% university logo; if the user forgets that this package has already been loaded +% university logo(s); if the user forgets that this package has already been loaded % nothing dramatic happens, because the |\usepackage| and |\RequirePackage| macros % perform the necessary tests in order to avoid reloading the same packages again % and again. @@ -839,7 +906,9 @@ the TOPtesi bundle] \if@xivpt\input{size14.clo}\fi % \end{macrocode} % -% The |\texheight| is parametrized to the paper height and adjusted so as to contain an integer number of normal text lines. A new dimension is defined to hold the actual value of the inner/spine margin. +% The |\texheight| is parametrised to the paper height and adjusted so as to +% contain an integer number of normal text lines. A new dimension is defined +% to hold the actual value of the inner/spine margin. % % \begin{macrocode} \newlength\interno @@ -848,8 +917,8 @@ the TOPtesi bundle] \multiply\textheight by \baselineskip \advance\textheight by \topskip % \end{macrocode} -% The inner margin is parametrized to the paper width, but a small correction -% is made if the extra size of 14pt is chosen. Also footskip is parametrized +% The inner margin is parametrised to the paper width, but a small correction +% is made if the extra size of 14pt is chosen. Also |\footskip| is parametrised % to the paper height in a slightly different way when the large |14pt| size is chosen. % \begin{macrocode} \ifx\f@size\@xivpt @@ -860,7 +929,7 @@ the TOPtesi bundle] \footskip=2\baselineskip \fi % \end{macrocode} -% The convenience pod holding the spine margin didth in a dimensional register +% The convenience of holding the spine margin width in a dimensional register % becomes really useful now in order to define the other text body grid dimensions. % Without binding correction the inner and outer margin are chosen equal, but % the grid is moved outwards if the binding correction option is specified. @@ -886,7 +955,7 @@ the TOPtesi bundle] % \end{macrocode} % -% We now establish the page style. We start by setting to ``empy'' the tokens that +% We now establish the page style. We start by setting to ``empty'' the tokens that % keep the left and the right marks; we define a box so as to set the headers % inside this box; we redefine also the plain page styles; it is actually a leftover % from the previous versions when the page number was set at the foot in bold face, @@ -906,10 +975,11 @@ the TOPtesi bundle] \def\@evenhead{}\let\@evenfoot\@oddfoot} % \end{macrocode} % Other page styles are defined in a different way according to the choice of -% one side or two side printing. In any case the header is set without capitalization +% one side or two side printing. In any case the header is set without capitalisation % as it happens in all the default document classes, and it is underlined at a fixed -% distance from the base line. If the chapter or section heading a warning is issued -% so as to invite the user to exploit the sectioning commands optional short argument. +% distance from the base line. If the chapter or section heading exceed the +% |\textwidth| a warning is issued so as to invite the user to exploit the +% sectioning commands optional short argument. % \begin{macrocode} \if@twoside \def\ps@headings{\let\@mkboth\markboth% @@ -967,11 +1037,12 @@ the TOPtesi bundle] \fi} % \end{macrocode} % The various tables of contents or figures or tables require some boolean variables to -% be defined; in facts, although the ISO regulations require that every technical report contains -% the list of figures and/or tables, in Italy theses rarely contain these lists; after all: is -% a thesis a technical report? We require also some other boolean variables to handle -% the difference between front matter and main matter; this differences are already defined -% in the \texttt{book} document class, but not in the \texttt{report} one. +% be defined; in facts, although the ISO regulations require that every technical report +% contains the list of figures and/or tables, in Italy theses rarely contain these lists; +% after all: is a thesis a technical report? We require also some other boolean variables +% to handle the difference between front matter and main matter; this differences are +% already defined in the \texttt{book} document class, but not in the \texttt{report} +% one. % \begin{macrocode} \newif\iffigurespage \newif\iftablespage @@ -982,15 +1053,16 @@ the TOPtesi bundle] % of the document the default situation of front matter is established. % \begin{macrocode} \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} % \end{macrocode} -% The main matter is automatically established with the first |\chapter| command issued by -% the user; this means that every command that starts a section at the ``chapter'' level -% within the front matter must be executed without an explicit call to |\chapter|. +% The main matter is automatically established with the first |\chapter| command issued +% by the user; this means that every command that starts a section at the ``chapter'' +% level within the front matter must be executed without an explicit call to |\chapter|. % % By default we set to false the boolean variables that control the typesetting of the % list of figures and the list of tables. @@ -1000,20 +1072,13 @@ the TOPtesi bundle] % \end{macrocode} % % Before going further on, we redefine the |\cleardoublepage| command so that -% it uses by default the plain page style, but it can be set to any other style; -% we define a blahk page style as an alias to an existing page style; then we -% define a command to let this page style to be an alias of some other page -% style; eventually we use this alias as the page style that |\cleardoublepage| -% uses for outputting the blank page in case it is necessary so as to open on -% a right page. The user can redefine the blank page style as often as he -% whishes, and, of course, it is better he plans such a redefinition in advance, -% before the need arises to output a blank page. -% \begin{macrocode} -\newcommand\blankpagestyle[1]{\def\blank@ps{#1}} -\def\blank@ps{plain} -\renewcommand\cleardoublepage{\clearpage\ifodd\value{page}\else +% it uses by default the plain page style, but it can be set to any other style. +% \begin{macrocode} +\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} % \end{macrocode} % % We have to define the front matter sectioning names |\sommario| and |\ringraziamenti| @@ -1021,19 +1086,13 @@ the TOPtesi bundle] % \begin{macrocode} \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}% } % \end{macrocode} @@ -1043,24 +1102,64 @@ the TOPtesi bundle] % Italian and English. % % We have to modify the |\chapter| and |\part| commands so that as the user -% first issues one of these commands the typesetting style is switched to the -% one for the main matter. -% \begin{macrocode} -\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} +% first issues one of these commands the typesetting style is switched to that +% of the main matter. Actually it is not necessary to redefine the whole +% commands, but just those of the unstarred versions. In facts the starred +% chapter commands to typeset the Summary and the Acknowledgements chapters, +% as defined above, are regularly typeset in the style of the front matter, +% opening on any page (even or odd) and numbered with small caps roman numerals. +% \begin{macrocode} +%\renewcommand\chapter{% +% \iffrontmatter\mainmatter\fi +% \if@openright\cleardoublepage\else\clearpage\fi +% \thispagestyle{plain}% +% \global\@topnum\z@ +% \@afterindentfalse +% \secdef\@chapter\@schapter} +\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} +% +%\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\@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} % \end{macrocode} % At the same time we have to make sure that |\tableofcontents|, % |\listoftables| and |\listoffigures| do not exit from the front matter style. @@ -1434,21 +1533,21 @@ Skipping any redefinition\MessageBreak}% % redefined so as to agree with the default language. If a different % default language is desired, we recall it again, it is necessary to do % the following: -% \begin{itemize} +% \begin{enumerate} % \item specify |\english| \emph{after} the |\begin{document}| statement, % if English is supposed to be the default language, or % \item specify the language name, other than Italian or English, among % the class options; use the |\ExtendCaptions| macro for extending the % list of sectioning commands infix strings as explained above; % specify with |\selectlanguage| the new language as the default one -% \emph{after} the |\begin{document}| statement. -% \item If XeLaTeX is being used for typesetting it suffices to specify +% \emph{after} the |\begin{document}| statement; +% \item if XeLaTeX is being used for typesetting it suffices to specify % in the preamble the name of the other language to be used, by means % of the |setotherlanguage| command, and to define the summary and % acknowledgments names in the same way as with pdf\/\LaTeX; the same % must be done at the beginning of the document to declare the new % language a the default one. -% \end{itemize} +% \end{enumerate} % \begin{macrocode} \AtBeginDocument{% \italiano @@ -1457,7 +1556,9 @@ Skipping any redefinition\MessageBreak}% % \end{macrocode} % % At last the subsidiary and independent packages \texttt{topcoman} and -% \texttt{topfront} are requested for input. For using XeLaTeX as the +% \texttt{topfront} are requested for input the former is loaded only if +% at the |documentclass| level the option |usefrontespizio| has NOT been +% declared. For using XeLaTeX as the % typesetting engine it's necessary to load such packages at the ``begin % document'' step, so that all a the other settings, especially fonts % are already established. May be it should be better done also when @@ -1465,11 +1566,16 @@ Skipping any redefinition\MessageBreak}% % has not shown any inconvenience. % \begin{macrocode} \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 % \end{macrocode} @@ -1563,12 +1669,13 @@ Skipping any redefinition\MessageBreak}% % The singular and plural masculine and feminine strings for ``candidate'' are redefined. % For other languages the configuration file comes in handy. % \begin{macrocode} +\ifTOPfront \ifclassica \def\Candidato{Laureando} \def\Candidata{Laureanda} \def\Candidati{Laureandi} \def\Candidate{Laureande} -\fi +\fi\fi % \end{macrocode} % % Since theses in humanities may end up to occupy several volumes (classically @@ -1786,7 +1893,7 @@ Skipping any redefinition\MessageBreak}% % % \fi % -% \subsection{The package file \texttt{topfront.sty}} +% \subsection{The \texttt{topfront.sty} code} % This file is input by \texttt{toptesi}, version 5.x, but it can be used as an % independent extension package. % @@ -1805,7 +1912,7 @@ Skipping any redefinition\MessageBreak}% % \fi % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{topfront}[2014/09/15 v.5.77 Title page for TOPtesi] +\ProvidesPackage{topfront}[2014/10/15 v.5.81 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 @@ -1824,9 +1931,9 @@ Skipping any redefinition\MessageBreak}% % 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 +% the university logo(s) in the header; other universities maintain 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 +% past. We need 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| @@ -1854,7 +1961,7 @@ Skipping any redefinition\MessageBreak}% } % \end{macrocode} % -% similarly a different title page style for typesetting the logos in the +% 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 |classica| option, we call it the |classica| page style: % \begin{macrocode} @@ -1877,23 +1984,24 @@ Skipping any redefinition\MessageBreak}% \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 -% formatting depending on the kind of thesis. For languages that distinguish feminine from -% masculine adjectives or qualifications some automatic machinery is set up in order to -% format some infix strings in a way that copes with the singular or plural forms; in -% particular when there is a multitude of authors (maximum three) of different gender the -% adjectives or qualifications are set masculine plurals, while when there is just one -% author or the authors are of the same gender the adjectives or qualifications are set -% according to number and gender. Al this is done by setting or resetting the truth value -% associated to the boolean variable \texttt{femminile}. The boolean variable -% \texttt{dottorato} controls the PhD thesis format, while the other variable -% \texttt{laureatriennale} controls the formatting of the bachelor's degree report. All -% other theses are treated as master theses, and in all cases the appropriate infix string -% is typeset in the title page: +% 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 formatting depending on the kind of thesis. +% For languages that distinguish feminine from masculine adjectives or +% qualifications some automatic machinery is set up in order to format some +% infix strings in a way that copes with the singular or plural forms; in +% particular when there is a multitude of authors (maximum three) of different +% gender the adjectives or qualifications are set masculine plurals, while +% when there is just one author or the authors are of the same gender the +% adjectives or qualifications are set according to number and gender. +% All this is done by setting or resetting the truth value associated to +% the boolean variable \texttt{femminile}. The boolean variable +% \texttt{dottorato} controls the PhD thesis format, while the other +% variable \texttt{laureatriennale} controls the formatting of the +% bachelor's degree report. All other theses are treated as master theses, +% and in all cases the appropriate infix string is typeset in the title page: % \begin{macrocode} \newif\iffemminile \newif\ifdottorato \dottoratofalse @@ -2749,7 +2857,7 @@ Skipping any redefinition\MessageBreak}% % % \fi % -% \subsection{The package file \texttt{topcoman.sty}} +% \subsection{The \texttt{topcoman.sty} code} % This file may be used as an independent extension package for the \texttt{report} % document class, and possibly for other classes % \iffalse @@ -2758,7 +2866,7 @@ Skipping any redefinition\MessageBreak}% % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e \ProvidesPackage{topcoman}% - [2014/09/15 v.5.77 Additional commands for the TOPtesi bundle] + [2014/10/15 v.5.81 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 -- cgit v1.2.3