From f579cd3953cc1f63f679445666d047843c1482eb Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 24 Apr 2020 20:59:23 +0000 Subject: willowtreebook (24apr20) git-svn-id: svn://tug.org/texlive/trunk@54866 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/willowtreebook/README | 4 +- .../doc/latex/willowtreebook/willowtreebook.pdf | Bin 13965747 -> 13983793 bytes .../doc/latex/willowtreebook/willowtreebook.tex | 37 ++++++-- .../tex/latex/willowtreebook/willowtreebook.cls | 104 +++------------------ 4 files changed, 48 insertions(+), 97 deletions(-) diff --git a/Master/texmf-dist/doc/latex/willowtreebook/README b/Master/texmf-dist/doc/latex/willowtreebook/README index fa86ae90f3f..b1991b83285 100644 --- a/Master/texmf-dist/doc/latex/willowtreebook/README +++ b/Master/texmf-dist/doc/latex/willowtreebook/README @@ -1,6 +1,6 @@ Willow Tree Book Class -v1.0 -22 April 2020 +v1.01 +24 April 2020 Authors: Ben McKay diff --git a/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.pdf b/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.pdf index b3a61d60a64..e799a3dc18c 100644 Binary files a/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.pdf and b/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.pdf differ diff --git a/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.tex b/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.tex index f284c8d7343..96cb7d3190a 100644 --- a/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.tex +++ b/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.tex @@ -1,5 +1,5 @@ \documentclass{willowtreebook} -\Title{The Willow Tree Book Class v1.0} +\Title{The Willow Tree Book Class 1.01} \Author{Benjamin \scotsMc{}Kay} \Colophon{Released under the \LaTeX{} Public Project License 1.3c} \BibliographyFile{willowtreebook} @@ -38,21 +38,25 @@ THE END Compile with \verb!latex! or \verb!pdflatex!. \chapter{Definitions, Problems and Theorems} \section{Definitions} -We can define a term like \emph{hamster}\define{hamster}, or say that the term hamster appears again later\SubIndex{hamster}. -We add notation like when we use a variable called \(\omega\), we put it in the list of notation.\Notation{omega}{\omega}{A variable called $\omega$} +We can define a term like \emph{hamster}\define{hamster}, or say that the term hamster\SubIndex{hamster} appears again later. \begin{Verbatim}[frame=leftline] \chapter{Definitions, Problems and Theorems} \section{Definitions} We can define a term like \emph{hamster}\define{hamster}, -or say that the term hamster appears again later\SubIndex{hamster}. +or say that the term hamster\SubIndex{hamster} appears again later. \end{Verbatim} Compile, for a book called \verb!filename.tex!, with \begin{Verbatim}[frame=leftline] makeindex filename \end{Verbatim} -We add notation like when we use a variable called \(\omega\), +We add notation like when we use a variable called \(\omega\), we put it in the list of notation.% -\Notation{omega}{\omega}{A variable called $\omega$}. +\Notation{omega}{\omega}{A variable called $\omega$} +\begin{Verbatim} +We add notation like when we use a variable called \(\omega\), +we put it in the list of notation.% +\Notation{omega}{\omega}{A variable called $\omega$} +\end{Verbatim} If you use notation, compile with \begin{Verbatim}[frame=leftline] makeindex -s notation.gst -o not.gls not.glo @@ -96,4 +100,25 @@ In any triangle with sides of lengths \(a,b,c\), side of length \(c\) is a right angle. \end{theorem} \end{Verbatim} +I often want to present an example, and make clear where it starts and stops. +\begin{example} +The integral +\[ +\int e^{x^2}x\,dx +\] +is evaluated by substituting \(u=x^2\), so +\[ +\int e^{x^2}x\,dx=\int e^u \frac{du}{2}. +\] +\end{example} +\begin{Verbatim}[frame=leftline] +The integral +\[ +\int e^{x^2}x\,dx +\] +is evaluated by substituting \(u=x^2\), so +\[ +\int e^{x^2}x\,dx=\int e^u \frac{du}{2}. +\] +\end{Verbatim} \end{document} diff --git a/Master/texmf-dist/tex/latex/willowtreebook/willowtreebook.cls b/Master/texmf-dist/tex/latex/willowtreebook/willowtreebook.cls index 61964a97fb9..28ea7bbc996 100644 --- a/Master/texmf-dist/tex/latex/willowtreebook/willowtreebook.cls +++ b/Master/texmf-dist/tex/latex/willowtreebook/willowtreebook.cls @@ -1,31 +1,21 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{willowtreebook}[2020/04/22 Willow Tree book LaTeX class v1.0] +\ProvidesClass{willowtreebook}[2020/04/24 Willow Tree Book LaTeX class v1.01] \DeclareOption{ContainsChinese}{\def\ChineseTextInThisDocument{}} -\DeclareOption*{% -\PassOptionsToClass{\CurrentOption}{article}% -} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}} \ProcessOptions\relax - \LoadClass{memoir} - \RequirePackage{xparse} - -\def\emptystring{} - -\edef\mckaybook@title{\emptystring} -\edef\mckaybook@subtitle{\emptystring} -\edef\mckaybook@author{\emptystring} -\edef\mckaybook@bibliography{\emptystring} -\edef\mckaybook@colophon{This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.} - +\def\mckaybook@title{} +\def\mckaybook@subtitle{} +\def\mckaybook@author{} +\def\mckaybook@bibliography{} +\def\mckaybook@colophon{This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.} \NewDocumentCommand\Title{m}{\global\def\mckaybook@title{#1}} \NewDocumentCommand\Subtitle{m}{\global\def\mckaybook@subtitle{#1}} \NewDocumentCommand\Author{m}{\global\def\mckaybook@author{#1}} \NewDocumentCommand\BibliographyFile{m}{\global\def\mckaybook@bibliography{#1}} \NewDocumentCommand\Colophon{m}{\global\def\mckaybook@colophon{#1}} - % For handling names like Benjamin McKay, where the letter c should be raised up, type in as Benjamin \scotsMc{}Kay. -\makeatletter \DeclareRobustCommand{\scotsMc}{\scotsMcx{c}} \DeclareRobustCommand{\scotsMC}{\scotsMcx{\textsc{c}}} \DeclareRobustCommand{\scotsMcx}[1]{% @@ -38,8 +28,6 @@ \expandafter\def\expandafter\@uclclist\expandafter{% \@uclclist\scotsMc\scotsMC } -\makeatother - \RequirePackage{etex} \RequirePackage{newunicodechar} \RequirePackage[utf8]{inputenc} % Default input file encoding @@ -49,7 +37,6 @@ \NewDocumentCommand\Chinese{m}{\begin{CJK*}{UTF8}{gbsn}#1\end{CJK*}} \else \fi - \RequirePackage[T1]{fontenc} \RequirePackage{lmodern} \RequirePackage{isomath} @@ -72,12 +59,10 @@ shrink=10]{microtype} \RequirePackage{braket} \RequirePackage{mathtools} \mathtoolsset{showonlyrefs,showmanualtags,centercolon,mathic} - % If we need more room between rows of matrices and arrays, we can write % \begin{pmatrix}[1.5] % instead of % \begin{pmatrix} -\makeatletter \RenewDocumentCommand\env@matrix{O{\arraystretch}} {% \edef\arraystretch{#1}% @@ -85,15 +70,12 @@ shrink=10]{microtype} \let\@ifnextchar\new@ifnextchar \array{*\c@MaxMatrixCols c} }% -\makeatother \NewDocumentCommand\tallmatrix{}{1.5} - \RequirePackage{varioref} \RequirePackage{longtable} \RequirePackage{multicol} \setmarginnotes{2em}{3cm}{.5cm} - -% Indices +%.......Indices \newcommand{\NotationIndexName}{List of notation} \makeindex \makeglossary[not] @@ -123,7 +105,6 @@ shrink=10]{microtype} \ifnum\value{page}<10 0\fi% \arabic{page}% }%% - \newcounter{howmany@notation} \setcounter{howmany@notation}{0} \newcommand{\Notation}[3]%% @@ -131,7 +112,6 @@ shrink=10]{microtype} {\glossary[not](\paddedpagenumber){\(#2\)}{#3}% \stepcounter{howmany@notation}% } - \newcounter{howmany@indexentries} \setcounter{howmany@indexentries}{0} \newcommand{\SubIndex}[1]% @@ -168,7 +148,6 @@ shrink=10]{microtype} } \newcommand{\ceilForNotationIndex}[1]{\lcl{#1}\rcl} \newcommand{\floorForNotationIndex}[1]{\lflr{#1}\rflr} - % For the subject index: % Example: % \define{interest rate} @@ -184,7 +163,6 @@ shrink=10]{microtype} %% PDF Output \ifpdf \pdfoutput=1 - \makeatletter \RequirePackage[plainpages=false, hyperfigures, pdftitle={\mckaybook@title}, @@ -196,7 +174,6 @@ shrink=10]{microtype} pagebackref, pdftex] {hyperref} - \makeatother \RequirePackage{memhfixc} % Hyperref uses very bright colours to highlight links. Change them: \RequirePackage[svgnames]{xcolor} @@ -208,7 +185,6 @@ shrink=10]{microtype} citecolor={dark-blue}, urlcolor={medium-blue} } \fi - \newcommand{\idxmark}[1]{#1\markboth{#1}{#1}} \newcommand{\doidxbookmark}[1]{{\def\@tempa{Symbols}\def\@tempb{#1}% \ifx\@tempa\@tempb % @@ -221,10 +197,8 @@ Analphabetics \pdfbookmark[0]{#1}{#1-idx}% \fi% \vskip\onelineskip\par}} - \newcommand\doglobookmark[1]{% }% - %......Figures \newcommand{\stdFigSize}{1in} \newsubfloat{figure} % Memoir class, instead of subfigure class. @@ -236,9 +210,7 @@ Analphabetics \captionnamefont{\scriptsize} \captiontitlefont{\scriptsize} \newcommand{\heading}{\sffamily} - \newcommand{\chapterSummary}[1]{{\small{#1}}\vspace{0.5cm}\par\noindent} - \makechapterstyle{bobo}{% \aliaspagestyle{part}{empty} \renewcommand{\partnamefont}{\raggedleft\normalfont\huge\heading} @@ -256,45 +228,35 @@ Analphabetics \renewcommand*{\chaptitlefont}{\Large\heading} \renewcommand*{\printchaptertitle}[1]{% \centering\smallcolouredbox\chaptitlefont ##1}} - \chapterstyle{bobo} - \setsecheadstyle{\large\heading\raggedright} \setsubsecheadstyle{\heading\raggedright} \setsubsubsecheadstyle{\heading\raggedright} \setheadfoot{2\onelineskip}{3\onelineskip} - \newcommand{\optionalSection}[1]% {%% \section{#1} {\small{This section can be omitted without loss of continuity.}}% \medskip\par\noindent% }%% - %......Table of contents % depth of numbering of sectioning commands: \setsecnumdepth{chapter} \maxsecnumdepth{chapter} %% depth of table of contents: \setcounter{tocdepth}{0} - \RenewDocumentCommand\cftpartfont{}{\heading\small} \RenewDocumentCommand\cftpartpagefont{}{\normalfont\small} - \RenewDocumentCommand\cftchapterfont{}{\heading\small} \RenewDocumentCommand\cftchapterpagefont{}{\normalfont\small} - \setlength{\cftbeforechapterskip}{3pt} \RenewDocumentCommand\cftchapterleader{}{\quad} \setpnumwidth{1em} \RenewDocumentCommand\cftchapterafterpnum{}{\cftparfillskip} - \setlength{\cftbeforepartskip}{10pt} \RenewDocumentCommand\cftpartleader{}{\quad} \setpnumwidth{1em} \RenewDocumentCommand\cftpartafterpnum{}{\cftparfillskip} - - %......Title page \pretitle{\begin{center}\HUGE} \posttitle{\end{center}} @@ -302,11 +264,9 @@ Analphabetics \postauthor{\end{center}} \predate{\begin{center}} \postdate{\end{center}} - \usepackage{tcolorbox} \tcbuselibrary{breakable} \tcbuselibrary{skins} - %......Theorem Styles %\newtheoremstyle{RegularStyle}% name % {}% Space above, empty = `usual value' @@ -324,9 +284,8 @@ Analphabetics \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{proposition}[theorem]{Proposition} - +%.......Colours \colorlet{exampleBackgroundColour}{gray!16} - \newtcolorbox{example}{% enhanced,% breakable,% @@ -364,7 +323,6 @@ before upper={\parindent15pt\noindent}% \begin{itemize}}% {\end{itemize}% \end{example}} - % In the middle of an example, the background color is not white. If you need a white background to put an image on it, it looks best to use an imageborderinexample. \definecolor{image-border-color}{gray}{.975} \NewDocumentCommand\imageborderinexample{m}{\begin{center}\tcbox[colframe=image-border-color, colback=white] @@ -372,8 +330,6 @@ before upper={\parindent15pt\noindent}% \NewDocumentCommand\includegraphicsinexample{om}% {\IfValueTF{#1}{\imageborderinexample{\includegraphics[#1]{#2}}}{\imageborderinexample{\includegraphics{#2}}}} \NewDocumentCommand\inputinexample{m}{\imageborderinexample{\input{#1}}} - - %......Problems % To define a new problem, use: % \begin{problem}{