summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/toptesi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-29 21:29:15 +0000
committerKarl Berry <karl@freefriends.org>2013-03-29 21:29:15 +0000
commit6144e158828b4bf657bf525ddbb73c73725af6d5 (patch)
tree61b598a76225cc72108cb4b5a430c668f397cc44 /Master/texmf-dist/source/latex/toptesi
parent74af3538d2e25cc0e6a663296f9debd9ac8d5f76 (diff)
toptesi (28mar13)
git-svn-id: svn://tug.org/texlive/trunk@29550 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/toptesi')
-rw-r--r--Master/texmf-dist/source/latex/toptesi/toptesi.dtx216
1 files changed, 122 insertions, 94 deletions
diff --git a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx
index 8bf510aed60..3d93b393bea 100644
--- a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx
+++ b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx
@@ -87,7 +87,7 @@ its source file is another example of how to use toptesi.
% \iffalse
%<*driver>
\documentclass{ltxdoc}
-\ProvidesFile{toptesi.dtx}[2013/03/08 v.5.70 Documented TeX file for
+\ProvidesFile{toptesi.dtx}[2013/03/27 v.5.71 Documented TeX file for
the TOPtesi bundle]
\GetFileInfo{toptesi.dtx}
\title{The TOPtesi bundle}
@@ -96,6 +96,7 @@ the TOPtesi bundle]
\usepackage{metalogo}
\def\prog#1{\textsf{#1}}
+\def\pack#1{\textsf{\slshape#1}}
\begin{document}\errorcontextlines=9
\maketitle
\setlength\hfuzz{20pt}
@@ -104,7 +105,7 @@ the TOPtesi bundle]
%</driver>
% \fi
%
-% \CheckSum{2654}
+% \CheckSum{2694}
%
%% \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
@@ -139,10 +140,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 micro type package, but the wide choice of
+% OpenType fonts replaces almost completely such missing feature.
% \end{abstract}
%
% \section{Introduction}
@@ -155,8 +156,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.
@@ -168,36 +169,37 @@ the TOPtesi bundle]
% \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 logo of his/her
-% university, but s/he should pay attention to use it according to the rules and limitations
-% of the university.
+% 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 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.
+% 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}
%
% The above files are complemented with a configuration file that any user may
-% personalize 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}
-% package contains localizations for many languages, but such localisations deal
-% with the standard infix \LaTeX\ names and phrases and do not cope with the thesis
-% title page requirements.
+% customize at will; these customizations 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
+% 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 resident in the specific platform where the document is being
-% typeset. For what concerns theses this might be of essential importance when the thesis
-% refers to specific languages that use different scripts (Greek, Russian, Bulgarian,
-% Chinese, Japanese, Korean, 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 at this version number this bundle
-% should be considered as a ``beta'' one. The only main drawback still present when running
+% 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 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
@@ -207,11 +209,11 @@ the TOPtesi bundle]
%
% \section{User commands}
% The \texttt{toptesi.cls} is basically an extension of the standard class
-% \texttt{report.cls}; it redefines the page typesetting grid, the headers and the footers,
-% and the title page layout and commands.
-% \texttt{toptesi.cls} does not set such crazy settings as ``double spaced'' text; it is
-% intended to typeset the thesis with the quality of a \LaTeX\ well typeset document, not
-% as a typewriter written one.
+% \texttt{report.cls}; it redefines the page typesetting grid, the headers
+% and the footers, and the title page layout and commands. \texttt{toptesi.cls}
+% does not set such crazy settings as ``double spaced'' text; it is intended
+% 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,
% texts written in non latin alphabets, special symbols for philological mark-up, and
@@ -220,6 +222,13 @@ the TOPtesi bundle]
% on typesetting styles that refer to the ``gone by times'' of mechanical typewriters
% should be banned.
%
+% At the same time the class allows to typeset theses on any paper format;
+% nowadays, in facts, Universities are requesting theses in smaller formats
+% 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
@@ -227,13 +236,17 @@ the TOPtesi bundle]
% 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 plus the ones
-% defined here:
+% The class accepts all the options accepted by the |report| document class
+% plus the ones defined here:
% \begin{description}\def\Item[#1]{\item[\texttt{#1}]}
%
% \Item[chapterbib] Allows to typeset a list of references at the end
% of each chapter and the bibliography items are numbered with a \emph{chapter.item}
-% indication.
+% indication. This implies a manual build up of each end-of-chapter bibliography
+% by means off a specific |thebibliography| environment. This works may be
+% avoided if the user relies on the various packages already available in any
+% complete \TeX\ system distribution and the facilities offered by packages
+% such as \pack{biblatex} and sorting end formatting engines such as \prog{biber}.
%
% \Item[classica] Specifies a general modification of certain details that are
% supposed to be more adequate in the humanities fields; specifically this option
@@ -695,27 +708,29 @@ the TOPtesi bundle]
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{toptesi}%
-[2013/03/08 v.5.70 Class for typesetting university theses]
+[2013/03/27 v.5.71 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 latter, on turn,
-% is called with the \texttt{a4paper} option. According to the \LaTeX\ machinery of option
-% passing, the options passed on to the loaded class should be appended to the existing
-% options, so that if \texttt{letterpaper} was specified in the calling statement of
-% \texttt{toptesi}, this last option would override the default \texttt{a4paper} option.
-% The same holds true for the other package options except for the encoding name used
-% as an option for the \texttt{inputenc} package; this simply does not work and the
-% package is not loaded any more as it was in the previous versions\footnote{Thanks to
-% Enrico Gregorio who pointed out this feature.}.
-% Similarly if another language was specified in the list of \texttt{toptesi}
-% options, this language would be appended yo the \texttt{babel} package default options
-% and would become the default language.
-% \begin{macrocode}
+% \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 they 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
+% \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*{\PassOptionsToClass{\CurrentOption}{report}}
+\ExecuteOptions{a4paper}
\ProcessOptions\relax
-\LoadClass[a4paper]{report}
+\LoadClass{report}
\RequirePackage{ifxetex}
\ifxetex
\RequirePackage{fontspec}
@@ -749,7 +764,7 @@ the TOPtesi bundle]
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{toptesi}%
-[2013/03/08 v.5.70 Extension for toptesi.cls]%
+[2013/03/27 v.5.71 Extension for toptesi.cls]%
% \end{macrocode}
%
% We start with defining the debugging macros; these trace commands and macros
@@ -763,11 +778,11 @@ the TOPtesi bundle]
% Now we define the specific package macros: \texttt{classica} and \texttt{trieste}
% are identical; \texttt{trieste} 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 \texttt{extsizes} pacckage and is already
-% included in any complete distribution of the major \TeX\ system ones; in previous versions
-% of this bundle there was a specific option class file for this large size, but with the
-% latest complete distributions available, there is no chance that the existing option file
-% is missing.
+% 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;
+% in previous versions of this bundle there was a specific option class file for
+% this large size, but with the latest complete distributions available, there
+% is no chance that the existing option file is missing.
%
% \texttt{chapterbib} allows to set a list of references at the end of each chapter.
%
@@ -779,6 +794,13 @@ the TOPtesi bundle]
\newif\if@xivpt \@xivptfalse
% \end{macrocode}
%
+% A binding correction is established; its default value is parametrized 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.
% \begin{macrocode}
\newlength\T@Pbinding\setlength\T@Pbinding{7mm}
\def\setbindingcorrection#1{\T@Pbinding=#1}
@@ -807,51 +829,51 @@ the TOPtesi bundle]
\if@xivpt\input{size14.clo}\fi
% \end{macrocode}
%
-% The text height gets set so as to cope with the standard UNI A4 size; in
-% any case the typesetting grid is set to an height of 585pt and is then
-% rounded to an integer number of lines depending on the size option
-% that has been chosen. The |\topmargin|, |\headheight| and |\headsep|
-% parameters have already been set in the size class option file, so that here
-% just a small adjustment is made.
+% 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.
%
% \begin{macrocode}
-\textheight 585pt
+\newlength\interno
+\textheight 0.7\paperheight
\divide\textheight by \baselineskip
\multiply\textheight by \baselineskip
\advance\textheight by \topskip
% \end{macrocode}
-% For the text grid width a certain reduction is made if the extra size of 14pt is chosen.
+% The inner margin is parametrized to the paper width, but a small correction
+% is made if the extra size of 14pt is chosen.Also the footskip is parametrized
+% to the paper height in a slightly different way when the large |14pt| size is chosen.
% \begin{macrocode}
\ifx\f@size\@xivpt
- \textwidth=138mm
+ \setlength\interno{\dimexpr\paperwidth/6}
+ \footskip=1,5\basleineskip
\else
- \textwidth=150mm
+ \setlength\interno{\dimexpr\paperwidth/7}
+ \footskip=2\baselineskip
\fi
% \end{macrocode}
-% Because of the above adjustment the right and left margins must be recomputed;
-% in any case they must be recomputed because the default positioning of the
-% text grid is centered; only if the class option \texttt{cucitura} is specified
-% (|\if@binding| in this case is true) the text grids are moved to the outside
-% in order to leave a wider inner margin. At the same time if the text grid is moved to
-% the outside, the marginal note width must be reduced accordingly. These changes are
-% executed at the |\begin{document}| stage.
-% \begin{macrocode}
-\oddsidemargin=\paperwidth
-\advance\oddsidemargin -\textwidth
-\divide\oddsidemargin \tw@
-\advance\oddsidemargin -1in
+% The convenience pod holding the spine margin didth 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.
+% \begin{macrocode}
+\oddsidemargin=\dimexpr\interno-1in\relax
\evensidemargin=\oddsidemargin
-\marginparwidth\oddsidemargin
-\advance\marginparwidth 1in
+\marginparwidth\interno
\advance\marginparwidth-2.5\marginparsep
-%
\AtBeginDocument{%
\if@binding
- \typeout{Messaggio Toptesi: Ricalcolo i margini}
+ \PackageInfo{TOPtesi}{Margin width recalculation}
+ \PackageInfo{TOPtesi}{Before:\MessageBreak
+ oddsidemargin\space\space \the\oddsidemargin\MessageBreak
+ evensidemargin\space \the\evensidemargin}
\advance\oddsidemargin \T@Pbinding
\advance\evensidemargin -\T@Pbinding
\advance\marginparwidth -\T@Pbinding
+ \PackageInfo{TOPtesi}{After:\MessageBreak
+ oddsidemargin\space\space \the\oddsidemargin\MessageBreak
+ evensidemargin\space \the\evensidemargin}
\fi}
+\textwidth=\dimexpr\paperwidth-2\interno\relax
+
% \end{macrocode}
%
% We now establish the page style. We start by setting to ``empy'' the tokens that
@@ -979,7 +1001,8 @@ the TOPtesi bundle]
% \begin{macrocode}
\newcommand\blankpagestyle[1]{\def\blank@ps{#1}}
\def\blank@ps{plain}
-\renewcommand\cleardoublepage{\clearpage\ifodd\value{page}\else\if@twoside\if@openright
+\renewcommand\cleardoublepage{\clearpage\ifodd\value{page}\else
+ \if@twoside\if@openright
\clearpage\null\thispagestyle{\blank@ps}\clearpage\fi\fi\fi}
% \end{macrocode}
%
@@ -1772,7 +1795,7 @@ Skipping any redefinition\MessageBreak}%
% \fi
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{topfront}[2013/03/08 v.5.70 Title page for TOPtesi]
+\ProvidesPackage{topfront}[2013/03/27 v.5.71 Title page for TOPtesi]
% \end{macrocode}
%
% The title page information depends on the type of ``thesis' that is being typeset.
@@ -1983,12 +2006,17 @@ Skipping any redefinition\MessageBreak}%
% Finally |\logosede| gets the name of the graphic file that contains the information
% relative to the university logo; it may receive also a list of logo file names, as it
% might be necessary when a thesis is developed in a multiple university environment. If
-% such logo file is not available, the user does not specify
-% this command; if the user uses this command to insert one or more university logo files
+% such logo file is not available, the user does not specify this command; if the
+% thesis is typeset on smaller paper size than A4 or letter, it would be much
+% better to avoid inserting one or more logos in the title page; this is
+% particularly necessary when using A5 paper size. Nevertheless this decision is
+% left to the user and this package neither controls this fact nor outputs any warning.
+% If the user uses this command to insert one or more university logo files
% but some file is not available, the usual \texttt{graphicx} package warning is issued
% but compilation goes on without the missing logo.
-% The treatment of one or more logo files, it is necessary to have available some extra
-% commands and control sequences citable to store temporary data or to specify style
+%
+% The treatment of one or more logo files requires some extra
+% commands and control sequences suitable to store temporary data or to specify style
% parameters: one is the name of a save box; another is the default spacing between the
% logos in the typeset page; the third is the height of the logos. The default spacing
% may be set with the help of the macro |\setlogodistance| -- notice that the default
@@ -2037,7 +2065,7 @@ Skipping any redefinition\MessageBreak}%
\newcommand*\setlogodistance[1]{\TPT@logospace=#1}
\providecommand*{\@logosede}{}
-\newcommand\logosede[2][3cm]{\def\@logosede{#2}\TPT@logoheight=#1}
+\newcommand\logosede[2][\interno]{\def\@logosede{#2}\TPT@logoheight=#1}
\newcommand\printloghi{\ifdefvoid{\@logosede}{}{%
\begin{lrbox}{\TPT@logobox}\hskip\TPT@logospace
@@ -2212,10 +2240,10 @@ Skipping any redefinition\MessageBreak}%
\@height2ex\vrule\@height1.4\p@\@depth-\p@\@width50mm\hfil}%
\fi
}}%
- \def\@oddfoot{\vbox to 15mm{\vss
+ \def\@oddfoot{\vbox to \dimexpr\paperheight/20\relax{\vss
\ifclassica
\hbox to \hsize{\hfil\raisebox{-.3ex}[\z@][\z@]{%
- \vrule\@height-2.6\p@\@depth3\p@\@width50mm}\hfil}%
+ \vrule\@height-2.6\p@\@depth3\p@\@width\dimexpr\textwidth/3}\hfil}%
\fi
\hbox to\hsize{\hfill{\Large{\@submitdate}}\hfill}}%
}%
@@ -2588,7 +2616,7 @@ Skipping any redefinition\MessageBreak}%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e
\ProvidesPackage{topcoman}%
- [2013/03/08 v.5.70 Additional commands for the TOPtesi bundle]
+ [2013/03/27 v.5.71 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