diff options
author | Karl Berry <karl@freefriends.org> | 2011-11-02 22:53:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-11-02 22:53:48 +0000 |
commit | a5797bfe0d38a27b9e5a2cbf4f118eb09232fad0 (patch) | |
tree | b55baca02dc28aeaa3cf06ae4ba917122837c0b8 /Master/texmf-dist/source | |
parent | 6f714441a5f4ecd5bc220e2f50cc98472bc079d0 (diff) |
toptesi 5.59c (30oct11)
git-svn-id: svn://tug.org/texlive/trunk@24466 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/toptesi/toptesi.dtx | 176 |
1 files changed, 107 insertions, 69 deletions
diff --git a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx index e74e3c9ffa6..07f7c2a5686 100644 --- a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx +++ b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx @@ -39,11 +39,11 @@ frontpages. 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 +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-doc-xetex.pdf is in Italian; its source file is -another example of how to use toptesi. +another example of how to use toptesi while typesetting with XeLaTeX. \endpostamble \askforoverwritefalse @@ -58,7 +58,7 @@ another example of how to use toptesi. \endgroup %</internal> % -% Copyright 1989--2006 Claudio Beccari +% Copyright 1989--2011 Claudio Beccari % % This file is part of the TOPtesi bundle % ------------------------------------------- @@ -85,7 +85,7 @@ another example of how to use toptesi. % \iffalse %<*driver> \documentclass{ltxdoc} -\ProvidesFile{toptesi.dtx}[2011/10/06 v.5.59b Documented TeX file for +\ProvidesFile{toptesi.dtx}[2011/10/18 v.5.59c Documented TeX file for the TOPtesi bundle] \GetFileInfo{toptesi.dtx} \title{The TOPtesi bundle} @@ -102,7 +102,7 @@ the TOPtesi bundle] %</driver> % \fi % -% \CheckSum{2559} +% \CheckSum{2590} % %% \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 @@ -137,10 +137,10 @@ the TOPtesi bundle] % 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. +% 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 |microtype| package, but the wide choice of OpenType fonts replaces +% almost completely such missing feature. % \end{abstract} % % \section{Introduction} @@ -153,8 +153,8 @@ the TOPtesi bundle] % 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. +% 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. @@ -170,14 +170,15 @@ the TOPtesi bundle] % 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. +% \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 % for typesetting one's thesis with XeLaTeX. % \end{itemize} % % The above files are complemented with a configuration file that any user may -% personalize at will; these personalizations make it easy to configure the +% customize at will; these personalizations 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 contains localizations for many languages, but such % localisations deal with the standard infix \LaTeX\ names and phrases and do not cope @@ -199,7 +200,7 @@ the TOPtesi bundle] % \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 +% 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}. % @@ -212,10 +213,10 @@ the TOPtesi bundle] % as a typewriter written one. % % Theses very often are full of specialized material: formulas, diagrams and pictures, -% texts written in non latin alphabets, special symbols for philological mark-up, and +% 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 -% on typesetting styles that refer to the ``gone by times'' of mechanical typewriters +% on typesetting styles that refer to the ``gone-by-times'' of mechanical typewriters % should be banned. % % Most new commands refer themselves to the information that should be typeset in the @@ -239,15 +240,14 @@ the TOPtesi bundle] % some variations are also introduced in the title page. % % \Item[cucitura] In two sided printing it is better to move the -% typesetting grid towards the outer edges so as to cope with the thesis binding +% typesetting grid towards the outer margins so as to cope with the thesis binding % that is generally not made up by sewing together a number of signatures; % the default outer displacement is fixed to~7mm, but it can be customized by means % of a proper entry in the configuration file or by an explicit command in the preamble. % -% \Item[14pt] Extends the normal size choice to 14 points; it is appreciated -% in various fields of humanities, but I would discourage this use in a technical -% thesis, where 10 point perhaps is too small, but 11 point or 12 point typesetting -% may be adequate. +% \Item[14pt] Extends the normal size choice to 14 points; it is appreciated in various +% fields of humanities, but I would discourage this use in a technical thesis, where 10 point +% default size perhaps is too small, but 11 point or 12 point typesetting may be adequate. % % \Item[autoretitolo] This option modifies the left hand (even numbered) pages % in two side typesetting; normally the even numbered page headings contain @@ -256,7 +256,7 @@ the TOPtesi bundle] % have even numbered headings contain the author's name and the thesis title, while the odd % numbered ones contain the chapter title. Since the thesis title might be too % long to fit in the header together with the author's name, the |\title| macro -% as been modified so as to accept an optional short title, similarly to the +% as been modified so as to accept an optional short title, similarly to the other % sectioning commands. % % \Item[oldstyle] Also this option works only if \texttt{classica} had already been @@ -275,9 +275,9 @@ the TOPtesi bundle] % typeset, possibly with hilarious results\dots % % Since most users are supposed to be Italian, the user commands are mostly in Italian; -% the following description gives their names and meanings; every command receives one -% argument; only the command |\title| accepts an optional argument according to the usual -% \LaTeX\ syntax: +% the following description gives their names and meanings; most commands receive one +% argument; only the command |\titolo| and |\cleardoublepage| accept an optional argument +% according to the usual \LaTeX\ syntax: % \[ % \makebox[0pt]{% % \texttt{\char92}\emph{command}\relax @@ -313,8 +313,8 @@ the TOPtesi bundle] % \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[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 @@ -330,10 +330,10 @@ 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 labeling 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 @@ -341,7 +341,10 @@ the TOPtesi bundle] % 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. +% number. Alternatively it is possible to redefine the macros |\Candidato| +% (masculine singular), |\Candidata| (feminine singular), |\Candidati| +% (masculine or mixed gender plural), |\Candidate| (feminine plural), in +% order to adjust the candidates' labels to 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. @@ -378,6 +381,13 @@ the TOPtesi bundle] % margin so as to have a wider internal margin to accommodate for the binding % correction. Its argument is not optional and is used to modify the default % correction of 7\,mm. +% \Item[cleardoublepage] may be used as the default command, but it accepts an optional +% argument in order to chose the page style for the possible blank page to be +% output in order to open the next major section on an odd page when +% typesetting with the |twosides| option. +% \Item[setcleardoublepage] uses its argument to establish the default page style when +% typesetting a blanck page by means of the command |\cleardoublepage|. If +% this command is not used the default page style is |plain|. % \end{description} % % Since the infix strings are all memorized into control sequences and for each of them it @@ -394,23 +404,24 @@ the TOPtesi bundle] % \subsection{Typesetting commands} % The bundle and the TOPtesi document class accept all \LaTeX\ commands provided by % the \LaTeX\ \texttt{kernel}, the \texttt{report} document class, and the \texttt{graphicx} -% extension package, besides those provided by the \texttt{babel} package. +% extension package, besides those provided by the \texttt{babel} or \texttt{polyglossia} +% packages. % 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. % -% 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. 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 so start the document by specifying |\selectlanguage{french}|. +% 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. 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 so start the +% document by specifying |\selectlanguage{french}|. % But the user should pay attention to use \texttt{babel} in the proper way: % \begin{itemize} -% \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 +% \item Due to the way \LaTeX\ classes load the requested package 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; therefore, if the thesis has % to be typeset, for example, in French, is is necessary to do the following: @@ -420,7 +431,7 @@ the TOPtesi bundle] %\begin{document} %\selectlanguage{french} %\end{verbatim} -% But if the thesis should be typeset in Frenche by means of \XeLaTeX, then it is perfectly +% But if the thesis should be typeset in French by means of \XeLaTeX, then it is perfectly % legal to specify the auxiliary language in this way: %\begin{verbatim} %\documentclass[...]{toptesi} @@ -429,18 +440,18 @@ the TOPtesi bundle] %\begin{document} %\selectlanguage{french} %\end{verbatim} -% \item With the 2010 \TeX\ system distributions, both \TeX Live and MiKTeX, all known +% \item With the 2010 \TeX\ system full distributions, both \TeX Live and MiKTeX, all known % (to \LaTeX) language hyphenation rules are preloaded; with other less up to date % \TeX\ system distributions this might not be true. With both distributions also the -% languages hyphenation rules known to \XeLaTeX\ are all preloaded. +% language hyphenation rules known to \XeLaTeX\ are all preloaded. % Remember that \texttt{babel} and \texttt{polyglossia} macros select the language % typesetting rules, but hyphenation is activated only if the program format file has been % generated with the pertinent language hyphenation rules. You can check this detail by % reading the first dozen lines of your thesis \texttt{.log} file; there is the list of all % language hyphenation rules that are available in the format file. -% While (American) English is the default and almost any \emph{basic} distribution of the \TeX\ -% system has many language defaults, it is more likely that French is preloaded while Italian is -% not. Complete distributions don't exhibit this flaw. +% While (American) English is the default and almost any \emph{basic} distribution of the +% \TeX\ system has many language defaults, it is more likely that French is preloaded while +% Italian is not. Complete distributions don't exhibit this flaw. % % 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 @@ -461,7 +472,7 @@ the TOPtesi bundle] % 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 +% available any more when you select the other 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 @@ -474,8 +485,12 @@ the TOPtesi bundle] % 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. +% 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. Beware: in French, in +% spite of the ISO regulations, the Greek math symbols are supposed to be always upright, +% both the upper and lower case letters; with XeLaTeX there are no problems; when using +% pdfLaTeX it's necessary to use font that have both varieties of Greek letters, such as the +% Times eXtended , the Palatino eXtende, the Fourier fonts, et cetera. % % % \Item[ensuremath] should be already defined in the \LaTeX\ kernel; % should one still be using an obsolete version, this command gets @@ -488,7 +503,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 whatever is not a variable, from the names of -% functions (such as sin, cos, log, etc.), to the indices that contain +% functions (such as sin, cos, log, etc.), to any index that contains % 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 % a set, while, say, $V_{\mathrm{max}}$ indicates the maximum value of the @@ -525,24 +540,24 @@ the TOPtesi bundle] % (much shorter than the traditional Italian name ``i~lunga'') and the % indicated spelling ``gei'' is the phonetic Italian rendering of the % English word. The imaginary unit is not a variable, and the ISO regulations -% require it is typed with anxx upright serifed font, just as operators are. +% require it to be typed with an upright serifed font, just as operators are. % % % \Item[eu] inserts the Euler number symbol ``e'' in upright type; since % this entity is not a variable, but it is a mathematical constant, the % ISO regulations require it to be written in upright type. The ISO regulations require % the upright type for ``e'' and any mathematical constant, but -% the electron charge $e$ is typeset in math italics because this physical +% the electron charge $e$ is typeset in math italics because this is a physical % ``constant'', not a mathematical one. \XeTeX\ allows to typeset upright Greek letters, % so there is the facility to typeset an upright ``pi'' (the number) to be distinguished % from an inclined ''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. +% written for the thesis; for best results it is recommended that the source program +% lines are 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} @@ -553,7 +568,7 @@ the TOPtesi bundle] % because the typesetting engine in this case cannot directly produce a PDF formatted output % file. For this reason the option \texttt{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 be disabled. +% the thesis is typeset by means of \XeLaTeX, the effects of this options are disabled. % % Politecnico di Torino as well as many other Italian and foreign universities are % moving towards archiving theses in electronic format, specifically in the PDF one. The @@ -561,10 +576,11 @@ the TOPtesi bundle] % years from now?'' % % This essential question has been answered by the International Standards Organization -% (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 -% the `b' one is less stringent. +% (ISO) that in 2005 published the regulation\footnote{In 2011 the updated regulation +% 19005-2:2011 has been published, but ths does not imply substancial modifications in this +% thesis bundle.} 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 the `b' one is less stringent. % % 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 @@ -677,7 +693,7 @@ the TOPtesi bundle] %<*class> \NeedsTeXFormat{LaTeX2e} \ProvidesClass{toptesi} - [2011/10/06 v.5.59b Class for typesetting university theses] + [2011/10/18 v.5.59c Class for typesetting university theses] % \end{macrocode} % % The class itself is very simple since it requires just the \texttt{report} @@ -725,7 +741,7 @@ the TOPtesi bundle] % \begin{macrocode} %<*topsty> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{toptesi}[2011/10/06 v.5.59b Extension for toptesi.cls]% +\ProvidesPackage{toptesi}[2011/10/18 v.5.59c Extension for toptesi.cls]% % \end{macrocode} % % We start with defining the debugging macros; these trace commands and macros @@ -928,7 +944,7 @@ the TOPtesi bundle] \def\frontmatter{\clearpage\ps@plain\pagenumbering{roman}% \numeriromanitrue\frontmattertrue\@openrightfalse} \def\mainmatter{\if@twoside\@openrighttrue\fi - \clearpage\ps@headings\pagenumbering{arabic}% + \cleardoublepage\ps@headings\pagenumbering{arabic}% \numeriromanifalse\frontmatterfalse} \AtBeginDocument{\frontmatter} % \end{macrocode} @@ -987,6 +1003,10 @@ the TOPtesi bundle] \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi \null\vfil \secdef\@part\@spart} +\def\@endpart{\vfil\cleardoublepage + \if@tempswa + \twocolumn + \fi} % \end{macrocode} % At the same time we have to make sure that |\tableofcontents|, % |\listoftables| and |\listoffigures| do not exit from the front matter style. @@ -1694,6 +1714,24 @@ Skipping any redefinition\MessageBreak}% }{% \endlist\clearpage } +% \end{macrocode} +% Another enhancement that |toptesi| has compared to the original |report| class is a +% redefined |\cleardoublepage| macro. This new macro may leave, as usual, a blank page in +% order to skip to an odd numbered one. But the default style of this blank page may be set +% as the user likes best. The default style is |plain|, because I think that it's better to +% always have a numbered page than a totally white page. Nevertheless what I think it is more +% suitable is not something anybody should agree with; therefore the command accepts an +% optional argument so as to use the style s/he likes best; moreover the command +% |\setcleardoublepage| redefines the default style as many times the user would like to +% switch style. |\TT@clpagedefault| contains the default style; |\setcleardoublepage| +% redefines the above default, and |\cleardoublepage| uses the symbolic name +% |\TT@clpagedefault| or the optional argument and therefore uses the style that has been set +% as the default one or the style the uses wants to use in a particular instance. +% \begin{macrocode} +\def\TT@clpagedefault{plain} +\newcommand*\setcleardoublepage[1]{\gdef\TT@clpagedefault{#1}} +\renewcommand\cleardoublepage[1][\TT@clpagedefault]{\clearpage\if@twoside \ifodd\c@page\else + \hbox{}\thispagestyle{#1}\newpage\if@twocolumn\hbox{}\thispagestyle{#1}\newpage\fi\fi\fi} %</topsty> % \end{macrocode} % @@ -1713,7 +1751,7 @@ Skipping any redefinition\MessageBreak}% % \begin{macrocode} %<*topfrn> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{topfront}[2011/10/06 v.5.59b Title page for TOPtesi] +\ProvidesPackage{topfront}[2011/10/18 v.5.59c Title page for TOPtesi] % \end{macrocode} % % The title page information depends on the type of ``thesis' that is being typeset. @@ -2442,7 +2480,7 @@ Skipping any redefinition\MessageBreak}% % \begin{macrocode} %<*topcmn> \NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e -\ProvidesPackage{topcoman}[2011/10/06 v.5.59b Additional TOPtesi commands] +\ProvidesPackage{topcoman}[2011/10/18 v.5.59c Additional TOPtesi commands] % \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 |