summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-04-24 20:59:23 +0000
committerKarl Berry <karl@freefriends.org>2020-04-24 20:59:23 +0000
commitf579cd3953cc1f63f679445666d047843c1482eb (patch)
treea12d14467b65cbc1551b691bcdeffb266351540c
parenteeebec7d5ed0059693f0be5e227d79180ada0ccf (diff)
willowtreebook (24apr20)
git-svn-id: svn://tug.org/texlive/trunk@54866 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/willowtreebook/README4
-rw-r--r--Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.pdfbin13965747 -> 13983793 bytes
-rw-r--r--Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.tex37
-rw-r--r--Master/texmf-dist/tex/latex/willowtreebook/willowtreebook.cls104
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
--- a/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.pdf
+++ b/Master/texmf-dist/doc/latex/willowtreebook/willowtreebook.pdf
Binary files 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}{<label>} <statement> \end{problem}
@@ -422,45 +378,37 @@ before upper={\parindent15pt\noindent}%
% Otherwise, we get mysterious errors. We could probably
% just make use of \protect here.
\let\newparagraph=\par
-\makeatletter
\NewDocumentEnvironment{@nswer}{m}{\@bsphack\IfStreamOpen{ansout}{}{\openoutputfile{\jobname.ans}{ansout}}
\addtostream{ansout}{\smallskip\newparagraph\noindent\textbf{\protect\ref{problem:#1}.}}}{\@esphack}
\newcounter{howmany@answers}
\setcounter{howmany@answers}{0}
\NewDocumentEnvironment{answer}{m}%
{\stepcounter{howmany@answers}\@bsphack\@nswer{#1}\writeverbatim{ansout}}{\par\endwriteverbatim\end@nswer\@esphack}
-\makeatother
-
% Colour for the rulings in tables:
\RequirePackage{colortbl}
\newcommand{\defaultArrayRuleColor}{gray!30}
\arrayrulecolor{\defaultArrayRuleColor}
-\makeatletter
\def\rulecolor#1#{\CT@arc{#1}}
\def\CT@arc#1#2{%
\ifdim\baselineskip=\z@\noalign\fi
{\gdef\CT@arc@{\color#1{#2}}}}
\let\CT@arc@\relax
\rulecolor{gray!30}
-\makeatother
-
\RequirePackage{enumitem}
\setlist[enumerate,1]{label=\emph{\alph*.}}
\setlist[enumerate,2]{label=\arabic*.,
ref=\theenumi.\emph{\alph*}}
\setlist[enumerate,3]{label=\roman*), ref=\theenumii.\roman*}
-
-\makeatletter
\NewDocumentCommand\writetitlepage{}
{%
- \ifx\mckaybook@title\emptystring
+ \ifx\mckaybook@title\@empty
\else
\begingroup
\raggedleft
\vspace*{\baselineskip}
{\Large \mckaybook@author
}\\[0.167\textheight]
- \ifx\mckaybook@subtitle\emptystring%
+ \ifx\mckaybook@subtitle\@empty%
\Huge\heading\mckaybook@title\\[\baselineskip]%
\else%
\Huge\heading\mckaybook@title\\[\baselineskip]%
@@ -473,8 +421,6 @@ ref=\theenumi.\emph{\alph*}}
\endgroup
\fi
}%
-\makeatother
-
%% \newclr generates a colour based on the current chapter number, so we execute it every time we create a new chapter. It saves that colour in a global color variable called chpclr. This colour is used to highlight the chapter name at the beginning of the chapter and in all of the headings at the top of each page.
\newcommand*{\newcolr}%%
{%%
@@ -508,35 +454,28 @@ ref=\theenumi.\emph{\alph*}}
\settoheight{\smallboxh}{l}
\settodepth{\smallboxd}{l}
\newcommand*{\blanksp}{\phantom{\rule[\smallboxd]{\smallboxw}{\smallboxh}}}
-
\newif\ifchaptercolours
\chaptercoloursfalse
-
\NewDocumentCommand\smallcolouredbox{}%
{%%
\ifchaptercolours\,{\colorbox{chpclr}{\blanksp}}\,\else\fi
}%%
\RenewDocumentCommand\chapnamefont{m}{\newcolr\large\centering#1}
-
\definecolor{colorAAA}{rgb}{.75,1,1}
\definecolor{colorBBB}{rgb}{1,.75,1}
\definecolor{colorCCC}{rgb}{1,1,.75}
-
-
-
-\makeatletter
\AtBeginDocument%
{%%
\frontmatter
% Title page
-\ifx\mckaybook@title\emptystring
+\ifx\mckaybook@title\@empty
\else
- \ifx\mckaybook@subtitle\emptystring%
+ \ifx\mckaybook@subtitle\@empty%
\title{\MakeUppercase{\mckaybook@title}}
\else
\title{\MakeUppercase{\mckaybook@title} \\ \MakeUppercase{\mckaybook@subtitle}}
\fi
- \ifx\mckaybook@author\emptystring%
+ \ifx\mckaybook@author\@empty%
\else
\author
{%
@@ -547,7 +486,6 @@ ref=\theenumi.\emph{\alph*}}
}%
\fi
\fi
-\makeatother
\writetitlepage
\thispagestyle{empty}
\pagenumbering{roman}
@@ -556,7 +494,6 @@ ref=\theenumi.\emph{\alph*}}
{\normalfont\thepage}{}{\small\heading\leftmark\smallcolouredbox\negphantom{\smallcolouredbox}}
\makeoddhead{companion}%
{\small\negphantom{\smallcolouredbox}\smallcolouredbox\heading\rightmark}{}{\normalfont\thepage}
-
\setlength{\cftchapterindent}{4cm}
\setlength{\cftpartindent}{4cm}
\pagestyle{empty}
@@ -564,9 +501,7 @@ ref=\theenumi.\emph{\alph*}}
\clearpage
\pagestyle{companion}
}%%
-
\NewDocumentCommand\negphantom{m}{\settowidth{\dimen0}{#1}\hspace*{-\dimen0}}
-
\NewDocumentCommand\afterpreface{}
{%
\clearpage
@@ -575,11 +510,9 @@ ref=\theenumi.\emph{\alph*}}
\chaptercolourstrue
\pagenumbering{arabic}
}%
-
\NewDocumentCommand\hintsPreamble{}{}
\AtEndDocument%
{%%
-
\backmatter
\chaptercoloursfalse
\ifnum\value{howmany@answers}>0\relax%
@@ -589,30 +522,23 @@ ref=\theenumi.\emph{\alph*}}
\hintsPreamble%
\printanswers%
\fi%
-
-\makeatletter
-\ifx\mckaybook@bibliography\emptystring
+\ifx\mckaybook@bibliography\@empty
\else
% Bibliography
\bibliographystyle{amsplain}
\bibliography{\mckaybook@bibliography}
\flushbottom
\fi
-\makeatother
-
% Notation Index
\ifnum\value{howmany@notation}>0
\indexintoc
{\RenewDocumentCommand{\indexspace}{}{}\small{\printglossary[not]}}
\cleardoublepage
\fi
-
% Index
\ifnum\value{howmany@indexentries}>0
\indexintoc
\RenewDocumentCommand\indexname{}{Index}
{\small{\printindex}}
\fi
-
-
}%% AtEndDocument