diff options
Diffstat (limited to 'macros/latex')
-rw-r--r-- | macros/latex/contrib/easybook/easybook.dtx | 6 | ||||
-rw-r--r-- | macros/latex/contrib/easybook/easybook.pdf | bin | 590670 -> 590675 bytes | |||
-rw-r--r-- | macros/latex/contrib/easybook/easybook.tex | 6 | ||||
-rw-r--r-- | macros/latex/contrib/pm-isomath/README.txt | 2 | ||||
-rw-r--r-- | macros/latex/contrib/pm-isomath/pm-isomath.dtx | 125 | ||||
-rw-r--r-- | macros/latex/contrib/pm-isomath/pm-isomath.pdf | bin | 653361 -> 698710 bytes | |||
-rw-r--r-- | macros/latex/contrib/ut-thesis/README | 2 | ||||
-rw-r--r-- | macros/latex/contrib/ut-thesis/ut-thesis.dtx | 265 | ||||
-rw-r--r-- | macros/latex/contrib/ut-thesis/ut-thesis.pdf | bin | 142544 -> 140267 bytes |
9 files changed, 227 insertions, 179 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 5b3b53d4aa..7c5e902059 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/08/20}{1.29d} +\ProvidesExplClass{easybook}{2021/08/26}{1.29e} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -297,7 +297,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/08/20}{1.29d} +\ProvidesExplPackage{easybase}{2021/08/26}{1.29e} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } @@ -2394,7 +2394,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/20}{1.29d} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/26}{1.29e} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex a577e025b6..117cc43f28 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index 4107882ddb..2c340d9b21 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -12,8 +12,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.29d, - date = 2021/08/20, + version = v1.29e, + date = 2021/08/26, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = quee123@foxmail.com, @@ -26,7 +26,7 @@ abstract-format = \small, title-format = \huge\sffamily } -\KOMAoptions{headsepline = 0.6pt,numbers = {noenddot}} +\KOMAoptions{headsepline = 0.6pt,numbers = noenddot} \setfootnoterule[0.6pt]{0.4\columnwidth} \addtokomafont{headsepline}{\color{cnltxblue}} \addtokomafont{footnoterule}{\color{cnltxblue}} diff --git a/macros/latex/contrib/pm-isomath/README.txt b/macros/latex/contrib/pm-isomath/README.txt index 3b23a56269..cce6a172e5 100644 --- a/macros/latex/contrib/pm-isomath/README.txt +++ b/macros/latex/contrib/pm-isomath/README.txt @@ -1,4 +1,4 @@ - README.txt file for pm-isomath.sty 2021/05/15 v.1.1.07 + README.txt file for pm-isomath.sty 2021/08/24 v.1.2.00 Distributable under the LaTeX Project Public License, diff --git a/macros/latex/contrib/pm-isomath/pm-isomath.dtx b/macros/latex/contrib/pm-isomath/pm-isomath.dtx index 61a4df91da..28d8960585 100644 --- a/macros/latex/contrib/pm-isomath/pm-isomath.dtx +++ b/macros/latex/contrib/pm-isomath/pm-isomath.dtx @@ -57,7 +57,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file %<style>\ProvidesPackage{pm-isomath}[% %<txt>\ProvidesFile{README.txt}[% %<*driver,style,txt> - 2021/05/15 v.1.1.07 + 2021/08/24 v.1.2.00 %<txt> README file for pm-isomath.sty] %<style>Poor man package for typesetting ISO compliant math when using pdfLaTeX] %</driver,style,txt> @@ -75,6 +75,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file \usepackage[utf8]{inputenc} \usepackage[LGR,T1]{fontenc} \usepackage{lmodern,textcomp} +%\usepackage{libertinus,libertinust1math} \usepackage{pm-isomath} \usepackage{siunitx} \let\originalmeta\meta @@ -104,7 +105,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file %</driver> % \fi % -% \CheckSum{501}% +% \CheckSum{511} % \begin{abstract} % The ISO regulations for typesetting math in the field of physics % and technology are pretty stringent and imply legal questions @@ -119,7 +120,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % % With \LuaLaTeX\ and \XeLaTeX, while using OpenType math fonts % there should not be any difficulty in fulfilling the regulations, -% but with \pdfLaTeX; things are not so simple. There exist some +% but with \pdfLaTeX things are not so simple. There exist some % facilities, but sometimes they do not work. % % This package provides some robust work-arounds to bypass the @@ -130,8 +131,8 @@ This work consists of this file pm-isomath.dtx, a README.txt file % The ISO regulations (formerly ISO\,31/XI, now ISO\,80000) are % stringent rules to typeset mathematics in the domains of physics % and experimental sciences; their title explicitly mentions “physics -% and technology”, but their careful reading lets us understand that -% they apply to all sciences that use the “mathematics of +% and physical sciences”, but their careful reading lets us understand +% that they apply to all sciences that use the “mathematics of % quantities”. Such entities form a special group or space, % where the elements are couples of two ordered entities $(x, y)$, % where $y$ represents the unit of measure and $x$ represents the @@ -145,7 +146,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % is always accompanied by a certain degree of uncertainty; % metrologists are the masters in measuring quantities % and handling their measures and uncertainties, but although -% for simplicity laypeople handles measures as if hey were rational +% for simplicity laypeople handle measures as if hey were rational % numbers (after all aren't they the ratio of something to be % measured and the unit of measure?) we are facing the domain % of fuzzy sets. @@ -182,11 +183,12 @@ This work consists of this file pm-isomath.dtx, a README.txt file % % These regulations can be purchased from the ISO site in % Switzerland; they are quite expensive and the cost is -% affordable by associated professional studios or large +% affordable by associated professional studios and large % academic and/or research institutions. % % For private users I'd suggest to download the PDF document -% \url{https://www.nist.gov/pml/special-publication-811-extended- contents}. This document has been produced by the National +% \url{https://www.nist.gov/pml/special-publication-811-extended- contents}. +% This document has been produced by the National % Institute for Science and Technology, the Institution that % several years ago was appointed to replace the United States % National Bureau of Standards. Their staff is made essentially @@ -205,9 +207,10 @@ This work consists of this file pm-isomath.dtx, a README.txt file % is not a limitation set forth by the underlying interpreter % \pdfTeX. Matter of fact there exists the quite recent % LibertinusT1math fonts for \pdfLaTeX, created by Michael Sharpe, -% that, to my best knowledge, are the only math 8-bit encoded fonts with 256 glyphs. Package |libertinust1math| accepts the |ISO| option +% that, to my best knowledge, are the only math 8-bit encoded fonts +% with 256 glyphs. Package |libertinust1math| accepts the |ISO| option % that allows to fulfil the ISO regulations; it accepts other -% options; depending on which ones are specified the number +% options; depending on which ones are specified, the number % of math groups, beyond the essential first four ones, increases % by three to six units, reaching a maximum of ten; there remains % enough free math groups to satisfy most user requirements. @@ -215,9 +218,8 @@ This work consists of this file pm-isomath.dtx, a README.txt file % But even while using such LibertinusT1math fonts, \pdfTeX\ % suffers from another handicap derived from the knuthian % original \TeX-the-program and by the NFSS (New Font Selection -% Scheme, which is not new any more, because it dates back to -% 1994, when \LaTeX\,2.09 became obsolete and was substituted -% by \LaTeXe.). I am not complaining about these \pdfTeX\ and +% Scheme, that dates back to 1994, when \LaTeXe\ started its life.). +% I am not complaining about these \pdfTeX\ and % \LaTeX\ limitations; for decades people have been happily % typesetting math with results that are much superior to any % other typesetting program at least when the latter does not @@ -227,7 +229,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % are handled by \pdfTeX\ and \LaTeX; such alphabets % are loaded in the form of math groups, the number of which % cannot exceed 16 (numbered from 0 to 15); each group loads -% three sizes for normal math style, for script style and for +% three sizes: for normal math style, for script style and for % script-script style. Taking into account the bold version, the % number of math groups would risk to exceed its capabilities; % in order to avoid exceeding the number limit on the math @@ -273,10 +275,10 @@ This work consists of this file pm-isomath.dtx, a README.txt file % This summary does not replace the original ISO document nor % what is written in the instructions published by NIST. It % simply recalls those rules that this package tries to implement. -% In what follows, the word ``quantity'' is used to represent +% In what follows the word \emph{quantity} is used to represent % any physical entity that may be measured according to the -% metrological practice; the word ``variable'' is used to -% represent a mathematical entity that represents variable data. +% metrological practice; the word \emph{variable} is used to +% represent a mathematical entity that may assume several values. %\begin{enumerate}[noitemsep] % \item % All quantity and variable symbols are represented by one @@ -295,7 +297,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % typesetting language and does not understand the real % meaning of what it is being typeset. % \item -% All quantity symbols must be set in italics, slanted type +% All quantity symbols must be set in italics; slanted roman type % is allowed, but serifed italics should be preferred unless % the ISO rules prescribe a sans serif font. This implies that % the differential symbol be in upright font to avoid confusion @@ -314,8 +316,8 @@ This work consists of this file pm-isomath.dtx, a README.txt file % except when the ISO rules require a sans serif font. % This rule includes numbers and their digits, symbols that % represent constant numeric values, all appositions both -% in subscript and superscript position. Appositions are not -% quantities or variables: for example in $V_i$, the +% in subscript and superscript position. Subscripts require +% special attention: for example in $V_i$, the % subscript $i$ is a variable because it represents the $i$-th % element in a sequence, such as $V_0, V_1, V_2, \dots$; on % the opposite $V_{\mathrm{i}}$ the subscript is an apposition @@ -422,7 +424,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % family for Greek fonts are the Latin Modern compliant % LGR encoded collection of CBfonts; they are always % available with any up-to-date and complete \TeX\ system -% installation. +% installation.^^A VERIFICARE! -- PUÒ DARSI CHE NON FUNZIONI CON FAMIGLIE DIVERSE % % This is also a disadvantage, in the sense that Latin Modern % fonts might not be the best ones to use with any specific @@ -524,8 +526,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file %\cs{ISOalpha}\marg{family}\parg{shape} %\cs{ISOalpha}\marg{family}\oarg{series}\parg{shape} %\end{ttsintassi} -% This offers the maximum flexibility in using the necessary -% commands. +% This offers the maximum flexibility in using the necessary commands. % % The package defines other macros for fulfilling the rules % relative to the differential symbol and the numerical constants @@ -589,7 +590,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file %\end{verbatim} % % \subparagraph{A resistivity value} -% The resistivity of copper is $1.68\,\micro\ohm\,\mathrm{cm}$ (in text mode: 1.68\unit{\micro\ohm\,cm}) +% The resistivity of copper is $1.68\,\micro\ohm\,\mathrm{cm}$ (in text mode: 1.68\unit{\micro\ohm\,cm})^^A VERIFICARE PERCHÉ IL DUE MI SONO DIVERSI -- perché \ISOfam per il greco non funziona % is typeset with the following code %\begin{verbatim} %$1.68\,\micro\ohm\,\mathrm{cm}$ (in text mode: 1.68\unit{\micro\ohm\,cm}) @@ -661,7 +662,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % % \subparagraph{ISO upright partial differential} % Among the fonts used to typeset math when using \prog{pdflatex}, -% only the LibertinusT1math font contains the upright partial +% only the LibertinusT1math fonts contain the upright partial % differential symbol that conforms the ISO regulations. All other % fonts at the moment available to typeset mathematics do not % contain an upright symbol, but they contain the original slanted @@ -687,8 +688,8 @@ This work consists of this file pm-isomath.dtx, a README.txt file % This package |pm-isomath| is far from perfect, and its results are % questionable; of course poor man solutions are just patches, % incomplete solutions; nevertheless the results are not so bad. It has -% the indubitable advantage that is does not use any math groups, -% therefore there is no risk to exceed their limit of 16~math groups. +% the indubitable advantage that is does not use any other math groups, +% therefore there is no risk to exceed the limit of 16~groups. % % As patches are not perfect, the above display of examples shows % what can be done without human intervention. Attentive users @@ -708,7 +709,12 @@ This work consists of this file pm-isomath.dtx, a README.txt file % the macro by applying an affine shearing transformation; I believe % that this new solution, thanks to Laurent Van Deik's suggestion, % is better suited to typeset ISO compliant math in a better way. -% He also helped a lot with the vector, matrix, and tensor macro testing. +% He also helped a lot with the vector, matrix, and tensor macro +% testing. Thanks to him, this new version of |pm-isomath| is +% supposed to work as expected when using the +% Libertinus+LibertinusTimath fonts and other fonts where the +% textual fonts can handle also the LGR encoding; in previous +% versions there was a remarkable mismatch in certain math styles % % \StopEventually{} % @@ -881,11 +887,28 @@ This work consists of this file pm-isomath.dtx, a README.txt file % codes for shapes, and for every valid combination of % series, shape and size it defines the specific font file % to use. +% +% If the document preamble specifies a different textual font +% from the default Latin Modern the family name default should +% be changed; this is delayed at the execution of the +% |\begin{document}| command. But this might have strange effects +% on the corresponding Greek fonts, because they might be missing. +% Example: the GFS Bodoni fonts are chosen, they are good for both +% Latin and Greek text and no problems show up. The Libertinus +% fonts contain the Latin glyphs In various encodings), and the +% LGR encoded Greek ones, the Cyrillic fonts in various encodings. +% Apparently the Libertinus fonts are the most flexible available +% fonts for use with \pdfLaTeX. Only the typewriter type text font +% may be replaced with better results with other fonts; it is not +% important for mathematics, but I preferred to write this +% documentation with Latin Roman, because it contains several +% stretches of typewriter type texts. + % We should not care for the font names, but in order to use % different font families, series, and shapes the user should % know their codes. this is generally a difficult task, but -% not impossible; it “suffices” to open the packages that +% not impossible; it ``suffices'' to open the packages that % allow to use the desired fonts, read the code and find out % the names of the |.fd| files; then search these files on the % trees of the \TeX\ system, and eventually find out the @@ -930,14 +953,20 @@ This work consists of this file pm-isomath.dtx, a README.txt file %\end{table} % % \begin{macrocode} -\def\ISOfam{lmr}\def\ISOser{m}\def\ISOsha{n} +\def\Def@Fam{lmr}\edef\ISOfam{\Def@Fam} +\def\ISOser{m} +\def\ISOsha{n} +\AtBeginDocument{% + \unless\ifx\f@family\Def@Fam\edef\ISOfam{\f@family}\fi +} + % \end{macrocode} % % As explained in the initial documentation, all font changing % commands are constructed in such a way as to have a default % family, series and shape common to both Latin and Greek fonts; % therefore with three optional arguments that the user can -% specify with different delimiters, but respecting their order, +% specify with different delimiters, but respecting their order; % the user can get eight different choice combinations that % allow the selection of a large number of different looks. % @@ -980,6 +1009,27 @@ This work consists of this file pm-isomath.dtx, a README.txt file {\usefont{LGR}{\ISOfam}{\ISOser}{\ISOsha}#1}}} % \end{macrocode} +% It is convenient to notice that for Greek letters the default +% encoding is LGR, the only encoding that \pdfLaTeX\ understands +% without the necessity of other packages. If the default text +% font family does not handle the Greek encoding, errors show +% up in different forms that difficult to handle. Therefore it +% is better to use the above commands with an explicit font +% family code, for example |lmr|, and accept the consequent +% font mismatch. After examining the result the author may +% accept the mismatch, but s/he might prefer to select a +% different textual Greek font the glyphs of which have a +% less noticeable mismatch; even better, s/he might prefer +% to use a couple of matching Latin and Greek fonts, so that +% it is possible to get e perfect match. This is why we suggest +% to typeset the document either with Latin Modern, or Libertinus +% (that is usable also with slavic languages typeset in Cyrillic); +% among the fonts provided by the Greek Font Society (GFS), the +% Bodoni collection is available with matching Latin and Greek +% families. These are just examples; the user can explore its +% own \TeX\ system installation where PFB fonts are stored and +% discover the multitude of available fonts. +% % We now define the macros for all lowercase Greek letters % and several uppercase ones (even some that are identical % to some Latin letters) that should save several keystrokes @@ -1062,7 +1112,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % abbreviation |sym| and replace it with |symbol|. % The strange test with the digit ‘9’ is a dirty trick (described in % the \TeX\-book) in order to discover if the symbol is a digit or a -% letter; With digits the vector and tensor symbols should be upright, +% letter; with digits the vector and tensor symbols should be upright, % while with letters they should be italic or slanted. The italic % correction |\/| contained by the font selection command is useful % in situations where the “text” produced by such command is followed @@ -1090,10 +1140,10 @@ This work consists of this file pm-isomath.dtx, a README.txt file % \end{macrocode} % % As shown in the previous various examples, such macros work pretty -% well, but in some circumstances they require human help; -% when the symbol is parenthesised, for example when it is the -% argument of a function, or when it is at the beginning of a math -% sub\,expression, it is not centred between the parentheses or has +% well, but in some circumstances they require human help; when the +% symbol is parenthesised, for example when it is the argument of a +% function, or when it is at the beginning of a math sub\,expression, +% either it is not centred between the parentheses, or it has % extra blank space at its left; this happens only if the vector or % tensor symbol is a letter, while if it is a digit such extra space % does not appear; such considerations hold true also for the @@ -1176,7 +1226,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % ISO regulations such symbol should be upright. For use with % \pdfLaTeX the only font distributed with any \TeX system that % contains such an upright symbol is the LibertinusT1math one; -% all other OMS encoded fonts available today do no contain it. +% all other OMS encoded fonts available today do not contain it. % The defined command |\uppartial| name is identical to the one used % by the LibertinusT1math font; therefore it is easy to check if % this symbol has already been defined. @@ -1285,7 +1335,6 @@ This work consists of this file pm-isomath.dtx, a README.txt file \DeclareRobustCommand*\ped[1]{% \textormath{\textsubscript{#1}}{_{\mathrm{#1}}}}% % -\providecommand\ap{} \DeclareRobustCommand\ap[1]{% \textormath{\textsuperscript{#1}}{^{\mathrm{#1}}}}% % diff --git a/macros/latex/contrib/pm-isomath/pm-isomath.pdf b/macros/latex/contrib/pm-isomath/pm-isomath.pdf Binary files differindex f29a3c2658..56985abe38 100644 --- a/macros/latex/contrib/pm-isomath/pm-isomath.pdf +++ b/macros/latex/contrib/pm-isomath/pm-isomath.pdf diff --git a/macros/latex/contrib/ut-thesis/README b/macros/latex/contrib/ut-thesis/README index 5f65171d63..880fe06c31 100644 --- a/macros/latex/contrib/ut-thesis/README +++ b/macros/latex/contrib/ut-thesis/README @@ -6,7 +6,7 @@ as of Fall 2020: Copyright (c) 1998-2013 Francois Pitt <fpitt@cs.utoronto.ca>, 2020-2021 Jesse Knight <jesse.knight@mail.utoronto.ca> -last updated at 23:30 (EST) on Tue 20 July 2021 +last updated at 13:00 (EST) on Thu 26 Aug 2021 This work may be distributed and/or modified under the conditions of the LaTeX Project Public Licence, either version 1.3c of this licence diff --git a/macros/latex/contrib/ut-thesis/ut-thesis.dtx b/macros/latex/contrib/ut-thesis/ut-thesis.dtx index 1478c5d25a..acb18a1f78 100644 --- a/macros/latex/contrib/ut-thesis/ut-thesis.dtx +++ b/macros/latex/contrib/ut-thesis/ut-thesis.dtx @@ -5,7 +5,7 @@ %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<class>\ProvidesClass{ut-thesis} %<*class> -[2021/07/20 v3.0.5 University of Toronto thesis class] +[2021/08/26 v3.1.5 University of Toronto thesis class] %</class> % %<*driver> @@ -20,13 +20,10 @@ \let\ottfamily\ttfamily \renewcommand{\ttfamily}{\color{code}\ottfamily} \renewcommand{\MacroFont}{\ttfamily\color{code}} -\usepackage[colorlinks,linkcolor=link]{hyperref} +\usepackage[colorlinks,linkcolor=link,urlcolor=link]{hyperref} \setlength{\skip\footins}{4ex} \setlength{\parindent}{0pt} \setlength{\parskip}{6pt} -\newcommand{\smacro}[2][0]{% - \begin{macro}{#2}\end{macro}% - \vspace{\dimexpr #1\baselineskip-3\baselineskip}} \begin{document} \DocInput{ut-thesis.dtx} \end{document} @@ -65,7 +62,7 @@ % There are two ways to do this: % \begin{itemize} % \item \textbf{local file}: Place the file |ut-thesis.cls| in your project directory. -% This is usually easiest, and works if you don't have write access +% This works if you don't have write access % in the \LaTeX\ distribution, such as if you use Overleaf. % \item \textbf{installing}: Installation steps will depend on your \LaTeX\ distribution. % Some helpful instructions can be found @@ -84,72 +81,68 @@ % % The default class options are denoted like |option*|. % -% \subsubsection{Paper Size}\label{use:opt:paper} -% -% The standard page sizes are supported, including: -% |[letterpaper*]|, and |[a4paper]|. -% % \subsubsection{Font Size}\label{use:opt:fontsize} % -% \smacro[ 1]{[10pt*]} -% \smacro[ 1]{[11pt]} -% \smacro[-2]{[12pt]} -% \begin{macro}{]} +% \begin{macro}{[10pt*]} +% \begin{macro}{[11pt]} +% \begin{macro}{[12pt]} % The three standard font sizes are supported. % SGS requires at least 10\,pt font for the text, % but captions, footnotes, etc.\ can be smaller. % \end{macro} +% \end{macro} +% \end{macro} % % \subsubsection{Line Spacing}\label{use:opt:spacing} % -% \smacro[ 1]{[singlespacing]} -% \smacro[ 1]{[onehalfspacing*]} -% \smacro[-2]{[doublespacing]} -% \begin{macro}{]} +% \begin{macro}{[singlespacing]} +% \begin{macro}{[onehalfspacing*]} +% \begin{macro}{[doublespacing]} % Three options are available for line spacing. % Note that |[singlespacing]| does not conform to the SGS guidelines, % but we provide it in case you ever prefer it while writing. % \end{macro} +% \end{macro} +% \end{macro} % % \subsubsection{Margins}\label{use:opt:margins} % -% \paragraph{Sides:} -% Three variants of margins are defined, -% reflecting preferences for printing and binding, -% the first two being the same as in the |book| class: -% -% \begin{macro}{[oneside]} -% All pages behave as if they open to the right (wider left margin). -% \end{macro} -% -% \begin{macro}{[twoside*]} -% Most pages will alternate opening to the right and left; -% however, the commands: |\maketitle|, |\begin{abstract}| and |\mainmatter|, -% which create new pages, will always open to the right, -% sometimes requiring a blank page before to do so. +% We aim to support both digital and print copies of the thesis, +% with two aspects affected: +% \begin{enumerate} +% \item whether margins are equal (digital) or unequal (print), +% where unequal margins include a wider inner margin for binding +% \item whether pages will be printed on one or both sides, +% essentially only relevant for print copies +% \end{enumerate} +% +% \begin{macro}{[equalmargins*]} +% The inner and outer margins are averaged +% to keep the |\textwidth| consistent with the |[unequalmargins]| option. % \end{macro} % -% \begin{macro}{[equalmargins]} -% The left and right margins are equal (averaged); -% all pages behave as if they open to the right. +% \begin{macro}{[unequalmargins]} +% The outer margin is equal to the top and bottom margins; +% the inner margin is 0.50~inches wider than the outer margin. % \end{macro} % -% \paragraph{Opening:} -% Only if |[twoside]| is used, two additional options from the |book| class -% control how other new pages will open, including new pages created by: -% |\listoftables|, |\listoffigures|, and |\chapter{}|. -% -% \begin{macro}{[openright*]} -% These pages will always open to the right (like |\maketitle|, etc.). +% \begin{macro}{[oneside*]} +% All pages behave as if they open to the right (wider left margin); +% no extra blank pages. % \end{macro} % -% \begin{macro}{[openany]} -% These pages can open to the left or right. +% \begin{macro}{[twoside]} +% Most pages will alternate opening to the right and left; +% however, some commands which create new pages +% will always open to the right, +% sometimes requiring a blank page before to do so. +% See the |book| class for more information, as well as +% details about the |[openright*]| and |[openany]| options. % \end{macro} % -% \paragraph{Widths:} % Four widths of margins are defined based on -% the inner (left) and outer (right/top/bottom) dimensions: +% the inner (left) and outer (right/top/bottom) dimensions. +% If |[equalmargins]| is used, the left/right margins are averaged. % % \begin{macro}{[narrowmargins]} % Inner: 1.25 inch; outer: 0.75 inch @@ -165,19 +158,20 @@ % Inner: 2.00 inch; outer: 1.50 inch % \end{macro} % -% \subsubsection{Draft}\label{use:opt:draft} +% \subsubsection{Book Options}\label{use:opt:book} % -% \begin{macro}{[draft]} -% Adds ``DRAFT'' to all 4 corners, plus the date centered below the footer. -% The default |draft| behaviour for the |book| class is also supported. -% \end{macro} +% This class inherits from the standard \LaTeX\ |book| class, +% so all other |book| options are processed by that class. +% Two caveats are that |[titlepage]|/|[notitlepage]| have no effect and +% |[twocolumn]| has undefined behaviour. % % \subsection{Commands}\label{use:cmd} % % \subsubsection{Author Information}\label{use:cmd:author} % % The following 5 commands should be used in the preamble -% to define the content of the titlepage (|\maketitle|) and abstract page (|abstract| environment). +% to define the content of the titlepage (|\maketitle|) +% and abstract page (|abstract| environment). % % \begin{macro}{\author} % Your full name. @@ -191,14 +185,17 @@ % The title of your degree (spelled out, like ``Doctor of Philosophy'' not ``PhD''). % \end{macro} % -% \begin{macro}{\department} -% The name of your department. -% \end{macro} -% % \begin{macro}{\gradyear} % The year of your degree completion. % \end{macro} % +% \begin{macro}{\department} +% The name of your department. +% The optional first argument (|\department[this]{}|) +% can be used to replace or leave blank +% the default text ``Department of'' preceeding the department name. +% \end{macro} +% % If undefined, template values are used like ``(author)''. % % \subsubsection{Document Parts}\label{use:cmd:parts} @@ -272,14 +269,14 @@ % \subsubsection{Dedication \& Acknowledgements}\label{use:env:ded-ackn} % % \begin{macro}{dedication} -% The |dedication| environment formats text flush right and 2/3 down a new page. -% Not necessary for SGS requirements, so you're welcome to redefine this environment. +% The |dedication| environment formats text flush right and 1/3 down a new page. +% Not necessary for SGS requirements, so you can redefine this environment. % \end{macro} % % \begin{macro}{acknowledgements} % The |acknowledgements| environment creates a centered heading using |\section*{}|, % and a new page after the text. -% Not necessary for SGS requirements, so you're welcome to redefine this environment. +% Not necessary for SGS requirements, so you can redefine this environment. % \end{macro} % % \subsubsection{Base Environments}\label{use:env:misc} @@ -298,81 +295,75 @@ % % \section{Implementation}\label{imp} % -% \subsection{Option Declaration}\label{imp:opt} -% -% \subsubsection{Draft Mode}\label{imp:opt:draft} -% Specifying |draft| adds ``DRAFT'' to all 4 corners, -% plus the date centered below the footer. -% The default |draft| behaviour for the |book| class is also supported. -% \begin{macrocode} -\newcommand{\draftmarkstyle}{\scriptsize\sffamily} -\DeclareOption{draft}{% - \PassOptionsToClass{\CurrentOption}{book} - \AtEndOfClass{ - \AtBeginShipout{\AtBeginShipoutUpperLeft{% - \draftmarkstyle - \put(+0.125in, -0.125in-\f@size pt ){\rlap{DRAFT}} - \put(-0.125in+\paperwidth,-0.125in-\f@size pt ){\llap{DRAFT}} - \put(+0.125in, +0.125in-\paperheight){\rlap{DRAFT}} - \put(-0.125in+\paperwidth,+0.125in-\paperheight){\llap{DRAFT}} - \put(+0.5\paperwidth,+0.125in-\paperheight)% - {\makebox[0in][c]{\today}} -}}}} -% \end{macrocode} -% -% \subsubsection{Margins}\label{imp:opt:margins} -% First, we define three lengths to help us compute the margins: -% |\margin@v| is the top and bottom margins; -% |\margin@xhi| is the inner margin offset; -% |\margin@xho| is the outer margin offset. -% \begin{macrocode} -\newlength{\margin@v} -\newlength{\margin@xhi}\setlength{\margin@xhi}{0.5in} -\newlength{\margin@xho}\setlength{\margin@xho}{0.0in} -% \end{macrocode} +% \subsection{Margin Math}\label{imp:margins} % -% The options are based off |\margin@v|: -% \begin{macrocode} -\DeclareOption{narrowmargins} {\setlength{\margin@v}{0.75in}} -\DeclareOption{normalmargins} {\setlength{\margin@v}{1.00in}} -\DeclareOption{widemargins} {\setlength{\margin@v}{1.25in}} -\DeclareOption{extrawidemargins}{\setlength{\margin@v}{1.50in}} -% \end{macrocode} +% First, we define a boolean |margins@equal| to store +% whether margins should be equal or not, plus +% two lengths to help us compute the margins: +% |\margin@base| is the minimum used directly for the top and bottom, and +% |\margin@offset| is the difference between inner/outer margins +% if they are not equal. % -% For digital copies, |equalmargins| may be preferred. -% However, to keep the |\textwidth| consistent -% for any of the above margin options with and without |equalmargins|, -% we simply average the inner and outer offsets: % \begin{macrocode} -\DeclareOption{equalmargins}% - {\setlength{\margin@xho}{0.5\margin@xhi} - \setlength{\margin@xhi}{0.5\margin@xhi}} +\newif\ifmargins@equal +\newlength{\margin@base} +\newlength{\margin@offset} +\setlength{\margin@offset}{0.5in} % \end{macrocode} % -% Finally, we actually compute the margins using the above three lengths, +% After processing all options, +% we compute the margins using the above lengths, % and adjust the placement of the header, footer, and margin notes. +% If margins are equal, we average |\margin@offset| +% to keep the |\textwidth| consistent with the unequal case. +% % \begin{macrocode} \AtEndOfClass{ - \setlength{\leftmargin}{\dimexpr\margin@v+\margin@xhi} - \setlength{\rightmargin}{\dimexpr\margin@v+\margin@xho} + \ifmargins@equal + \setlength{\leftmargin}{\dimexpr\margin@base+.5\margin@offset} + \setlength{\rightmargin}{\dimexpr\margin@base+.5\margin@offset} + \else + \setlength{\leftmargin}{\dimexpr\margin@base+\margin@offset} + \setlength{\rightmargin}{\dimexpr\margin@base} + \fi \geometry{ - top = \margin@v, - bottom = \margin@v, + top = \margin@base, + bottom = \margin@base, inner = \leftmargin, outer = \rightmargin, - headsep = \dimexpr 0.5\margin@v - \headheight, - footskip = \dimexpr 0.5\margin@v, - marginparwidth = \dimexpr \rightmargin - 0.25in, + headsep = \dimexpr0.5\margin@base-\headheight, + footskip = \dimexpr0.5\margin@base, + marginparwidth = \dimexpr\rightmargin-0.25in, marginparsep = 0.125in, }} % \end{macrocode} % +% \subsection{Option Declaration}\label{imp:opt} +% +% \subsubsection{Margins}\label{imp:opt:margins} +% +% Four margin width options are based on |\margin@base|: +% +% \begin{macrocode} +\DeclareOption{narrowmargins} {\setlength{\margin@base}{0.75in}} +\DeclareOption{normalmargins} {\setlength{\margin@base}{1.00in}} +\DeclareOption{widemargins} {\setlength{\margin@base}{1.25in}} +\DeclareOption{extrawidemargins}{\setlength{\margin@base}{1.50in}} +% \end{macrocode} +% +% Setting the margins either equal or unequal: +% +% \begin{macrocode} +\DeclareOption{equalmargins}{\margins@equaltrue} +\DeclareOption{unequalmargins}{\margins@equalfalse} +% \end{macrocode} +% % \subsubsection{Line Spacing}\label{imp:opt:spacing} +% % We're using the |setspace| package. % We simply call one of the spacing commands after the class is loaded. % So, be careful to place any line spacing commands within a group, % or the global setting can be changed in the middle of the document. -% The default is |onehalfspacing|. % % \begin{macrocode} \DeclareOption{doublespacing}{% @@ -388,11 +379,18 @@ % % \subsubsection{Book Options}\label{imp:opt:misc} % +% We need to redeclare the |oneside| option from |book| so that +% it can be used as a default: +% +% \begin{macrocode} +\DeclareOption{oneside}{\PassOptionsToClass{oneside}{book}} +% \end{macrocode} +% % Finally, we try to process all remaining options using the |book| class, % so the usual options and default values should be defined, like: % \begin{itemize} -% \item page size: e.g. |letterpaper|, |a4paper|, \dots % \item font size: e.g. |10pt|, |11pt|, |12pt| +% \item sides: e.g. |oneside|, |twoside| % \item open side for twoside: e.g. |openright|, |openany| % \end{itemize} % @@ -407,18 +405,16 @@ % |LaTeX Warning: Unused global option(s): ...| % % \begin{macrocode} -\ExecuteOptions{letterpaper} % book -\ExecuteOptions{normalmargins,onehalfspacing,chapterhead} % ut-thesis -\ProcessOptions +\ExecuteOptions{onehalfspacing,normalmargins,equalmargins,oneside} +\ProcessOptions\relax % \end{macrocode} % -% \subsection{Initialization}\label{imp:init} +% \subsection{Loading Dependencies}\label{imp:load} +% % We load the |book| class and the required packages. % % \begin{macrocode} \LoadClass{book} -\RequirePackage{picture} % for draft mode -\RequirePackage{atbegshi} % for draft mode \RequirePackage{geometry} % for margins etc. \RequirePackage{setspace} % for line spacing % \end{macrocode} @@ -431,8 +427,9 @@ \renewcommand*{\author} [1]{\gdef\@author{#1}} \renewcommand*{\title} [1]{\gdef\@title{#1}} \newcommand*{\degree} [1]{\gdef\@degree{#1}} -\newcommand*{\department}[1]{\gdef\@department{#1}} \newcommand*{\gradyear} [1]{\gdef\@gradyear{#1}} +\newcommand*{\department}[2][Department of]% + {\gdef\@deptpre{#1}\gdef\@deptname{#2}} % \end{macrocode} % % Setting default values that will hopefully be overwritten. @@ -441,23 +438,19 @@ \author {(author)} \title {(title)} \degree {(degree)} -\department{(department)} \gradyear {(gradyear)} +\department{(department)} % \end{macrocode} % % \subsection{Front Matter}\label{imp:front} % % \subsubsection{Matter Commands}\label{imp:front:pp} +% % We enforce that the |\frontmatter| and |\mainmatter| use the right % page numbering and styles. -% Also, if we are using |[twoside]|, -% then we need to reduce all page numbers in the front matter by 1, -% so that the |abstract| is page ``ii'', -% because adjusting the |page| counter directly causes typesetting problems, -% such as incorrect alternating margins. +% % \begin{macrocode} -\newcommand{\@romanskip}[1]{\@roman{\if@twoside\numexpr#1-1\else#1\fi}} -\g@addto@macro\frontmatter{\pagenumbering{romanskip}\pagestyle{plain}} +\g@addto@macro\frontmatter{\pagenumbering{roman}\pagestyle{plain}} \g@addto@macro\mainmatter {\pagenumbering{arabic}\pagestyle{headings}} % \end{macrocode} % @@ -486,7 +479,7 @@ \vfill A thesis submitted in conformity with the requirements\\ for the degree of {\@degree}\\[1ex] - Graduate Department of {\@department}\\ + {\@deptpre} {\@deptname}\\ University of Toronto\\ \vfill {\copyright} Copyright {\@gradyear} by {\@author} @@ -511,7 +504,7 @@ {\@title}\\[2ex] {\@author}\\ {\@degree}\\[1ex] - Graduate Department of {\@department}\\ + {\@deptpre} {\@deptname}\\ University of Toronto\\ {\@gradyear}\\ \section*{Abstract} @@ -554,17 +547,21 @@ % \subsection{Page Styles}\label{imp:hf} % % \subsubsection{Blank Pages}\label{imp:hf:blank} +% % By default, all blank pages will have page style |plain|, % but the original definition is stored in |\ocleardoublepage|. +% % \begin{macrocode} \let\ocleardoublepage\cleardoublepage \def\cleardoublepage{{\newpage\pagestyle{plain}\ocleardoublepage}} % \end{macrocode} % % \subsubsection{Headers \& Footers}\label{imp:hf:hf} +% % We redefine the |headings| page style % with a new formatting hook |\headerstyle{}|, % but is otherwise similar to the original |headings|. +% % \begin{macrocode} \newcommand{\headerstyle}[1]{\footnotesize\MakeUppercase{#1}} \if@twoside @@ -590,11 +587,13 @@ % \end{macrocode} % % Default page style. +% % \begin{macrocode} \pagestyle{headings} % \end{macrocode} % % \subsection{Spacing Adjustments}\label{imp:adj} +% % The default spacing below captions is too small % for captions on top of floats (e.g.\ for tables), % so we make it consistent above and below. diff --git a/macros/latex/contrib/ut-thesis/ut-thesis.pdf b/macros/latex/contrib/ut-thesis/ut-thesis.pdf Binary files differindex 877c314bb0..5128406af3 100644 --- a/macros/latex/contrib/ut-thesis/ut-thesis.pdf +++ b/macros/latex/contrib/ut-thesis/ut-thesis.pdf |