From 9987fbc1d8713da67d44b2da148fcd80a30cef27 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 18 Sep 2014 23:03:28 +0000 Subject: toptesi (16sep14) git-svn-id: svn://tug.org/texlive/trunk@35201 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/toptesi/toptesi.dtx | 187 +++++++++++---------- 1 file changed, 97 insertions(+), 90 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx index c39f2646366..b6f86db134f 100644 --- a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx +++ b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx @@ -91,7 +91,7 @@ its source file is another example of how to use toptesi. % \iffalse %<*driver> \documentclass{ltxdoc} -\ProvidesFile{toptesi.dtx}[2013/09/11 v.5.75 Documented TeX file for +\ProvidesFile{toptesi.dtx}[2014/09/15 v.5.77 Documented TeX file for the TOPtesi bundle] \GetFileInfo{toptesi.dtx} \title{The TOPtesi bundle} @@ -112,7 +112,7 @@ the TOPtesi bundle] % % \fi % -% \CheckSum{2791} +% \CheckSum{2787} % %% \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 @@ -170,18 +170,18 @@ the TOPtesi bundle] % although this use is discouraged. % \item A second extension package \texttt{topfront.sty} that contain the commands % and the typesetting macros for the title page; this file may be used as an -% 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. +% 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. % \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 -% universities; these logos are not distributed anymore because of legal constraints. Every -% one who is working on his/her degree course final report must retrieve the +% universities; these logos are not distributed anymore because of legal constraints. +% 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 +% \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} @@ -274,12 +274,12 @@ the TOPtesi bundle] % \Item[autoretitolo] This option modifies the left hand (even numbered) pages % in two side typesetting; normally the even numbered page headings contain % the chapter title, while the odd numbered ones contain the current section title. -% If the \texttt{classica} option has been specified, then with this option it is possible to -% 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 -% sectioning commands. +% If the \texttt{classica} option has been specified, then with this option it is +% possible to 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 sectioning commands. % % \Item[oldstyle] Also this option works only if \texttt{classica} had already been % specified; it typesets several numerical data with the old style numbers. @@ -310,9 +310,9 @@ the TOPtesi bundle] % \begin{description} % \def\cs#1{\texttt{\char92#1}} % \def\Item[#1]{\item[\normalfont\cs{#1}]} -% \Item[frontespizio] is the actual command that typesets the title page and this command -% uses all the information that is passed to it by means of the following -% commands. +% \Item[frontespizio] is the actual command that typesets the title page and +% this command uses all the information that is passed +% to it by means of the following commands. % \Item[monografia] sets the bachelor's report style and retrieves its title % \Item[titolo] gets the master or PhD thesis title and an optional thesis short title % \Item[sottotitolo] gets the thesis subtitle if any @@ -378,7 +378,7 @@ the TOPtesi bundle] % 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'' -% \Item[TesiDiLaurea] gets the generic phrase that describes the thesis; by default it is +% \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 @@ -394,16 +394,16 @@ the TOPtesi bundle] % 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 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 external -% margin so as to have a wider internal margin to accommodate the binding -% correction. Its argument is not optional and is used to modify the -% default correction of 7\,mm. +% 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 +% 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 +% external margin so as to have a wider internal margin to accommodate +% the binding correction. Its argument is not optional and is used to +% modify the default correction of 7\,mm. % \Item[retrofrontespizio] with its argument, made up one or several paragraphs, defines % what should be printed on the verso of the title page, generally named % ``copyright page''; if this command is specified with an empty @@ -435,11 +435,11 @@ the TOPtesi bundle] % % 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 then -% start the document by specifying |\selectlanguage{french}|. But the user should pay -% attention to use \texttt{babel} in the proper way: +% 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 then 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 @@ -466,26 +466,28 @@ the TOPtesi bundle] % \TeX\ system distributions this might not be true. With both distributions also the % languages 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 the list of all -% language hyphenation rules that are available in the format file is being shown. -% 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. +% 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 +% the list of all language hyphenation rules that are available in the format file is +% being shown. +% While (American) English is the default and almost any \emph{basic} distribution +% of the \TeX\ system has several preloaded languages, 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 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 and put them in the proper places of the standard or the local folder +% tree. % 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 -% 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. +% 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} % % The TOPtesi bundle adds very little to the user commands; nevertheless the package @@ -581,13 +583,13 @@ the TOPtesi bundle] % 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. % -% \section{Format PDF suitable for archiving} +% \section{PDF format suitable for archiving} % 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 \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. +% 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. % % 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 @@ -715,7 +717,7 @@ the TOPtesi bundle] % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{toptesi}% -[2013/09/11 v.5.75 Class for typesetting university theses] +[2014/09/15 v.5.77 Class for typesetting university theses] % \end{macrocode} % % The class itself is very simple since it requires just the \texttt{report} document @@ -771,7 +773,7 @@ the TOPtesi bundle] % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{toptesi}% -[2013/09/11 v.5.75 Extension for toptesi.cls]% +[2014/09/15 v.5.77 Extension for toptesi.cls]% % \end{macrocode} % % We start with defining the debugging macros; these trace commands and macros @@ -852,7 +854,7 @@ the TOPtesi bundle] % \begin{macrocode} \ifx\f@size\@xivpt \setlength\interno{\dimexpr\paperwidth/6} - \footskip=1,5\basleineskip + \footskip=1,5\baselineskip \else \setlength\interno{\dimexpr\paperwidth/7} \footskip=2\baselineskip @@ -1037,7 +1039,7 @@ the TOPtesi bundle] % \end{macrocode} % The strings |\summaryname| and |\acknowledgename| are not defined in any % language option to \texttt{babel}. Default definitions are given below, but the user -% must define new names for localizing the package in a language different from +% must define new names for localising the package in a language different from % Italian and English. % % We have to modify the |\chapter| and |\part| commands so that as the user @@ -1400,8 +1402,8 @@ Skipping any redefinition\MessageBreak}% % default; therefore both caption macros |\captionsitalian| and |\captionsenglish| are % already defined and can be freely extended. For any other language the corresponding % language option must be entered in the class opening statement, otherwise a warning -% is issued but compilation is not stopped. Therefore if, for example, the user wants to write -% the thesis in Spanish, the thesis main file shall start like this: +% is issued but compilation is not stopped. Therefore if, for example, the user wants +% to write the thesis in Spanish, the thesis main file shall start like this: % \begin{verbatim} % \documentclass[...,spanish]{toptesi} % \ExtendCaptions{spanish}{Resumen}{Agradecimientos} @@ -1440,7 +1442,7 @@ Skipping any redefinition\MessageBreak}% % 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 suffixes to specify +% \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 @@ -1529,8 +1531,8 @@ Skipping any redefinition\MessageBreak}% % Nevertheless if \XeLaTeX\ is being used to typeset the document, loading of the package % |pdfx| is skipped; at the same time the |hyperref| package is being loaded anyhow % just because the |pdfa| option was specified, but at least the |pdfa| option is -% specified, so that even if it's necessary to resort to |ghostscript| in order to produce -% a PDF/A compliant file, at least the hyperlinks to external sites are suitably +% specified, so that even if it's necessary to resort to |ghostscript| in order to +% produce a PDF/A compliant file, at least the hyperlinks to external sites are suitably % ``sterilized''. % \begin{macrocode} \ifT@Ppdfa @@ -1543,20 +1545,20 @@ Skipping any redefinition\MessageBreak}% % \end{macrocode} % % \subsection{The \texttt{classica} option} -% As mentioned above, the \texttt{classica} option was devised in order to cope with theses -% in humanities and the specifications came from Paolo Ciacchi, a student of the University -% of Trieste, who was preparing a master thesis in classical Greek philology. The necessity -% of the large normal size derived from the necessity of having clear mark-up signs among -% the myriad signs philologists use, that sometimes let me believe that the philological -% mark-up requires typesetting environments similar to the mathematical ones, since the -% material to be typeset does not form linear sequences, as in plain text, but -% bi-dimensional structures as in mathematics. -% -% The other requirements involve the title page and I agreed to implement them, since they -% are likely to be useful for other universities as well; the effort for localizing this -% bundle makes this point less stringent compared to the previous versions, but there are -% other layout fine points that cannot be solved with a simple substitution of infix -% strings. +% As mentioned above, the \texttt{classica} option was devised in order to cope with +% theses in humanities and the specifications came from Paolo Ciacchi, a student of +% the University of Trieste, who was preparing a master thesis in classical Greek +% philology. The necessity of the large normal size derived from the necessity of +% having clear mark-up signs among the myriad signs philologists use, that sometimes +% let me believe that the philological mark-up requires typesetting environments +% similar to the mathematical ones, since the material to be typeset does not form +% linear sequences, as in plain text, but bi-dimensional structures as in mathematics. +% +% The other requirements involve the title page and I agreed to implement them, since +% they are likely to be useful for other universities as well; the effort for +% localising this bundle makes this point less stringent compared to the previous +% versions, but there are other layout fine points that cannot be solved with a simple +% substitution of infix strings. % % The singular and plural masculine and feminine strings for ``candidate'' are redefined. % For other languages the configuration file comes in handy. @@ -1579,15 +1581,14 @@ Skipping any redefinition\MessageBreak}% % mechanism is set up to create a different title page for each volume; % we need a volume counter and a command to start each volume; the % |\frontespizio| macro typesets the real title page and we have already -% seen that it can print the volume ordinal. The localization allows to +% seen that it can print the volume ordinal. The localisation allows to % change the infix string that is going to be printed. When several tomes % are involved, instead of using the |\frontespizio| macro, use the |\tomo| % one, that provides to stepping up the volume counter before actually % printing the new tome title page. % \begin{macrocode} \newcounter{tomo} -\newcommand*{\tomo}{\clearpage\stepcounter{tomo}% - \ifbool{classica}{\frontespizio*}{\frontespizio}} +\newcommand*{\tomo}{\clearpage\stepcounter{tomo}\frontespizio} % \end{macrocode} % Folios as well are to be redefined and also the page styles require a redefinition so as % to being able to use old style numbers. The macro |\lapagina| (it's not a case the this @@ -1804,7 +1805,7 @@ Skipping any redefinition\MessageBreak}% % \fi % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{topfront}[2013/09/11 v.5.75 Title page for TOPtesi] +\ProvidesPackage{topfront}[2014/09/15 v.5.77 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 @@ -1828,7 +1829,11 @@ Skipping any redefinition\MessageBreak}% % past. We need the some device to switch positions to the logos, without % actually changing the page layout. Since the logo(s) are sort of large, % the header must smash the header contents, so as to avoid any modification -% of the position and size of the other parts of the page. The |TPT@logobox| box is being denied later on and the |\logosede| command takes care of filling it up/ +% of the position and size of the other parts of the page. The |TPT@logobox| +% box is being defined later on and the |\logosede| command takes care of +% filling it up. Besides these devices, the |\frontepsizio| command accepts +% an optional asterisk, so that by setting the asterisk in the source file, +% as in |\frontespizio*|, the page styles are switched. % \begin{macrocode} \def\headstrut{\vrule \@depth4\p@ \@height\z@ \@width\z@} \def\ps@titlepage{\let\@mkboth\@gobbletwo @@ -1849,7 +1854,9 @@ Skipping any redefinition\MessageBreak}% } % \end{macrocode} % -% similarly a different title page style for typesetting the logos in the lower half of the page is defined; since it is the only style usable with the classic option, wi call it the |classica| page style: +% 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} \def\ps@classica{\let\@mkboth\markboth \def\@oddhead{\vbox{% @@ -2240,8 +2247,8 @@ Skipping any redefinition\MessageBreak}% % definitions are simply ``blank''; the others are in Italian. All of them, except the % supervisor and candidate strings may be individually redefined in the configuration % file or in the preamble. Those that cannot be redefined such as the four ``candidate'' -% strings may be actually redefined through the single |\CandidateName| that should be used -% in a language depended way and with the correct number and gender once for all. +% strings may be actually redefined through the single |\CandidateName| that should be +% used in a language depended way and with the correct number and gender once for all. % The four endings in the Italian strings allow to exercise the correct selection only % for Italian; a specific test is made inside the |\frontespizio| command; because of % this the same machinery cannot be used, say, for French but may be in the future this @@ -2320,22 +2327,22 @@ Skipping any redefinition\MessageBreak}% % page; if the |classica| option has been set, the logos can be typeset only % in the lower half of the title page, else the procedure tests if the % |\frontespizio command| is followed by the asterisk. The macro |\fr@ntespizio| -% is the one that is invoked after such tests; it starts with the selection of the title page style; t local redefinition%>>>>>> -% of the +% is the one that is invoked after such tests; it starts with the selection +% of the title page style; the local redefinition of the % \texttt{myheadings} page style or a new |titlepage| page style; with the former one % the university name goes into the header, while the exam date goes into the footer; % with the latter style, on the opposite, the university logo(s) go in the header, % while the Exam date remains in the footer. In this way the information that must % be typeset on the title page is not crunched in too little a space and the overall -% text bounding box assumes a shape similar to that of the page. +% text bounding box assumes a shape similar to that of the page. % % Everything is closed within a group so all definitions remain local. % \begin{macrocode} \newif\iftopTPTlogos \def\frontespizio{% - \ifbool{classica}{\topTPTlogosfalse\fr@ntespizio}% else - {\@ifstar{\topTPTlogosfalse\fr@ntespizio}% - {\topTPTlogostrue\fr@ntespizio}}} + \ifbool{classica}{\topTPTlogosfalse}{% else + \@ifstar{\topTPTlogosfalse}{\topTPTlogostrue}}% + \fr@ntespizio} \def\fr@ntespizio{% \begingroup @@ -2449,14 +2456,14 @@ Skipping any redefinition\MessageBreak}% % \end{macrocode} % con l'eventuale sottotitolo: % \begin{macrocode} - \ifx\@subtitle\empty \else + \unless\ifx\@subtitle\empty \begin{center}% \large\textrm{\@subtitle}\par \end{center}% \fi % \end{macrocode} % If the option \texttt{classica} is in force the thesis might be divided in several -% volumes; theses in humanities are apparently often oversized. In this case the +% volumes; theses in humanities apparently are often oversized. In this case the % |\frontespizio| command may be given at the beginning of every volume and the % counter \texttt{tomo} is stepped up; the volume number is therefore printed in % each title page; the infix string may be redefined as it was shown above. @@ -2751,7 +2758,7 @@ Skipping any redefinition\MessageBreak}% % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e \ProvidesPackage{topcoman}% - [2013/09/11 v.5.75 Additional commands for the TOPtesi bundle] + [2014/09/15 v.5.77 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