diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/toptesi/toptesi.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/toptesi/toptesi.dtx | 189 |
1 files changed, 170 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx index fe502447533..51194f9c3f0 100644 --- a/Master/texmf-dist/source/latex/toptesi/toptesi.dtx +++ b/Master/texmf-dist/source/latex/toptesi/toptesi.dtx @@ -27,7 +27,7 @@ % \iffalse %<*driver> \documentclass{ltxdoc} -\ProvidesFile{toptesi.dtx}[2006/12/15 v.4.06 Documented TeX file for +\ProvidesFile{toptesi.dtx}[2008/12/14 v.5.00 Documented TeX file for the TOPtesi bundle] \GetFileInfo{toptesi.dtx} \title{The TOPtesi bundle} @@ -42,7 +42,7 @@ the TOPtesi bundle] %</driver> % \fi % -% \CheckSum{2842} +% \CheckSum{2912} % %% \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 @@ -407,6 +407,99 @@ the TOPtesi bundle] % All these commands are defined into the separate package \texttt{topcoman.sty} % that can be used as an independent extension package for any document class. % +% \section{Format PDF suitable for archiving} +% Politecnico di Torino as well as many other Italian and non Italian universities are +% moving towards archiving theses in electronic format, specifically in the PDF one. The +% problem of course is: ``Will it be possible to read the archived documents, say, fifty +% years from now?'' +% +% This essential question has been answered by the International Standards Organization +% (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. +% +% 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 the library search. +% +% Since version 1.40, the program \texttt{pdflatex}, possibly with the addition of +% some patches, is capable of producing PDF/A-1b conforming files, provided that some +% attention is put into the manipulation of the source file of the thesis. With the +% distribution of the 2008 version of the \TeX\ system, the executable \texttt{pdflatex} +% has version number 1.40.9 and should be capable of producing PDF/A-1b files without +% the need of any patch. +% +% The particular attention needed to avoid problems with the PDF/A certification is +% summarized as follows: +% \begin{itemize} +% \item The preliminary essential requirement is that the \texttt{pdflatex} used to +% typeset the thesis be sufficiently recent to support the PDF/A requirements. Have +% a 2008, or even better, a 2009 version of the \TeX\ system installed on your PC. +% Do not try to typeset the thesis +% with the `old' \LaTeX; you must process the input thesis file(s) with +% \texttt{pdflatex}; 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 with |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. + +% \item Download from \textsc{ctan} and install the package \textsf{pdfx}, if it is +% not already part of your \TeX\ system installation. % \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 in 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} documetation. 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. +%\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. +%\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 font for +% this text is 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 +% the 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. +%\end{itemize} +% +% Up to day the realization of a PDF/A conforming file sets forth several problems +% that are of great concern for the large Institutions that have thousands of document +% a year to archive; it is not a question implied in the free nature of the +% \texttt{pdflatex} program, that, on the opposite, according to our experience has +% a very high rate of +% success in producing PDF/A conforming documents. If you stick to the default \TeX\ +% system 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 % % \section{Documented code} @@ -419,7 +512,7 @@ the TOPtesi bundle] %<*class> \NeedsTeXFormat{LaTeX2e} \ProvidesClass{toptesi}% -[2006/04/04 v.4.00.02 Class for typesetting university theses] +[2008/12/15 v.5.00 Class for typesetting university theses] % \end{macrocode} % % The class itself is very simple since it requires just the \texttt{report} @@ -457,7 +550,7 @@ the TOPtesi bundle] %<*topsty> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{toptesi}% -[2006/08/22 v.4.00.03 Extension for toptesi.cls]% +[2008/12/15 v.5.00 Extension for toptesi.cls]% % \end{macrocode} % % We start with defining the debugging macros; these trace commands and macros @@ -476,23 +569,27 @@ the TOPtesi bundle] % files. \texttt{chapterbib} allows to set a list of references at the end of each chapter. % \begin{macrocode} \newif\if@binding \@bindingfalse +\newif\ifT@Ppdfa \T@Ppdfafalse \newif\ifchapterbibliography \chapterbibliographyfalse \DeclareOption{cucitura}{\@bindingtrue} \DeclareOption{14pt}{\input{topsiz14.clo}} \DeclareOption{chapterbib}{\chapterbibliographytrue} \DeclareOption{trieste}{\AtEndOfPackage{\RequirePackage{trieste}}} \DeclareOption{classica}{\AtEndOfPackage{\RequirePackage{trieste}}} +\DeclareOption{pdfa}{\T@Ppdfatrue} % \ProcessOptions\relax % \end{macrocode} % The \texttt{graphicx} package is loaded by default; it is required for -% inserting the university logo; if the user forgets that this package has already been loaded +% inserting the university logo; if the user forgets that this package has already +% been loaded % nothing dramatic happens, because the |\usepackage| and |\RequirePackage| macros -% perform the necessary tests in order to avoid reloading the same packages again and again. +% perform the necessary tests in order to avoid reloading the same packages again +% and again. % \begin{macrocode} \RequirePackage{graphicx} % \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 @@ -821,7 +918,7 @@ the TOPtesi bundle] % I initially set the caption width (a new length) to the overall text width diminished by 3em; % then if the caption text, inclusive of the caption type string and number, is shorter than % the text width it is typeset as centered text; if it exceeds the text width -% it is set as a justified paragraph whose line with equals the established caption with; +% it is set as a justified paragraph whose line width equals the established caption width; % but in any case the last line of the paragraph is measured and if it is shorter than one third % of the caption width, this width is shortened a little bit and the paragraph is set again % with this shortened caption width; in order to be sure that one iteration is @@ -854,7 +951,7 @@ the TOPtesi bundle] % because the new lines do not necessarily contain the same amount of inter word % space, some words might have been hyphenated in a different way, and so on. % Moreover we do not want a caption that barely exceeds the length of -% |\captionwidth| to be retyped into a two line caption width is about one half +% |\captionwidth| to be retyped into a two line caption width that is about one half % of the width of the other captions. Therefore we allow for some white space in % the last line by computing the new caption width with the following formula % \[ y=\frac{(N+0.5)x + x_2}{N+1} \] @@ -865,8 +962,8 @@ the TOPtesi bundle] \small \parskip\z@ \parindent\z@ \finalhyphendemerits 100000\relax \linespread{0.95}\selectfont - \vskip \abovedisplayskip - \vskip \abovedisplayskip\captionwidth=\hsize + \vskip \abovecaptionskip + \captionwidth=\hsize \advance\captionwidth-3em \setbox0 \hbox{#1.\quad#2}% \ifdim\wd0>\hsize @@ -1054,15 +1151,69 @@ Skipping any redefinition\MessageBreak}% \RequirePackage{topfront} \RequirePackage{topcoman} \def\sf@size{7} +% \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 command 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: +% \begin{macrocode} +\renewcommand*\not{\mathrel{\mathchoice% + {\rlap{$\displaystyle\mkern2.5mu\mathnormal{/}$}}% + {\rlap{$\textstyle\mkern2.5mu\mathnormal{/}$}}% + {\rlap{$\scriptstyle\mkern2.5mu\mathnormal{/}$}}% + {\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. +% +% 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 + \picture(0,0)\put(1,1.5){\linethickness{0.72\unitlength}% + \line(0,1){6}}\endpicture} +{\textstyle\unitlength=0.0555\fontdimen6\font + \picture(0,0)\put(1,1.5){\linethickness{0.72\unitlength}% + \line(0,1){6}}\endpicture} +{\scriptstyle\unitlength=0.0555\fontdimen6\font + \picture(0,0)\put(1,0.55){\linethickness{0.61\unitlength}% + \line(0,1){5}}\endpicture} +{\scriptscriptstyle\unitlength=0.0555\fontdimen6\font + \picture(0,0)\put(1,0.2){\linethickness{0.56\unitlength}% + \line(0,1){4}}\endpicture} +}} +% \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). +% +% Finally, if the class option |pdfa| was specified, we load the |pdfx.sty| file +% with the suitable option for typesetting a (hopefully) PDF/A conforming 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. +% \begin{macrocode} +\ifT@Ppdfa\RequirePackage[a-1b]{pdfx}\fi %</topsty> % \end{macrocode} % \subsection{The package file \texttt{topfront.sty}} -% This file is input by \texttt{toptesi}, version 4.x, but it can be used as an +% This file is input by \texttt{toptesi}, version 5.x, but it can be used as an % independent extension package. % % It contains all the definition for the composition of just the title page -% along the style requirements of \texttt{toptesi}, version 4.x. +% along the style requirements of \texttt{toptesi}, version 5.x. % It makes use of an optional configuration file where the user can define % a lot of default information and all the infix language dependent strings % that are peculiar to this title page. @@ -1073,7 +1224,7 @@ Skipping any redefinition\MessageBreak}% % \begin{macrocode} %<*topfrn> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{topfront}[2006/09/04 v.4.00.04 Title page for TOPtesi] +\ProvidesPackage{topfront}[2008/12/15 v.5.00 Title page for TOPtesi] % \end{macrocode} % % The title page information depends on the type of ``thesis' that is being typeset. @@ -1426,7 +1577,7 @@ Skipping any redefinition\MessageBreak}% % \@ifundefined{@TesiDiLaurea}{\def\@TesiDiLaurea{Tesi di Laurea}}{} \@ifundefined{@phdschool}{\def\@phdschool{SCUOLA DI DOTTORATO}}{} -\@ifundefined{@PhDname}{\def\@PhDname{Dottorato in}}{} +\@ifundefined{@PhDname}{\def\@PhDname{Dottorato in }}{} \@ifundefined{@laureaname}{\def\@laureaname{Corso di Laurea in }}{} \@ifundefined{@dissertazione}{\def\@dissertazione{Tesi di Dottorato}}{} \@ifundefined{@monografia}{\def\@monografia{Monografia di Laurea}}{} @@ -1809,7 +1960,7 @@ Skipping any redefinition\MessageBreak}% %<*topcmn> \NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e \ProvidesPackage{topcoman}% - [2006/12/15 v.4.01 Additional commands for the TOPtesi bundle] + [2008/12/15 v.5.00 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 @@ -1904,7 +2055,7 @@ Skipping any redefinition\MessageBreak}% % environments we make sure to typeset these numerals with script size capitals; % this solution is not probably the best one but it works; it typesets % these roman numerals with the current font; for this thesis bundle roman numerals -% are used only for folios, therefore there are no problems with a choice of fonts shapes +% are used only for folios, therefore there are no problems with a choice of font shapes % and series. But for this task we need a robust command in order to set the script math % size % \begin{macrocode} @@ -1950,7 +2101,7 @@ Skipping any redefinition\MessageBreak}% %<*top14> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{topsiz14.clo}% - [2006/04/16 v.4.00.01 TopTesi 14pt size-option file] + [2008/12/15 v.5.00 TopTesi 14pt size-option file] \renewcommand\normalsize{% \@setfontsize\normalsize\@xivpt{18}% \abovedisplayskip 14\p@ \@plus3\p@ \@minus7\p@ @@ -2135,7 +2286,7 @@ Skipping any redefinition\MessageBreak}% %<*toptrst> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{trieste}% - [2005/12/08 v.4.00.00 opzioni specifiche per Trieste] + [2008/12/15 v.5.00 specific options for classical thesis typesetting] \def\StileTrieste{classica} % \end{macrocode} % |