summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/toptesi
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/toptesi')
-rw-r--r--Master/texmf-dist/source/latex/toptesi/toptesi.dtx459
1 files changed, 229 insertions, 230 deletions
diff --git a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx
index cd1653a9182..956b0a358be 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) 2014 Claudio Beccari
+ Copyright (C) 2015 Claudio Beccari
All rights reserved
License information appended
@@ -16,7 +16,7 @@
\endpreamble
\postamble
-Copyright 2005-2014 Claudio Beccari
+Copyright 2005-2015 Claudio Beccari
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -31,8 +31,8 @@ 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-it-xetex.tex and the derived file
-toptesi-it-xetex.pdf.
+file toptesi-it-pdftex.tex and the derived file
+toptesi-it-pdftex.pdf.
The toptesi-example.tex source file is just an example
that shows how to use the various commands; by commenting
@@ -40,18 +40,22 @@ or uncommenting certain source lines it is possible to
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
+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.
+file that can be copied to another file and its copy freely
+edited and customized.
By running pdflatex on toptesi.dtx the user gets the class,
sty and cfg files and the English documentation file in
pdf format.
-The documentation file toptesi-it-xetex.pdf is in Italian;
-its source file is another example of how to use toptesi.
+The source file of the Italian documentation file
+toptesi-it-pdftex.pdf is another example of how to use TOPtesi.
+In spite of its name, toptesi-it-pdftex.tex may be typeset
+with pdfLaTeX, XeLaTeX, and LuaLateX; see the first comment
+lines of the file for how-to information.
\endpostamble
\askforoverwritefalse
@@ -68,7 +72,7 @@ its source file is another example of how to use toptesi.
\endgroup
%</internal>
%
-% Copyright 1989--2014 Claudio Beccari
+% Copyright 1989--2015 Claudio Beccari
%
% This file is part of the TOPtesi bundle
% -------------------------------------------
@@ -93,14 +97,31 @@ its source file is another example of how to use toptesi.
% \fi
%
% \iffalse
+%^^A The following trick uses the same date for every file header.
+%<class,topsty,topcmn,topfrn>\NeedsTeXFormat{LaTeX2e}[2015/01/01]
+%<*driver>
+\ProvidesFile{toptesi.dtx}[%
+%</driver>
+%<class>\ProvidesClass{toptesi}[%
+%<topsty>\ProvidesPackage{toptesi}[%
+%<topcmn>\ProvidesPackage{topcoman}[%
+%<topfrn>\ProvidesPackage{topfront}[%
+%<*driver,class,topsty,topcmn,topfrn>
+2015/12/06 v.5.90
+%<class>Class for typesetting university theses]
+%<topsty>Extension for toptesi.cls]
+%<topcmn>Additional commands for the TOPtesi bundle]
+%<topfrn>Title page for TOPtesi and other classes]
+%</driver,class,topsty,topcmn,topfrn>
+%<*driver>
+]
+%</driver>
%<*driver>
\documentclass{ltxdoc}
-\ProvidesFile{toptesi.dtx}[2015/11/03 v.5.86g Documented TeX file for
-the TOPtesi bundle]
\GetFileInfo{toptesi.dtx}
\title{The TOPtesi bundle}
\date{\fileversion\space--- \filedate}
- \author{Claudio Beccari}
+ \author{Claudio Beccari\thanks{E-mail: \texttt{claudio dot beccari at gmail dot com}}}
\usepackage{metalogo,multicol}
\def\prog#1{\textsf{#1}}
@@ -116,23 +137,7 @@ the TOPtesi bundle]
%</driver>
% \fi
%
-% \CheckSum{2792}
-%
-%% \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
-%% Lower-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
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
+% \CheckSum{2763}
%
% \begin{abstract}
% This file describes the TOPtesi bundle; it is a set of files designed to
@@ -661,13 +666,17 @@ the TOPtesi bundle]
% All these commands are defined into the separate package \texttt{topcoman.sty}
% that might be used as an independent extension package with any document class.
%
-% \section{PDF format suitable for archiving}
+% \section{PDF/A archivable format}
% This section in general does not apply if the thesis is typeset by means
% of \XeLaTeX, because the typesetting engine in this case cannot directly
-% produce a PDF formatted output file. For this reason the option |pdfa|, that
-% shall be described shortly, should not specified to the class |toptesi|;
-% at the same time if this option is specified, but the thesis is typeset by
-% means of \XeLaTeX, the effects of this options are disabled.
+% produce a PDF formatted output file. Nevertheless even a PDF produced with
+% \XeLaTeX\ can be made PDF/A compliant; even better, \LuaLaTeX, whose source
+% file is practically the same as that of \XeLaTeX, may produce a PDF/A
+% compliant output file if the user forces a little bit the compilation.
+%
+% More details are give in the Italian documentation contained in files
+% \texttt{toptesi\discretionary{-}{}{-}it-pdftex}, |toptesi-it-xetex|, and
+% |toptesi-it-luatex|.
%
% Politecnico di Torino as well as many other Italian and foreign universities
% are moving towards archiving theses in electronic format, specifically in the
@@ -679,120 +688,138 @@ the TOPtesi bundle]
% 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 the `b' one is less stringent. Recently
-% ISO has published an upgrade to these regulations, but here we stick to the
+% ISO has published upgrades to these regulations, but here we stick to the
% older ones, that are a sub set of the newer ones, and for which suitable
% software is available.
%
-% The requirements for the `a' sub-format imply not only those imposed on the `b' one,
-% but also that all characters are conforming to UNICODE and that the logical structure
-% of the document be maintained. The requirements for the `b' sub-format are that the
-% document must be reproducible without modifications exactly as it was at the moment
-% of archiving. Both sub-formats must contain \emph{metadata} that are searchable even
-% without decompressing the normally compressed PDF file, and that contain information
-% useful for archive maintenance; among these informations, of course, the PDF/A
-% category the document belongs to, the document title, the authors, and few other
-% 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 (or higher)
-% and is capable of producing PDF/A-1b files.
-%
-% The particular attention needed to avoid problems with the PDF/A certification is
-% summarised as follows:
+% The requirements for the `a' sub-format imply not only those imposed on
+% the `b' one, but also that all characters are conforming to UNICODE and
+% that the logical structure of the document be accessible from outside
+% (Tagged PDF). The requirements for the `b' sub-format are that the
+% document must be reproducible without modifications exactly as it was at
+% the moment of archiving. Both sub-formats must contain \emph{metadata}
+% that are searchable even without decompressing the normally compressed
+% PDF file, and that contain information useful for archive maintenance;
+% among these informations, of course, the PDF/A category the document belongs
+% to, the document title, the authors, and few other optional pieces of
+% 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 (or higher) and is capable of producing PDF/A-1b files.
+%
+% The particular attention needed to avoid problems with the PDF/A certification
+% is 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} or with
-% \prog{lualatex}; 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
-% 1.40.9 or later. You can still produce a PDF/A final document, but you have to
-% transform it by means of |ghostscript|; read the |ghostscript| (version 8.61 or later)
-% documentation file |ps2pdf.html| in order to find out how to produce the correct PS
-% to PDF/A transformation. A procedure similar to this one is available when the
-% thesis is typeset by means of \XeLaTeX, and produces valid results provided some
-% caution is exercised when using fonts.
+% \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} or with \prog{lualatex};
+% 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 1.40.9 or later. You can still
+% produce a PDF/A final document, but you have to transform it by means of
+% |ghostscript|; read the |ghostscript| (version 8.61 or later) documentation
+% file |ps2pdf.html| in order to find out how to produce the correct PS to
+% PDF/A transformation. A procedure similar to this one is available when
+% the thesis is typeset by means of \XeLaTeX, and produces valid results
+% provided some caution is exercised when using fonts. The documentation in
+% Italian describes several methods to transform a non compliant PDF/A file
+% into a compliant one, and how to correct the ``imperfections'' that forbid
+% any valid transformation.
%
% \item Your up-to-date complete \TeX\ distribution should contain the package
-% \textsf{pdfx}; if it does not, upgrade your \TeX\ system complete distribution.
+% \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}
-% relative to the thesis; pay attention to follow the stringent syntax described and
-% exemplified in the \textsf{pdfx} documentation. A minimal set of \emph{metadata}
-% example would be the following one:
+% \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} relative to the thesis; pay attention to
+% follow the stringent syntax described and exemplified in the \textsf{pdfx}
+% documentation. A minimal set of \emph{metadata} example would be the
+% following one:
% \begin{verbatim}
% \Title{Experiments in Trichotetratomy}
% \Author{John Smith}
% \end{verbatim}
-% Keywords require a specific XML style format that can be examined in the package
-% documentation.
+% 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 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
-% all the fonts used in the image. If you don't succeed, open the PDF file with
-% 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 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
-% 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 as the |PS2PD.hhtml| file explains. There are strong chances that
-% if you follow the general recommendations shown here and in this document
-% |toptesi-it-xetex.pdf| file, the output file will be PDF/A compliant.
+% \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 all the fonts used in the image. If you
+% don't succeed, open the PDF file with 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. Pay
+% attention, because Inkscape might save your file with some specifications
+% for transparency; Transparency specification destroy the PDF/A compliance.
+%
+% \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 module of Adobe Acrobat
+% Pro~XI, 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} and you want to convert it by means of
+% |ghostscript|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 has the masterfile name
+% glued with |-def.ps|; so if your masterfile is named
+% \texttt{JohnSmithMasterThesis.tex}, name this auxiliary file as
+% \texttt{JohnSmithMasterThesis-def.ps} and fill in the necessary metadata
+% and other 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 as the |PS2PD.hhtml| file explains. There are
+% strong chances that if you follow the general recommendations shown here
+% and in the document |toptesi-it-xetex.pdf| file, the output file will be
+% PDF/A compliant.
+% \item If you really have to typeset your document with \prog{xelatex} because
+% you have to use Opentype fonts or you have to manage languages in a
+% different way from what you can di with |babel|, then prefer using
+% \prog{lualatex}, even if you have to force the compilation; formally
+% \LuaLaTeX\ and package \pack{pdfx} are incompatible (by the end of 2015),
+% but if at the first error you force the continuation of the compilation
+% you may end up with a compliant PDF/A file.
%\end{enumerate}
%
% Warning: if you are using Adobe Reader X (or later), this program will open
-% a PDF file beginning with an information header stating that the file is
+% a PDF file beginning with an information header stating that the file
% PDF/A claims to be 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 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
+% 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}, \prog{xelatex}, and \prog{lualatex}
+% 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
+% \StopEventually{} ^^A Bibliography?
%
% \section{Documented code}
% \subsection{The class code}
@@ -803,26 +830,22 @@ the TOPtesi bundle]
% \iffalse
%<*class>
% \fi
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{toptesi}%
-[2015/11/03 v.5.86g Class for typesetting university theses]
-% \end{macrocode}
-%
-% The class itself is very simple since it requires just the \texttt{report} document
-% class and some packages with some default options. All options specified for the
-% \texttt{toptesi} class are passed on to the \texttt{report} class; the |a4paper|
-% option is made the default, but the user can call the class with any valid
-% \LaTeX\ paper size. According to the \LaTeX\ machinery of option passing,
-% 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 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 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.
+%
+% The class itself is very simple since it requires just the \texttt{report}
+% document class and some packages with some default options. All options
+% specified for the \texttt{toptesi} class are passed on to the \texttt{report}
+% class; the |a4paper| option is made the default, but the user can call the
+% class with any valid \LaTeX\ paper size. According to the \LaTeX\ machinery
+% of option passing, 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 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 of the class\footnote{Thanks
+% to Enrico Gregorio who pointed out this feature.}. 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}}
@@ -830,16 +853,16 @@ the TOPtesi bundle]
\ExecuteOptions{a4paper,titlepage}
\ProcessOptions\relax
\LoadClass{report}
-\RequirePackage{ifxetex}
-\ifxetex
- \RequirePackage{fontspec}
+\RequirePackage{iftex}
+\ifPDFTeX
+ \RequirePackage[english,italian]{babel}
+\else
\RequirePackage{polyglossia}
\setmainlanguage{italian}
\setotherlanguage{english}
\renewcommand*{\iflanguage}[1]{\ifnum\the\language=\csname l@#1\endcsname
- \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-\else
- \RequirePackage[english,italian]{babel}
+ \expandafter\@firstoftwo\else
+ \expandafter\@secondoftwo\fi}
\fi
\RequirePackage{toptesi}
%
@@ -862,11 +885,6 @@ the TOPtesi bundle]
% \iffalse
%<*topsty>
% \fi
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{toptesi}%
-[2015/11/03 v.5.86g Extension for toptesi.cls]%
-% \end{macrocode}
%
% We start with defining the debugging macros; these trace commands and macros
% are the usual ones I use for debugging. I know the \texttt{trace} package is supposed
@@ -913,7 +931,6 @@ the TOPtesi bundle]
\newlength\T@Pbinding\setlength\T@Pbinding{7mm}
\def\setbindingcorrection#1{\T@Pbinding=#1}
\newif\if@binding \@bindingfalse
-\newif\ifT@Ppdfa \T@Ppdfafalse
\newif\ifchapterbibliography \chapterbibliographyfalse
\newif\ifclassica \classicafalse
\DeclareOption{cucitura}{\@bindingtrue}
@@ -923,7 +940,8 @@ the TOPtesi bundle]
\DeclareOption{classica}{\classicatrue}
\DeclareOption{autoretitolo}{\ifclassica\@utoretitolotrue\fi}
\DeclareOption{oldstyle}{\ifclassica\@ldstyletrue\fi}
-\DeclareOption{pdfa}{\T@Ppdfatrue}
+\DeclareOption{pdfa}{\PackageWarning{toptesi}{Option pdfa ignored.\MessageBreak
+Read documentation toptesi-it-*.pdf, because package pdfx has changed}}
\DeclareOption{usefrontespizio}{\T@Pfrontespiziotrue\TOPfrontfalse}
\DeclareOption{noTOPfront}{\T@Pfrontespiziotrue\TOPfrontfalse}
%
@@ -1068,7 +1086,7 @@ the TOPtesi bundle]
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil \nobreak
- \hb@xt@\@pnumwidth{\hss\unless\ifxetex\normalfont\fi\scshape{#2}}\par
+ \hb@xt@\@pnumwidth{\hss\ifPDFTeX\normalfont\fi\scshape{#2}}\par
\penalty\@highpenalty
\endgroup
\fi}
@@ -1594,16 +1612,18 @@ Skipping any redefinition\MessageBreak}%
}
% \end{macrocode}
%
-% Last but not least, here come the specifications for the PDF/A-1b format. First of
-% all the patches to the macros |\not| and |\mapstochar| that produce problems with
-% the format, because they have a declared width of 0\,pt; this is no problem for
-% \texttt{latex} or \texttt{pdflatex}, but it is a problem for the PDF/A format.
-% Therefore these commands must be replaced by equivalent ones that do not use zero-width
-% glyps. For |\not|, another slash can be used, but in order to have it the right size
-% in all math typesetting modes it is necessary to have a different command for
-% every mode; this is achieved with the |\mathchoice| primitive as such:
+% Last but not least, here come the specifications for the PDF/A-1b format.
+% First of all the patches to the macros |\not| and |\mapstochar| that produce
+% problems with the format, because they have a declared width of 0\,pt; this
+% is no problem for \texttt{latex} or \texttt{pdflatex}, but it is a problem
+% for the PDF/A format.
+% Therefore these commands must be replaced by equivalent ones that do not use
+% zero-width glyphs. For |\not|, another slash can be used, but in order to
+% have it the right size in all math typesetting modes it is necessary to have
+% a different command for every mode; this is achieved with the |\mathchoice|
+% primitive as such:
% \begin{macrocode}
-\ifxetex\else
+\ifPDFTeX
\renewcommand*\not{\mathrel{\mathchoice%
{\rlap{$\displaystyle\mkern2.5mu\mathnormal{/}$}}%
{\rlap{$\textstyle\mkern2.5mu\mathnormal{/}$}}%
@@ -1611,13 +1631,13 @@ Skipping any redefinition\MessageBreak}%
{\rlap{$\scriptscriptstyle\mkern2.5mu\mathnormal{/}$}}%
}}
% \end{macrocode}
-% Actually the zero-width property of the slash must be simulated with a zero-width box
-% but within this box it is necessary to specify the typesetting style of the math
-% mode material.
+% Actually the zero-width property of the slash must be simulated with a
+% zero-width box but within this box it is necessary to specify the typesetting
+% style of the math mode material.
%
-% A similar trick is used to patch the |\mapstochar| command but no other glyph was
-% found suitable for substituting the original one; therefore we had to make it up
-% with the |picture| environment:
+% A similar trick is used to patch the |\mapstochar| command but no other glyph
+% was found suitable for substituting the original one; therefore we had to make
+% it up with the |picture| environment:
% \begin{macrocode}
\renewcommand\mapstochar{\mathrel{\mathchoice
{\displaystyle\unitlength=0.0555\fontdimen6\font
@@ -1634,34 +1654,14 @@ Skipping any redefinition\MessageBreak}%
\line(0,1){4}}\endpicture}
}}\fi
% \end{macrocode}
-% The above patches are introduced irrespective of using \texttt{pdflatex} for producing
-% a PDF/A compliant file; one might need to produce a traditional PDF file, or even a
-% DVI file, to be converted to the PS format, in order to possibly further transform
-% it to PDF/A by means of \texttt{ghostscript} (see the details in the
-% \texttt{ps2pdf.html} file belonging to the \texttt{ghostscript} documentationx). The
-% patches are avoided if XeLaTeX is being used with the UNICODE math definitions.
-%
-% Finally, if the class option |pdfa| was specified, we load the |pdfx.sty| file
-% with the suitable option for typesetting a (hopefully) PDF/A compliant file.
-% We must remember that |pdfx.sty| on turn loads
-% the |hyperref.sty| file with the necessary |pdfa| option. The user, therefore does
-% not need to reload that package, but is free to configure it through the
-% |\hypersetup| command arguments right at the beginning of the thesis main file.
-%
-% Nevertheless if \XeLaTeX\ is being used to typeset the document, loading
-% of the package |pdfx| skipped; at the same time if the |pdfa| option was
-% specified, the |hyperref| package gets loaded anyhow. If with \XeLaTeX\ you
-% do not want to use hyperlinks, do not specifica the |pdfa| option to the
-% |toptesi| class.
-% \begin{macrocode}
-\ifT@Ppdfa
- \unless\ifxetex
- \RequirePackage[a-1b]{pdfx}
- \else
- \RequirePackage{hyperref}
- \fi
-\fi
-% \end{macrocode}
+% The above patches are introduced irrespective of using \texttt{pdflatex} for
+% producing a PDF/A compliant file; one might need to produce a traditional PDF
+% file, or even a DVI file, to be converted to the PS format, in order to
+% possibly further transform it to PDF/A by means of \texttt{ghostscript} (see
+% the details in the \texttt{ps2pdf.html} file belonging to the
+% \texttt{ghostscript} documentationx).
+% The patches are avoided if XeLaTeX is being used with the UNICODE math
+% definitions.
%
% \subsection{The \texttt{classica} option}
% As mentioned above, the \texttt{classica} option was devised in order to cope with
@@ -1771,13 +1771,13 @@ Skipping any redefinition\MessageBreak}%
\def\@oddfoot{\null \hfill \textbf{\lapagina} \hfill \null}%
\let\@evenfoot\@oddfoot
\def\@evenhead{%
- \setbox\@intesta\hbox{\unless\ifxetex\latintext\fi
+ \setbox\@intesta\hbox{\ifPDFTeX\latintext\fi
\footnotesize\strut\textsc{%
\@author\ifx\@secondauthor\empty\else\ et al.\fi: \@stitle}%
}%
\ifdim\wd\@intesta>\textwidth\headwrn{\titolo}\fi
\underline{\makebox[\textwidth]{\box\@intesta}}}%
- \def\@oddhead{\unless\ifxetex\latintext\fi
+ \def\@oddhead{\ifPDFTeX\latintext\fi
\setbox\@intesta\hbox{%
\footnotesize\strut\textsl{\rightmark}}%
\ifdim\wd\@intesta>\textwidth \headWarn{\section}\fi%
@@ -1788,19 +1788,19 @@ Skipping any redefinition\MessageBreak}%
\renewcommand*{\ps@headings}{\let\@mkboth\markboth
\def\@oddfoot{\null \hfill \textbf{\lapagina}\hfill \null}%
\let\@evenfoot\empty\let\@evenhead\empty
- \def\@oddhead{{\setbox\z@\hbox{\unless\ifxetex\latintext\fi\footnotesize
+ \def\@oddhead{{\setbox\z@\hbox{\ifPDFTeX\latintext\fi\footnotesize
\textsc{%
\@author\ifx\@secondauthor\empty\else\ et al.\fi: \@stitle}}%
- \setbox\tw@\hbox{\unless\ifxetex\latintext\fi\footnotesize\textsl{\rightmark}}%
+ \setbox\tw@\hbox{\ifPDFTeX\latintext\fi\footnotesize\textsl{\rightmark}}%
\dimen@=\dimexpr2em + \wd\z@ + \wd\tw@\relax
\ifdim\dimen@<\textwidth \relax
\else
\setbox\z@\vbox{\hsize.48\textwidth\parindent\z@\raggedright
- \unless\ifxetex\latintext\fi\footnotesize\textsc{%
+ \ifPDFTeX\latintext\fi\footnotesize\textsc{%
\@author\ifx\@secondauthor\empty\else\ et al.\fi: \@stitle
}}%
\setbox\tw@\vbox{\hsize.48\textwidth\parindent\z@\raggedleft
- \unless\ifxetex\latintext\fi\footnotesize\textsl{\rightmark}}%
+ \ifPDFTeX\latintext\fi\footnotesize\textsl{\rightmark}}%
\fi
\setbox\@intesta\vbox to\z@{%
\vss\hbox to\textwidth{\strut\box\z@\hfill\box\tw@}}%
@@ -1935,10 +1935,7 @@ Skipping any redefinition\MessageBreak}%
% \iffalse
%<*topfrn>
% \fi
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{topfront}[2015/11/03 v.5.86g Title page for TOPtesi and other classes]
-% \end{macrocode}
+%
% In oder to use |topfront| as a stand-alone extension package with other
% classes it is necessary to verify if the |classica| option corresponds
% to a valid setting of |\ifclassica|; since this test is defined in the
@@ -2988,11 +2985,7 @@ Skipping any redefinition\MessageBreak}%
% \iffalse
%<*topcmn>
% \fi
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e
-\ProvidesPackage{topcoman}%
- [2015/11/03 v.5.86g 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
% the math roman fonts, as it is by default; some authors prefer to use both symbols
@@ -3000,8 +2993,8 @@ Skipping any redefinition\MessageBreak}%
% the XeTeX typesetting engine is used; in facts the Unicode math defines specific
% commands for setting any Latin or Greek mathematical letter in any possible font shape and series.
% \begin{macrocode}
-\RequirePackage{ifxetex}
-\ifxetex\else
+\RequirePackage{iftex}
+\ifPDFTeX
\newcommand*\DeclareSlantedCapitalGreekLetters{%
\mathchardef\Gamma="7100
\mathchardef\Delta="7101
@@ -3024,23 +3017,24 @@ Skipping any redefinition\MessageBreak}%
% already loaded the |\RequirePackage| command performs the necessary tests and possibly
% does not load anything.
% \begin{macrocode}
-\providecommand{\ensuremath}[1]{\ifmmode#1\else$#1$\fi}%
-\providecommand\textormath{}
-\renewcommand{\textormath}{\ifmmode\expandafter\@secondoftwo\else
+\providecommand*\ensuremath[1]{\ifmmode#1\else$#1$\fi}%
+\providecommand*\textormath{}
+\renewcommand*\textormath{\ifmmode\expandafter\@secondoftwo\else
\expandafter\@firstoftwo\fi}
\providecommand*\textsubscript{\raisebox{-0.5ex}}
-\ifxetex\else
+\ifPDFTeX
\RequirePackage{textcomp}
\fi
% \end{macrocode}
-% The following commands may be already defined; should they be missing they are supplied
-% here. Most of them are already defined in the Italian option to the
-% \texttt{babel} language if the thesis is typeset with \textsf{pdflatex} that loads that
-% package; these commands are not predefined if the thesis is typeset with \XeLaTeX\
-% that does not load the \texttt{babel} package; but remember; this package may be used
-% as a stand alone one, without the initial call by the \texttt{toptesi} document class,
-% so that the language Italian might be undefined.
+% The following commands may be already defined; should they be missing they
+% are supplied here. Most of them are already defined in the Italian option
+% to the \texttt{babel} language if the thesis is typeset with \textsf{pdflatex}
+% that loads that package; these commands are not predefined if the thesis is
+% typeset with \XeLaTeX\ or \LuaLaTeX\ that do not load the \texttt{babel}
+% package; but remember; this package may be used as a stand alone one, without
+% the initial call by the \texttt{toptesi} document class, so that the language
+% Italian might be undefined.
% \begin{macrocode}
\providecommand{\ohm}{\textormath{\textohm}{\mathrm{\Omega}}}
\providecommand{\ped}[1]{\textormath{\textsubscript{#1}}{_{\mathrm{#1}}}}
@@ -3048,8 +3042,13 @@ Skipping any redefinition\MessageBreak}%
\providecommand{\unit}[1]{\ensuremath{{\mathrm{\,#1}}}}
\providecommand{\gei}{\ensuremath{{\mathop{\mathrm{j}}\nolimits}}}
\providecommand{\eu}{\ensuremath{{\mathop{\mathrm{e}}\nolimits}}}
-\providecommand{\micro}{\textormath{\textmu}{\ifxetex\mathup{\mu}\else
- \ifx\muup\undefined\mu\else\muup\fi\fi}}
+\providecommand{\micro}{\textormath{\textmu}{%
+ \ifPDFTeX
+ \ifx\muup\undefined\mu\else\muup\fi
+ \else
+ \mathup{\mu}%
+ \fi
+}}
\providecommand{\gradi}{\textormath{\textdegree}{^\circ}}
% \end{macrocode}
%