diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/00readme.txt | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/Makefile | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf | bin | 258960 -> 0 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.tex | 206 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-doc.pdf | bin | 310944 -> 335482 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.pdf | bin | 0 -> 539864 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.tex | 1060 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/manifest.txt | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx | 3256 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty | 794 |
12 files changed, 4855 insertions, 483 deletions
diff --git a/Master/texmf-dist/doc/latex/halloweenmath/00readme.txt b/Master/texmf-dist/doc/latex/halloweenmath/00readme.txt index bbc4103480e..f211f14107b 100644 --- a/Master/texmf-dist/doc/latex/halloweenmath/00readme.txt +++ b/Master/texmf-dist/doc/latex/halloweenmath/00readme.txt @@ -26,7 +26,7 @@ This file, after giving a brief description of the halloweenmath package, explains how to install it and how to generate its--alas, still incomplete!--documentation. -January 6, 2017 (vers. 0.01) +April 16, 2017 (vers. 0.10) @@ -137,7 +137,7 @@ input directories! :-) d) You may also choose to install the halloweenmath package inside the main texmf tree of your TeX installation (as opposed to installing it inside a directory devoted to private classes and packages). In this -case, note that the _proposed_ TDS-compliant location for the +case, note that the--now accepted--TDS-compliant location for the halloweenmath package, that is, the directory inside which you should put all the files listed in 2), is diff --git a/Master/texmf-dist/doc/latex/halloweenmath/Makefile b/Master/texmf-dist/doc/latex/halloweenmath/Makefile index 8292e7c8602..41b9f8d8035 100644 --- a/Master/texmf-dist/doc/latex/halloweenmath/Makefile +++ b/Master/texmf-dist/doc/latex/halloweenmath/Makefile @@ -1,6 +1,6 @@ # makefile # -# 2017 Jan 06 +# 2017 Apr 16 # # Macro definitions ROOT_NAME = halloweenmath diff --git a/Master/texmf-dist/doc/latex/halloweenmath/README b/Master/texmf-dist/doc/latex/halloweenmath/README index 26277efd6a5..212a09dd57e 100644 --- a/Master/texmf-dist/doc/latex/halloweenmath/README +++ b/Master/texmf-dist/doc/latex/halloweenmath/README @@ -1,4 +1,4 @@ -(Version indicator: 2017 Jan 06) +(Version indicator: 2017 Apr 16) The halloweenmath package originated from a question asked for enjoyment on TeX-LaTeX Stack Exchange <http://tex.stackexchange.com> by the user @@ -18,7 +18,7 @@ For more information, read the following files: 00readme.txt -- start by reading this file halloweenmath-doc.pdf -- overview of the halloweenmath package (PDF) -halloweenexample.pdf -- output produced by sample source file (PDF) +halloweenmath-man.pdf -- user's manual for this same package (PDF) Other files that make up the distribution are: diff --git a/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf b/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf Binary files differdeleted file mode 100644 index 91e55fad8b4..00000000000 --- a/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.tex b/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.tex deleted file mode 100644 index d6e30050822..00000000000 --- a/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.tex +++ /dev/null @@ -1,206 +0,0 @@ -\documentclass[12pt,a4paper]{article} -\usepackage[T1]{fontenc} % not necessary, but recommended -\usepackage{halloweenmath} -\usepackage{hyperref} % just for "\hypersetup" - -\title{Sample Halloween Math} -\author{A.~U.~Thor} -\date{January~6, 2017} - -\hypersetup{ - pdftitle = {Sample Halloween Math}, - pdfauthor = {A. U. Thor}, - pdfsubject = {Sample source file for the halloweenmath package}, - pdfkeywords = {Halloween, math, scary mathematical symbols}, - pdfcreationdate = {D:20170106000000}, - pdfmoddate = {D:20170106000000} -} - - - -\begin{document} - -\maketitle - -A reduction my students are likely to make: -\[\mathwitch \frac{\sin x}{s} = x\,\mathrm{in}\] -The same reduction as an in-line formula: -\(\mathwitch \frac{\sin x}{s} = x\,\mathrm{in}\). - -Now with limits: -\[ - \mathwitch_{i=1}^{n} \frac - {\text{$i$-th magic term}} - {\text{$2^{i}$-th wizardry}} -\] -And repeated in-line: \( \mathwitch_{i=1}^{n} x_{i}y_{i} \). - -The \texttt{bold} math version is honored:\mathversion{bold} -\[ - \mathwitch* - \genfrac{<}{>}{0pt}{} - {\textbf{something terribly}}{\textbf{complicated}} - = 0 -\] -Compare it with \texttt{normal} math\mathversion{normal}: -\[ - \mathwitch* - \genfrac{<}{>}{0pt}{} - {\text{something terribly}}{\text{complicated}} - = 0 -\] -In-line math comparison: -{\boldmath $\mathwitch* f(x)$} versus $\mathwitch* f(x)$. - -There is also a left-facing witch: -\[\reversemathwitch \frac{\sin x}{s} = x\,\mathrm{in}\] -And here is the in-line version: -\(\reversemathwitch \frac{\sin x}{s} = x\,\mathrm{in}\). - -Test for \verb|\dots|: -\[ - \mathwitch_{i_{1}=1}^{n_{1}} \dots \mathwitch_{i_{p}=1}^{n_{p}} - \frac - {\text{$i_{1}$-th magic factor}} - {\text{$2^{i_{1}}$-th wizardry}} - \pumpkin\dots\pumpkin - \frac - {\text{$i_{p}$-th magic factor}} - {\text{$2^{i_{p}}$-th wizardry}} -\] -And repeated in-line: \( \mathwitch\dots\mathwitch_{i=1}^{n} x_{i}y_{i} \). - -\bigbreak - -Now the pumpkins. First the \texttt{bold} math version:\mathversion{bold}: -\[ \bigoplus_{h=1}^{m}\bigpumpkin_{k=1}^{n} P_{h,k} \] -Then the \texttt{normal} one\mathversion{normal}: -\[ \bigoplus_{h=1}^{m}\bigpumpkin_{k=1}^{n} P_{h,k} \] -In-line math comparison: -{\boldmath \( \bigpumpkin_{i=1}^{n} P_{i} \neq \bigoplus_{i=1}^{n} P_{i} \)} -versus \( \bigpumpkin_{i=1}^{n} P_{i} \neq \bigoplus_{i=1}^{n} P_{i} \). - -Close test: {\boldmath $\bigoplus$}$\bigoplus$. -And against the pumpkins: -{\boldmath $\bigpumpkin$}$\bigpumpkin\bigoplus${\boldmath $\bigoplus$}. - -In-line, but with \verb|\limits|: -\( \bigoplus\limits_{h=1}^{m}\bigpumpkin\limits_{k=1}^{n} P_{h,k} \). - -Binary: \( x\pumpkin y \neq x\oplus y \). And in display: -\[ a\pumpkin\frac{x\pumpkin y}{x\oplus y}\otimes b \] -Close test: {\boldmath $\oplus$}$\oplus$. -And with the pumpkins too: -{\boldmath $\pumpkin$}$\pumpkin\oplus${\boldmath $\oplus$}. - -In general, -\[ \bigpumpkin_{i=1}^{n} P_{i} = P_{1}\pumpkin\dots\pumpkin P_{n} \] - -\begingroup - -\bfseries\boldmath - -The same in bold: -\[ \bigpumpkin_{i=1}^{n} P_{i} = P_{1}\pumpkin\dots\pumpkin P_{n} \] - -\endgroup - -Other styles: \( \frac{x\pumpkin y}{2} \), exponent~$Z^{\pumpkin}$, -subscript~$W_{\!x\pumpkin y}$, double script \( 2^{t_{x\pumpkin y}} \). - -\bigbreak - -Clouds. A hypothetical identity: -\( \frac{\sin^{2}x + \cos^{2}x}{\cos^{2}x} = \mathcloud \). -Now the same identity set in display: -\[ \frac{\sin^{2}x + \cos^{2}x}{\cos^{2}x} = \mathcloud \] -Now in smaller size: \( \frac{\sin x+\cos x}{\mathcloud} = 1 \). - -Specular clouds, \texttt{bold}\ldots\mathversion{bold} -\[ \reversemathcloud \longleftrightarrow \mathcloud \] -\ldots and in \texttt{normal} math.\mathversion{normal} -\[ \reversemathcloud \longleftrightarrow \mathcloud \] -In-line math comparison: -{\boldmath \( \reversemathcloud \leftrightarrow \mathcloud \)} -versus \( \reversemathcloud \leftrightarrow \mathcloud \). -Abutting: {\boldmath $\mathcloud$}$\mathcloud$. - -\bigbreak - -Ghosts: \( \mathleftghost \mathghost \mathrightghost \mathghost \mathleftghost -\mathghost \mathrightghost \). Now with letters: \( H \mathghost H \mathghost h -\mathghost ab \mathghost f \mathghost wxy \mathghost \), and also \( -2\mathghost^{3} + 5\mathleftghost^{\!2}-3\mathrightghost_{i} = -12\mathrightghost_{j}^{4} \). Then, what about~$x^{2\mathghost}$ and \( -z_{\!\mathrightghost+1} = z_{\!\mathrightghost}^{2} + z_{\mathghost} \)? - -In subscripts: -\begin{align*} - F_{\mathghost+2} &= F_{\mathghost+1} + F_{\mathghost} \\ - F_{\!\mathrightghost+2} &= F_{\!\mathrightghost+1} + F_{\!\mathrightghost} -\end{align*} -Another test: \( \mathghost | \mathrightghost | \mathghost | \mathleftghost | -\mathghost | \mathrightghost | \mathghost | \mathleftghost | \mathghost \). We -should also try this: \( \mathrightghost \mathleftghost \mathrightghost -\mathleftghost \). - -Extensible arrows: -\begin{gather*} - A \xrightwitchonbroom[a\star f(t)]{x_{1}+\dots+x_{n}} B - \xrightwitchonbroom{x+z} C \xrightwitchonbroom{} D \\ - A \xrightwitchonbroom*[a\star f(t)]{x_{1}+\dots+x_{n}} B - \xrightwitchonbroom*{x+z} C \xrightwitchonbroom*{} D \\ - A \xleftwitchonbroom*[a\star f(t)]{x_{1}+\dots+x_{n}} B - \xleftwitchonbroom*{x+z} C \xleftwitchonbroom*{} D \\ - A \xleftwitchonbroom[a\star f(t)]{x_{1}+\dots+x_{n}} B - \xleftwitchonbroom{x+z} C \xleftwitchonbroom{} D -\end{gather*} -And \( \overrightwitchonbroom*{x_{1}+\dots+x_{n}}=0 \) versus \( -\overrightwitchonbroom{x_{1}+\dots+x_{n}}=0 \); or \( -\overleftwitchonbroom*{x_{1}+\dots+x_{n}}=0 \) versus \( -\overleftwitchonbroom{x_{1}+\dots+x_{n}}=0 \). - -Hovering ghosts: \( \overrightswishingghost{x_{1}+\dots+x_{n}}=0 \). You might -wonder whether there is enough space left for the swishing ghost; let's try -again: \( \overrightswishingghost{(x_{1}+\dots+x_{n})y}=0 \). As you can see, -there is enough room. Lorem ipsum dolor sit amet consectetur adipisci elit. -And \( \overrightswishingghost{\mathstrut} \) too. -\begin{gather*} - A \xrightswishingghost[a\star f(t)]{x_{1}+\dots+x_{n}} B - \xrightswishingghost{x+z} C \xrightswishingghost{} D \\ - A \xleftswishingghost[a\star f(t)]{x_{1}+\dots+x_{n}} B - \xleftswishingghost{x+z} C \xleftswishingghost{} D -\end{gather*} -Another hovering ghost: \( \overleftswishingghost{x_{1}+\dots+x_{n}}=0 \).. -Lorem ipsum dolor sit amet consectetur adipisci elit. Ulla rutrum, vel sivi sit -anismus oret, rubi sitiunt silvae. Let's see how it looks like when the ghost -hovers on a taller formula, as in \( -\overrightswishingghost{H_{1}\oplus\dots\oplus H_{k}} \). Mmmh, it's -suboptimal, to say the least.\footnote{We'd better try \( -\underleftswishingghost{y_{1}+\dots+y_{n}} \), too; well, this one looks good!} - -Under ``arrow-like'' symbols: \( \underleftswishingghost{x_{1}+\dots+x_{n}}=0 \) -and \( \underrightswishingghost{x+y+z} \). There are \( -\underleftwitchonbroom*{x_{1}+\dots+x_{n}}=0 \) and \( -\underrightwitchonbroom*{x+y+z} \) as well. - -\bigbreak - -A comparison between the ``standard'' and the ``script-style'' over\slash under -extensible arrows: -\begin{align*} - \overrightarrow{f_{1}+\dots+f_{n}} - &\neq\overscriptrightarrow{f_{1}+\dots+f_{n}} \\ - \overleftarrow{f_{1}+\dots+f_{n}} - &\neq\overscriptleftarrow{f_{1}+\dots+f_{n}} \\ - \overleftrightarrow{f_{1}+\dots+f_{n}} - &\neq\overscriptleftrightarrow{f_{1}+\dots+f_{n}} \\ - \underrightarrow{f_{1}+\dots+f_{n}} - &\neq\underscriptrightarrow{f_{1}+\dots+f_{n}} \\ - \underleftarrow{f_{1}+\dots+f_{n}} - &\neq\underscriptleftarrow{f_{1}+\dots+f_{n}} \\ - \underleftrightarrow{f_{1}+\dots+f_{n}} - &\neq\underscriptleftrightarrow{f_{1}+\dots+f_{n}} -\end{align*} - -\end{document} diff --git a/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-doc.pdf b/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-doc.pdf Binary files differindex 8bc4d0a6fa3..dedc5c23610 100644 --- a/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-doc.pdf +++ b/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-doc.pdf diff --git a/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.pdf b/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.pdf Binary files differnew file mode 100644 index 00000000000..34e554e756c --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.pdf diff --git a/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.tex b/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.tex new file mode 100644 index 00000000000..add54e3ae43 --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-man.tex @@ -0,0 +1,1060 @@ +\documentclass[a4paper]{article} +\usepackage[T1]{fontenc} +\usepackage{amsmath,amsfonts} +\usepackage{halloweenmath}[2017/04/16] +\usepackage{array} +\usepackage[bookmarksnumbered]{hyperref} + +\title{User's manual\\for the \halloweenmath\ package} +\author{G. Mezzetti} +\date{April~16, 2017} + +\hypersetup{ + pdftitle = {User's manual for the halloweenmath package}, + pdfauthor = {G. Mezzetti}, + pdfsubject = {The halloweenmath LaTeX package}, + pdfkeywords = {TeX,LaTeX,Halloween,math,math symbold}, + pdfcreationdate = {D:20170416000000}, + pdfmoddate = {D:20170416000000} +} + +\DeclareTextFontCommand{\packlass}{\normalfont\sffamily} +\DeclareTextFontCommand{\opt} {\normalfont\ttfamily} +\newcommand*{\meta}[1]{{\normalfont \(\langle\textit{#1}\rangle\)}} +\newcommand*{\halloweenmath}{\packlass{halloweenmath}} +\newcommand*{\amsmath} {\packlass{amsmath}} + +\newcommand*{\sumxn}{x_{1}+\dots+x_{n}} + +\makeatletter + +\newcolumntype{H}[3]{>{\hb@xt@ #3\bgroup#1}c<{#2\egroup}} +\newcolumntype{U}[2]{H{\hss$#1}{$\hss}{#2}@{\hspace{.5em}}} +\newcolumntype{V}[1]{H{\ttfamily}{\hss}{#1}} +\newcolumntype{W}[1]{H{}{\hss}{#1}} +\newcolumntype{O}{U{}{15\p@}} +\newcolumntype{D}{U{\displaystyle}{30\p@}} +\newcolumntype{L}{OD} +\newcolumntype{A}{U{}{40\p@}} + +\newenvironment*{@symtable}[2]{\par + \centering + \addtolength\leftskip {-80\p@}% + \addtolength\rightskip{-80\p@}% + \setlength\arraycolsep{.5em}% + \tabular{@{}*{#2}{#1}@{}}% +}{% + \endtabular + \par +} +\newenvironment{symtable}[1][\thr@@]{% + \@symtable{OV{90\p@}}{#1}% +}{% + \end@symtable +} +\newenvironment{opsymtable}[1][\tw@]{% + \def\arraystretch{\tw@}% + \@symtable{LV{120\p@}}{#1}% +}{% + \end@symtable +} +\newenvironment{xasymtable}[1][\tw@]{% + \def\arraystretch{\tw@}% + \@symtable{AW{200\p@}}{#1}% +}{% + \end@symtable +} +\newcommand*\Sym[1] {#1&\string#1} +\newcommand*\OpSym[1]{#1&\string#1} + +\makeatother + + + +\begin{document} + +\maketitle + +\tableofcontents +\listoftables + + + +\clearpage + +\section{Package loading} +\label{S:Loading} + +Load the \halloweenmath\ package as any other \LaTeXe\ package, that is, via the +usual \verb|\usepackage| declaration: +\begin{verbatim} + \usepackage{halloweenmath} +\end{verbatim} +Note that the \halloweenmath\ package requires the \amsmath\ package, and loads +it (without specifying any option) if it is not already loaded. If you want to +pass options to \amsmath, load it before \halloweenmath. + +The \halloweenmath\ package defines no options by itself; nevertheless, it does +honor the [\opt{no}]\opt{sumlimits} options from the \amsmath\ package. + + + +\section{Package usage} +\label{S:Usage} + +The \halloweenmath\ package defines a handful of commands, all of which are +intended for use \emph{in mathematical mode}, where they yield some kind of +symbol that draws from the classic Halloween-related iconography (pumpkins, +witches, ghosts, bats, and so on). Below, these symbols are grouped according +to their mathematical ``r\^{o}le'' (ordinary symbols, binary operators, +arrows\ldots). + + + +\subsection{Ordinary symbols} +\label{sS:Ordinary} + +Table~\ref{tab:ordinary} lists the ordinary symbols provided by the +\halloweenmath\ package. + +\begin{table}[t!p] + \centering + \begin{symtable}\relax + \Sym{\mathleftghost} & \Sym{\mathghost} & \Sym{\mathrightghost} \\ + \Sym{\mathleftbat} & \Sym{\mathbat} & \Sym{\mathrightbat} \\ + \end{symtable} + \caption{Ordinary symbols} + \label{tab:ordinary} +\end{table} + + + +\subsection{Binary operators} +\label{sS:Binary} + +Table~\ref{tab:binary} lists the binary operators available. Note that each +binary operator has an associated ``large'' operator (see +subsection~\ref{sS:Large}). + +\begin{table}[t!p] + \centering + \begin{symtable}[2] + \Sym{\pumpkin} & \Sym{\skull} \\ + \end{symtable} + \caption{Binary operators} + \label{tab:binary} +\end{table} + + + +\subsection{\textquotedblleft Large\textquotedblright\ operators} +\label{sS:Large} + +Table~\ref{tab:large} lists the ``large'' operators. Each of them is depicted +in two variants: the variant used for in-line math and the variant used for +displayed formulas. In the table, besides the ``large'' operators called +\verb|\bigpumpkin|\footnote{As a homage to Linus van Pelt, +\texttt{\string\greatpumpkin} is defined as synonym of +\texttt{\string\bigpumpkin}.} and \verb|\bigskull|, which are correlated to the +binary operators \verb|\pumpkin| and \verb|\skull|, repectively, we find the +commands \verb|\mathwitch| and \verb|\reversemathwitch|: note how these two last +command have a \mbox{$*$-form} that adds a black cat on the broomstick. + +\begin{table}[t!p] + \centering + \begin{opsymtable}\relax + \OpSym{\mathwitch} & \OpSym{\reversemathwitch} \\ + \OpSym{\mathwitch*} & \OpSym{\reversemathwitch*} \\ + \OpSym{\bigpumpkin}\normalfont\footnotemark[\value{footnote}] + & \OpSym{\bigskull} \\ + \end{opsymtable} + \caption{\textquotedblleft Large\textquotedblright\ operators} + \label{tab:large} +\end{table} + +All the ``large'' operators listed in table~\ref{tab:large} honor the +[\opt{no}]\opt{sumlimits} options from the \amsmath\ package. + + + +\subsection{\textquotedblleft Fraction-like\textquotedblright\ symbols} +\label{sS:Inner} + +There are also two commands, listed on table~\ref{tab:inner}, that yield symbols +that are somewhat similar to fractions, in that they grow in size when they are +typeset in display style.\footnote{Another \TeX nical aspect of these commands +is that they yield an atom of type Inner.} They are intended to denote +an unspecified subformula that appears as a part of a larger one. + +\begin{table}[t!p] + \centering + \begin{opsymtable}\relax + \OpSym{\mathcloud} & \OpSym{\reversemathcloud} \\ + \end{opsymtable} + \caption{\textquotedblleft Fraction-like\textquotedblright\ symbols} + \label{tab:inner} +\end{table} + + + +\subsection{\textquotedblleft Arrow-like\textquotedblright\ symbols} +\label{sS:Arrow} + +As we'll see in subsection~\ref{sS:XArrow}, the \halloweenmath\ package provides +a series of commands whose usage parallels that of ``extensible arrows'' like +\verb|\xrightarrow| or \verb|\xleftarrow|; but the symbols that those commands +yield when used with an empty argument turn out to be too short, and it is for +this reason that the \halloweenmath\ package also offers you the four commands +you can see in table~\ref{tab:arrow}: they produce brooms, or pitchforks, having +fixed length, which is approximately the same size of a +\verb|\longrightarrow|~($\longrightarrow$). All of these symbols are treated as +relations. + +\begin{table}[t!p] + \centering + \begin{symtable}[2] + \Sym{\leftbroom} & \Sym{\rightbroom} \\ + \Sym{\hmleftpitchfork} & \Sym{\hmrightpitchfork} \\ + \end{symtable} + \caption{\textquotedblleft Arrow-like\textquotedblright\ symbols} + \label{tab:arrow} +\end{table} + + + +\subsection{Extensible \textquotedblleft arrow-like\textquotedblright\ symbols} +\label{sS:XArrow} + +You are probably already familiar with the ``extensible arrows'' like +$\xrightarrow{abc}$ and~$\xleftarrow{abc}$; for example, you probably know that +the input +\begin{verbatim} + \[ + \bigoplus_{i=1}^{n} A_{i} \xrightarrow{f_{1}+\dots+f_{n}} B + \] +\end{verbatim} +produces this result: +\[ + \bigoplus_{i=1}^{n} A_{i} \xrightarrow{f_{1}+\dots+f_{n}} B +\] +The \halloweenmath\ package features a whole assortment of extensible symbols of +this kind, which are listed in table~\ref{tab:xarrow}. For example, you could +say +\begin{verbatim} + \[ + G \xrightswishingghost{h_{1}+\dots+h_{n}} + \bigpumpkin_{t=1}^{n} S_{t} + \] +\end{verbatim} +to get the following in print: +\[ + G \xrightswishingghost{h_{1}+\dots+h_{n}} + \bigpumpkin_{t=1}^{n} S_{t} +\] + +\begin{table}[t!p] + \centering + \begin{xasymtable}\relax + \xleftwitchonbroom{abc\dots z} + & \verb|\xleftwitchonbroom{abc\dots z}| & + \xrightwitchonbroom{abc\dots z} + & \verb|\xrightwitchonbroom{abc\dots z}| \\ + \xleftwitchonbroom*{abc\dots z} + & \verb|\xleftwitchonbroom*{abc\dots z}| & + \xrightwitchonbroom*{abc\dots z} + & \verb|\xrightwitchonbroom*{abc\dots z}| \\ + \xleftwitchonpitchfork{abc\dots z} + & \verb|\xleftwitchonpitchfork{abc\dots z}| & + \xrightwitchonpitchfork{abc\dots z} + & \verb|\xrightwitchonpitchfork{abc\dots z}| \\ + \xleftwitchonpitchfork*{abc\dots z} + & \verb|\xleftwitchonpitchfork*{abc\dots z}| & + \xrightwitchonpitchfork*{abc\dots z} + & \verb|\xrightwitchonpitchfork*{abc\dots z}| \\ + \xleftbroom{abc\dots z} + & \verb|\xleftbroom{abc\dots z}| & + \xrightbroom{abc\dots z} + & \verb|\xrightbroom{abc\dots z}| \\ + \xleftpitchfork{abc\dots z} + & \verb|\xleftpitchfork{abc\dots z}| & + \xrightpitchfork{abc\dots z} + & \verb|\xrightpitchfork{abc\dots z}| \\ + \xleftswishingghost{abc\dots z} + & \verb|\xleftswishingghost{abc\dots z}| & + \xrightswishingghost{abc\dots z} + & \verb|\xrightswishingghost{abc\dots z}| \\ + \xleftflutteringbat{abc\dots z} + & \verb|\xleftflutteringbat{abc\dots z}| & + \xrightflutteringbat{abc\dots z} + & \verb|\xrightflutteringbat{abc\dots z}| \\ + \end{xasymtable} + \caption{Extensible \textquotedblleft arrow-like\textquotedblright\ symbols} + \label{tab:xarrow} +\end{table} + +More generally, exactly as the commands \verb|\xleftarrow| and +\verb|\xrightarrow|, on which they are modeled, all the commands listed in +table~\ref{tab:xarrow} take one optional argument, in which you can specify a +subscript, and one mandatory argument, where a---possibly empty---superscript +must be indicated. For example, +\begin{verbatim} + \[ + A \xrightwitchonbroom*[abc\dots z]{f_{1}+\dots+f_{n}} B + \xrightwitchonbroom*{f_{1}+\dots+f_{n}} C + \xrightwitchonbroom*[abc\dots z]{} D + \] +\end{verbatim} +results in +\[ + A \xrightwitchonbroom*[abc\dots z]{f_{1}+\dots+f_{n}} B + \xrightwitchonbroom*{f_{1}+\dots+f_{n}} C + \xrightwitchonbroom*[abc\dots z]{} D +\] + +Note that, also in this family of symbols, the commands that involve a witch all +provide a \mbox{$*$-form} that adds a cat on the broom (or pitchfork). + +The commands listed above should not be confused with those presented in +subsection~\ref{sS:OUArrow}. + + + +\subsection{Extensible \textquotedblleft over-\protect\slash + under-arrow-like\textquotedblright\ symbols} +\label{sS:OUArrow} + +The commands dealt with in subsection~\ref{sS:XArrow} typeset an extensible +``arrow-like'' symbol having some math above or below it. But the \amsmath\ +package also provides commands that act the other way around, that is, they put +an arrow over, or under, some math, as in the case of +\begin{verbatim} + \overrightarrow{x_{1}+\dots+x_{n}} +\end{verbatim} +that yields \( \overrightarrow{x_{1}+\dots+x_{n}} \). The \halloweenmath\ +package provides a whole bunch of commands like this, which are listed in +table~\ref{tab:ouarrow}, and which all share the same syntax as the +\verb|\overrightarrow| command. + +\begin{table}[t!p] + \centering + \begin{xasymtable}\relax + \overleftwitchonbroom{abc\dots z} + & \verb|\overleftwitchonbroom{abc\dots z}| & + \overrightwitchonbroom{abc\dots z} + & \verb|\overrightwitchonbroom{abc\dots z}| \\ + \overleftwitchonbroom*{abc\dots z} + & \verb|\overleftwitchonbroom*{abc\dots z}| & + \overrightwitchonbroom*{abc\dots z} + & \verb|\overrightwitchonbroom*{abc\dots z}| \\ + \overleftwitchonpitchfork{abc\dots z} + & \verb|\overleftwitchonpitchfork{abc\dots z}| & + \overrightwitchonpitchfork{abc\dots z} + & \verb|\overrightwitchonpitchfork{abc\dots z}| \\ + \overleftwitchonpitchfork*{abc\dots z} + & \verb|\overleftwitchonpitchfork*{abc\dots z}| & + \overrightwitchonpitchfork*{abc\dots z} + & \verb|\overrightwitchonpitchfork*{abc\dots z}| \\ + \overleftbroom{abc\dots z} + & \verb|\overleftbroom{abc\dots z}| & + \overrightbroom{abc\dots z} + & \verb|\overrightbroom{abc\dots z}| \\ + \overscriptleftbroom{abc\dots z} + & \verb|\overscriptleftbroom{abc\dots z}| & + \overscriptrightbroom{abc\dots z} + & \verb|\overscriptrightbroom{abc\dots z}| \\ + \overleftpitchfork{abc\dots z} + & \verb|\overleftpitchfork{abc\dots z}| & + \overrightpitchfork{abc\dots z} + & \verb|\overrightpitchfork{abc\dots z}| \\ + \overscriptleftpitchfork{abc\dots z} + & \verb|\overscriptleftpitchfork{abc\dots z}| & + \overscriptrightpitchfork{abc\dots z} + & \verb|\overscriptrightpitchfork{abc\dots z}| \\ + \overleftswishingghost{abc\dots z} + & \verb|\overleftswishingghost{abc\dots z}| & + \overrightswishingghost{abc\dots z} + & \verb|\overrightswishingghost{abc\dots z}| \\ + \overleftflutteringbat{abc\dots z} + & \verb|\overleftflutteringbat{abc\dots z}| & + \overrightflutteringbat{abc\dots z} + & \verb|\overrightflutteringbat{abc\dots z}| \\ + \underleftwitchonbroom{abc\dots z} + & \verb|\underleftwitchonbroom{abc\dots z}| & + \underrightwitchonbroom{abc\dots z} + & \verb|\underrightwitchonbroom{abc\dots z}| \\ + \underleftwitchonbroom*{abc\dots z} + & \verb|\underleftwitchonbroom*{abc\dots z}| & + \underrightwitchonbroom*{abc\dots z} + & \verb|\underrightwitchonbroom*{abc\dots z}| \\ + \underleftwitchonpitchfork{abc\dots z} + & \verb|\underleftwitchonpitchfork{abc\dots z}| & + \underrightwitchonpitchfork{abc\dots z} + & \verb|\underrightwitchonpitchfork{abc\dots z}| \\ + \underleftwitchonpitchfork*{abc\dots z} + & \verb|\underleftwitchonpitchfork*{abc\dots z}| & + \underrightwitchonpitchfork*{abc\dots z} + & \verb|\underrightwitchonpitchfork*{abc\dots z}| \\ + \underleftbroom{abc\dots z} + & \verb|\underleftbroom{abc\dots z}| & + \underrightbroom{abc\dots z} + & \verb|\underrightbroom{abc\dots z}| \\ + \underscriptleftbroom{abc\dots z} + & \verb|\underscriptleftbroom{abc\dots z}| & + \underscriptrightbroom{abc\dots z} + & \verb|\underscriptrightbroom{abc\dots z}| \\ + \underleftpitchfork{abc\dots z} + & \verb|\underleftpitchfork{abc\dots z}| & + \underrightpitchfork{abc\dots z} + & \verb|\underrightpitchfork{abc\dots z}| \\ + \underscriptleftpitchfork{abc\dots z} + & \verb|\underscriptleftpitchfork{abc\dots z}| & + \underscriptrightpitchfork{abc\dots z} + & \verb|\underscriptrightpitchfork{abc\dots z}| \\ + \underleftswishingghost{abc\dots z} + & \verb|\underleftswishingghost{abc\dots z}| & + \underrightswishingghost{abc\dots z} + & \verb|\underrightswishingghost{abc\dots z}| \\ + \underleftflutteringbat{abc\dots z} + & \verb|\underleftflutteringbat{abc\dots z}| & + \underrightflutteringbat{abc\dots z} + & \verb|\underrightflutteringbat{abc\dots z}| \\ + \end{xasymtable} + \caption{Extensible \textquotedblleft over-\protect\slash + under-arrow-like\textquotedblright\ symbols} + \label{tab:ouarrow} +\end{table} + +Although they are not extensible, and are thus more similar to math accents, we +have chosen to include in this subsection also the commands listed in +table~\ref{tab:oubat}. They typeset a subformula either surmounted by the bat +produced by \verb|\mathbat|, or with that symbol underneath. The normal +(\emph{i.e.}, unstarred) form pretends that the bat has zero width (but some +height), whereas the starred variant takes the actual width of the bat be into +account; for example, given the input +\begin{verbatim} + \begin{align*} + &x+y+z && x+y+z \\ + &x+\overbat{y}+z && x+\overbat*{y}+z + \end{align*} +\end{verbatim} +compare the spacing you get in the two columns of the output: +\begin{align*} + &x+y+z && x+y+z \\ + &x+\overbat{y}+z && x+\overbat*{y}+z +\end{align*} + +\begin{table}[t!p] + \centering + \begin{xasymtable}\relax + \overbat{xyz} & \verb|\overbat{xyz}| & + \underbat{xyz} & \verb|\underbat{xyz}| \\ + \end{xasymtable} + \caption{Over\protect\slash under bats} + \label{tab:oubat} +\end{table} + + + +\subsection{Script-style versions of + \texorpdfstring{\amsmath}{amsmath}\textquoteright s + over\protect\slash under arrows} +\label{sS:ScriptArrow} + +The commands listed in table~\ref{tab:scriptarrow} all produce an output similar +to that of the corresponding \amsmath's command having the same name, but +stripped of the \texttt{script} substring, with the only difference that the +size of the arrow is smaller. More precisely, they use for the arrow the +relative script size of the current size (that is, of the size in which their +argument is typeset). For example, whilst \verb|\overrightarrow{x+y+z}| yields +$\overrightarrow{x+y+z}$, \verb|\overscriptrightarrow{x+y+z}| results in +$\overscriptrightarrow{x+y+z}$ (do you see the difference?), which, in the +author's humble opinion, looks \emph{much} better. + +\begin{table}[t!p] + \centering + \begin{xasymtable}\relax + \overscriptleftarrow{abc\dots z} + & \verb|\overscriptleftarrow{abc\dots z}| & + \underscriptleftarrow{abc\dots z} + & \verb|\underscriptleftarrow{abc\dots z}| \\ + \overscriptrightarrow{abc\dots z} + & \verb|\overscriptrightarrow{abc\dots z}| & + \underscriptrightarrow{abc\dots z} + & \verb|\underscriptrightarrow{abc\dots z}| \\ + \overscriptleftrightarrow{abc\dots z} + & \verb|\overscriptleftrightarrow{abc\dots z}| & + \underscriptleftrightarrow{abc\dots z} + & \verb|\underscriptleftrightarrow{abc\dots z}| \\ + \end{xasymtable} + \caption{Extensible over\protect\slash under arrows with reduced size} + \label{tab:scriptarrow} +\end{table} + + + +\clearpage + +\section{Examples of use} +\label{S:Example} + +This section illustrates the use of the commands provided by the \halloweenmath\ +package: by reading the source code for this document, you can see how the +output presented below can be obtained. + + + +\subsection{Applying black magic} + +The $\mathwitch$~symbol was invented with the intent to provide a notation for +the operation of applying black magic to a formula. Its applications range from +simple reductions sometimes made by certain undergraduate freshmen, as in +\[ + \mathwitch 2\sin\frac{x}{2} = \sin x +\] +to key steps that permit to simplify greatly the proof of an otherwise totally +impenetrable theorem, for example +\[ + \mathwitch\Bigl( + \sup\,\{\,p\in\mathbb{N}\mid \text{$p$ and $p+2$ are both prime}\,\} + \Bigr) = \infty +\] +Another way of denoting the same operation is to place the broom and the witch +\emph{over} the relevant subformula: +\[ + \overrightwitchonbroom{ + \sup\,\{\,p\in\mathbb{N}\mid \text{$p$ and $p+2$ are both prime}\,\} + } = \infty +\] + +Different types of magic, that you might want to apply to a given formula, can +be distinguished by adding a black cat on the broom: for example, a student +could claim that +\begin{align*} + \mathwitch 2x\sin x &= 2\sin x^{2}\\ + \intertext{whereas, for another student,} + \mathwitch*2x\sin x &= \sin 3x +\end{align*} + + + +\subsection{Monoids} + +Let $X$ be a non-empty set, and suppose there exists a map +\begin{equation} + X\times X\longrightarrow X,\qquad + (x,y)\longmapsto P(x,y)=x\pumpkin y + \label{eq:Pdef} +\end{equation} +Suppose furthermore that this map satisfies the \textbf{associative property} +\begin{equation} + \forall x\in X,\;\forall y\in X,\;\forall z\in X\qquad + x\pumpkin(y\pumpkin z) = (x\pumpkin y)\pumpkin z + \label{eq:Passoc} +\end{equation} +Then, the pair $(X,\pumpkin)$ is called a \textbf{semigroup}, and $\pumpkin$ +denotes its \textbf{operation}. If, in addition, there exists in~$X$ an +element~$\mathghost$ with the property that +\begin{equation} + \forall x\in X\qquad + \mathghost\pumpkin x = x = x\pumpkin\mathghost + \label{eq:Punit} +\end{equation} +the triple $(X,\pumpkin,\mathghost)$ is called a \textbf{monoid}, and the +element~$\mathghost$ is called its \textbf{unit}. It is immediate to prove that +the unit of a monoid is unique: indeed, if $\mathghost'$ is another element +of~$X$ having the property~\eqref{eq:Punit}, then +\[ + \mathghost' = \mathghost'\pumpkin\mathghost = \mathghost +\] +(the first equality holds because \( \mathghost'\in X \) and +$\mathghost$~satisfies~\eqref{eq:Punit}, and the second because \( \mathghost\in +X \) and $\mathghost'$~satisfies~\eqref{eq:Punit}). + +Let $(X,\pumpkin)$ be a monoid. Since the operation~$\pumpkin$ is associative, +we may set, for \( x,y,z\in X \), +\[ + x\pumpkin y\pumpkin z =_{\mathrm{def}} + (x\pumpkin y)\pumpkin z = x\pumpkin (y\pumpkin z) +\] +More generally, since the order in which the operations are performed doesn't +matter, given $n$~elements \( x_{1},\dots,x_{n} \in X \), with $n\ge1$, the +result of +\[ + \bigpumpkin_{i=1}^{n} x_{i} = x_{1}\pumpkin\dots\pumpkin x_{n} +\] +is unambiguously defined. + +A monoid $(X,\pumpkin)$ is said to be \textbf{commutative} if +\begin{equation} + \forall x\in X,\;\forall y\in X\qquad + x\pumpkin y = y\pumpkin x + \label{eq:Pcomm} +\end{equation} +In this case, even the order of the \emph{operands} becomes irrelevant, so that, +for any finite set~$F$, the notation \( \bigpumpkin_{i\in F} x_{i} \) also +acquires a meaning. + + + +\subsection{Applications induced on power sets} + +If $X$ is a set, we'll denote by~$\wp(X)$ the set of all subsets of~$X$, that is +\[ + \wp(X) = \{\,S:S\subseteq X\,\} +\] + +Let \( f\colon A\longrightarrow B \) a function. Starting from~$f$, we can +define two other functions \( f^{\mathrightbat} \colon \wp(A) \longrightarrow +\wp(B) \) and \( f^{\mathleftbat} \colon \wp(B) \longrightarrow \wp(A) \) in the +following way: +\begin{alignat}{2} + &\text{for $X\subseteq A$,}\quad + &f^{\mathrightbat}(X) &= \{\,f(x):x\in X\,\} \\ + &\text{for $Y\subseteq B$,}\quad + &f^{\mathleftbat}(Y) &= \{\,x\in A:f(x)\in Y\,\} +\end{alignat} +In the case of functions with long names, or with long descriptions, we'll also +use a notation like \( \overrightflutteringbat{f_{1}+\dots+f_{n}} \) to mean the +same thing as \( (f_{1}+\dots+f_{n})^{\mathrightbat} \). + +For example, +\begin{align*} + \mathop{\overrightflutteringbat{\sin}}(\mathbb{R}) &= [-1,1] \\ + \mathop{\overrightflutteringbat{\sin}}\bigl([0,\pi]\bigr) &= [0,1] \\ + \mathop{\overrightflutteringbat{\sin+\cos}}(\mathbb{R}) + &= \bigl[-\tfrac{\sqrt{2}}{2},\tfrac{\sqrt{2}}{2}\bigr] \\ + \mathop{\overleftflutteringbat{\log}}\bigl(\mathopen]-\infty,0]\bigr) + &= \mathopen]0,1] +\end{align*} + + + +\subsection{A comprehensive test} + +A comparison between the ``standard'' and the ``script'' extensible over\slash +under arrows: +\begin{align*} + \overrightarrow{f_{1}+\dots+f_{n}} + &\neq\overscriptrightarrow{f_{1}+\dots+f_{n}} \\ + \overleftarrow{f_{1}+\dots+f_{n}} + &\neq\overscriptleftarrow{f_{1}+\dots+f_{n}} \\ + \overleftrightarrow{f_{1}+\dots+f_{n}} + &\neq\overscriptleftrightarrow{f_{1}+\dots+f_{n}} \\ + \underrightarrow{f_{1}+\dots+f_{n}} + &\neq\underscriptrightarrow{f_{1}+\dots+f_{n}} \\ + \underleftarrow{f_{1}+\dots+f_{n}} + &\neq\underscriptleftarrow{f_{1}+\dots+f_{n}} \\ + \underleftrightarrow{f_{1}+\dots+f_{n}} + &\neq\underscriptleftrightarrow{f_{1}+\dots+f_{n}} +\end{align*} + +\bigbreak + +A reduction my students are likely to make: +\[\mathwitch \frac{\sin x}{s} = x\,\mathrm{in}\] +The same reduction as an in-line formula: +\(\mathwitch \frac{\sin x}{s} = x\,\mathrm{in}\). + +Now with limits: +\[ + \mathwitch_{i=1}^{n} \frac + {\text{$i$-th magic term}} + {\text{$2^{i}$-th wizardry}} +\] +And repeated in-line: \( \mathwitch_{i=1}^{n} x_{i}y_{i} \). + +The \texttt{bold} math version is honored:\mathversion{bold} +\[ + \mathwitch* + \genfrac{<}{>}{0pt}{} + {\textbf{something terribly}}{\textbf{complicated}} + = 0 +\] +Compare it with \texttt{normal} math\mathversion{normal}: +\[ + \mathwitch* + \genfrac{<}{>}{0pt}{} + {\text{something terribly}}{\text{complicated}} + = 0 +\] +In-line math comparison: +{\boldmath $\mathwitch* f(x)$} versus $\mathwitch* f(x)$. + +There is also a left-facing witch: +\[\reversemathwitch \frac{\sin x}{s} = x\,\mathrm{in}\] +And here is the in-line version: +\(\reversemathwitch \frac{\sin x}{s} = x\,\mathrm{in}\). + +Test for \verb|\dots|: +\[ + \mathwitch_{i_{1}=1}^{n_{1}} \dots \mathwitch_{i_{p}=1}^{n_{p}} + \frac + {\text{$i_{1}$-th magic factor}} + {\text{$2^{i_{1}}$-th wizardry}} + \pumpkin\dots\pumpkin + \frac + {\text{$i_{p}$-th magic factor}} + {\text{$2^{i_{p}}$-th wizardry}} +\] +And repeated in-line: \( \mathwitch\dots\mathwitch_{i=1}^{n} x_{i}y_{i} \). + +\bigbreak + +Now the pumpkins. First the \texttt{bold} math version:\mathversion{bold}: +\[ \bigoplus_{h=1}^{m}\bigpumpkin_{k=1}^{n} P_{h,k} \] +Then the \texttt{normal} one\mathversion{normal}: +\[ \bigoplus_{h=1}^{m}\bigpumpkin_{k=1}^{n} P_{h,k} \] +In-line math comparison: +{\boldmath \( \bigpumpkin_{i=1}^{n} P_{i} \neq \bigoplus_{i=1}^{n} P_{i} \)} +versus \( \bigpumpkin_{i=1}^{n} P_{i} \neq \bigoplus_{i=1}^{n} P_{i} \). + +Close test: {\boldmath $\bigoplus$}$\bigoplus$. +And against the pumpkins: +{\boldmath $\bigpumpkin$}$\bigpumpkin\bigoplus${\boldmath $\bigoplus$}. + +In-line, but with \verb|\limits|: +\( \bigoplus\limits_{h=1}^{m}\bigpumpkin\limits_{k=1}^{n} P_{h,k} \). + +Binary: \( x\pumpkin y \neq x\oplus y \). And in display: +\[ a\pumpkin\frac{x\pumpkin y}{x\oplus y}\otimes b \] +Close test: {\boldmath $\oplus$}$\oplus$. +And with the pumpkins too: +{\boldmath $\pumpkin$}$\pumpkin\oplus${\boldmath $\oplus$}. + +In general, +\[ \bigpumpkin_{i=1}^{n} P_{i} = P_{1}\pumpkin\dots\pumpkin P_{n} \] + +\begingroup + +\bfseries\boldmath + +The same in bold: +\[ \bigpumpkin_{i=1}^{n} P_{i} = P_{1}\pumpkin\dots\pumpkin P_{n} \] + +\endgroup + +Other styles: \( \frac{x\pumpkin y}{2} \), exponent~$Z^{\pumpkin}$, +subscript~$W_{\!x\pumpkin y}$, double script \( 2^{t_{x\pumpkin y}} \). + +\bigbreak + +Clouds. A hypothetical identity: +\( \frac{\sin^{2}x + \cos^{2}x}{\cos^{2}x} = \mathcloud \). +Now the same identity set in display: +\[ \frac{\sin^{2}x + \cos^{2}x}{\cos^{2}x} = \mathcloud \] +Now in smaller size: \( \frac{\sin x+\cos x}{\mathcloud} = 1 \). + +Specular clouds, \texttt{bold}\ldots\mathversion{bold} +\[ \reversemathcloud \longleftrightarrow \mathcloud \] +\ldots and in \texttt{normal} math.\mathversion{normal} +\[ \reversemathcloud \longleftrightarrow \mathcloud \] +In-line math comparison: +{\boldmath \( \reversemathcloud \leftrightarrow \mathcloud \)} +versus \( \reversemathcloud \leftrightarrow \mathcloud \). +Abutting: {\boldmath $\mathcloud$}$\mathcloud$. + +\bigbreak + +Ghosts: \( \mathleftghost \mathghost \mathrightghost \mathghost \mathleftghost +\mathghost \mathrightghost \). Now with letters: \( H \mathghost H \mathghost h +\mathghost ab \mathghost f \mathghost wxy \mathghost \), and also \( +2\mathghost^{3} + 5\mathleftghost^{\!2}-3\mathrightghost_{i} = +12\mathrightghost_{j}^{4} \). Then, what about~$x^{2\mathghost}$ and \( +z_{\!\mathrightghost+1} = z_{\!\mathrightghost}^{2} + z_{\mathghost} \)? + +In subscripts: +\begin{align*} + F_{\mathghost+2} &= F_{\mathghost+1} + F_{\mathghost} \\ + F_{\!\mathrightghost+2} &= F_{\!\mathrightghost+1} + F_{\!\mathrightghost} +\end{align*} +Another test: \( \mathghost | \mathrightghost | \mathghost | \mathleftghost | +\mathghost | \mathrightghost | \mathghost | \mathleftghost | \mathghost \). We +should also try this: \( \mathrightghost \mathleftghost \mathrightghost +\mathleftghost \). + +Let us now compare ghosts set in normal math +\( \mathrightghost \mathleftghost \mathghost \mathrightghost \mathleftghost \) +with (a few words to push the bold ghosts to the right) +{\bfseries\boldmath ghosts like these +\( \mathrightghost \mathleftghost \mathghost \mathrightghost \mathleftghost \), +which are set in bold math.} + +\bigbreak + +Extensible arrows: +\begin{gather*} + A \xrightwitchonbroom[a]{\sumxn} B \xrightwitchonbroom{x+z} + C \xrightwitchonbroom{} D \\ + A \xrightwitchonbroom*[a]{\sumxn} B \xrightwitchonbroom*{x+z} + C \xrightwitchonbroom*{} D \\ + A \xleftwitchonbroom*[a]{\sumxn} B \xleftwitchonbroom*{x+z} + C \xleftwitchonbroom*{} D \\ + A \xleftwitchonbroom[a]{\sumxn} B \xleftwitchonbroom{x+z} + C \xleftwitchonbroom{} D +\end{gather*} +And \( \overrightwitchonbroom*{\sumxn}=0 \) versus \( +\overrightwitchonbroom{\sumxn}=0 \); or \( \overleftwitchonbroom*{\sumxn}=0 \) +versus \( \overleftwitchonbroom{\sumxn}=0 \). + +\begingroup + +\bfseries \mathversion{bold} + +Now repeat in bold: +\begin{gather*} + A \xrightwitchonbroom[a]{\sumxn} B \xrightwitchonbroom{x+z} + C \xrightwitchonbroom{} D \\ + A \xrightwitchonbroom*[a]{\sumxn} B \xrightwitchonbroom*{x+z} + C \xrightwitchonbroom*{} D \\ + A \xleftwitchonbroom*[a]{\sumxn} B \xleftwitchonbroom*{x+z} + C \xleftwitchonbroom*{} D \\ + A \xleftwitchonbroom[a]{\sumxn} B \xleftwitchonbroom{x+z} + C \xleftwitchonbroom{} D +\end{gather*} +And \( \overrightwitchonbroom*{\sumxn}=0 \) versus \( +\overrightwitchonbroom{\sumxn}=0 \); or \( \overleftwitchonbroom*{\sumxn}=0 \) +versus \( \overleftwitchonbroom{\sumxn}=0 \). + +\endgroup + +Hovering ghosts: \( \overrightswishingghost{\sumxn}=0 \). I~wonder whether +there is enough space left for the swishing ghost; let's try again: +\( \overrightswishingghost{(\sumxn)y}=0 \)! Yes, it looks like there is enough +room, although, of course, we cannot help the line spacing going awry. Also try +\( \overrightswishingghost{\mathstrut} \). +\begin{gather*} + A \xrightswishingghost[a]{\sumxn} B \xrightswishingghost{x+z} C + \xrightswishingghost{} D \\ + A \xleftswishingghost[a]{\sumxn} B \xleftswishingghost{x+z} C + \xleftswishingghost{} D +\end{gather*} +Another hovering ghost: \( \overleftswishingghost{\sumxn}=0 \). +Lorem ipsum dolor sit amet consectetur adipisci elit. Ulla rutrum, vel sivi sit +anismus oret, rubi sitiunt silvae. Let's see how it looks like when the ghost +hovers on a taller formula, as in \( +\overrightswishingghost{H_{1}\oplus\dots\oplus H_{k}} \). Mmm, it's suboptimal, +to say the least.\footnote{We'd better try \( +\underleftswishingghost{y_{1}+\dots+y_{n}} \), too; well, this one looks good!} + +Under ``arrow-like'' symbols: \( \underleftswishingghost{\sumxn}=0 \) and \( +\underrightswishingghost{x+y+z} \). There are \( +\underleftwitchonbroom*{\sumxn}=0 \) and \( \underrightwitchonbroom*{x+y+z} \) +as well. + +Compare \( A\xrightswishingghost{\sumxn} B \) with (add a few words to push it +to the next line) {\bfseries\boldmath its bold version \( +A\xrightswishingghost{\sumxn} B \).} + +\bigbreak + +Bats: $\mathbat${\boldmath $\mathbat$}. We are interested in seeing whether a +bat affixed to a letter as an exponent causes the lines of a paragraph to be +further apart than usual. Therefore, we now try~$f^{\mathbat}$, also +{\bfseries\boldmath in bold~$f^{\mathbat}$,} then we type a few more words (just +enough to obtain another typeset line or two) in order to see what happens. We +need to look at the transcript file, to check the outcome of the following +tracing commands. + +Asymmetric bats: $\mathleftbat${\boldmath $\mathleftbat$}, and also +$\mathrightbat${\boldmath $\mathrightbat$}. Exponents: this is \texttt{normal} +math \( x^{\mathleftbat} \pumpkin y^{\mathrightbat} \), while +{\bfseries\boldmath this is \texttt{bold} math \( x^{\mathleftbat} \pumpkin +y^{\mathrightbat} \).} Do you note the difference? Let's try subscripts, too: +\( f_{\mathleftbat} \pumpkin g_{\mathrightbat} \) versus {\bfseries\boldmath +bold \( f_{\mathleftbat} \pumpkin g_{\mathrightbat} \).} +Now, keep on repeating some silly text, just in order to fill up the paragraph +with a sufficient number of lines. Now, keep on repeating some silly text, just +in order to fill up the paragraph with a sufficient number of lines. Now, keep +on repeating some silly text, just in order to fill up the paragraph with a +sufficient number of lines. That's enough! + +Hovering bats: \( \overrightflutteringbat{\sumxn}=0 \). I~wonder whether there +is enough space left for the swishing bat; let's try again: +\( \overrightflutteringbat{(\sumxn)y}=0 \)! Yes, it looks like there is enough +room (with the usual remark abut line spacing). Also try +\( \overrightflutteringbat{\mathstrut} \). +\begin{gather*} + A \xrightflutteringbat[a]{\sumxn} B \xrightflutteringbat{x+z} + C \xrightflutteringbat{} D \\ + A \xleftflutteringbat[a]{\sumxn} B \xleftflutteringbat{x+z} C + \xleftflutteringbat{} D +\end{gather*} +Another hovering bat: \( \overleftflutteringbat{\sumxn}=0 \). + +Under ``arrow-like'' bats: \( \underleftflutteringbat{\sumxn}=0 \) and \( +\underrightflutteringbat{x+y+z} \). + +Compare \( A\xrightflutteringbat{\sumxn} B \) with (add a few words to push it +to the next line) {\bfseries\boldmath its bold version \( +A\xrightflutteringbat{\sumxn} B \).} + +Test for checking the placement of the formulas that go over or under the +fluttering bat: +\begin{gather*} + A \xrightflutteringbat[\text{a long subscript}]{\text{a long superscript}} B + \xrightflutteringbat[\text{a long subscript}]{|} C + \xrightflutteringbat{|} D \xrightflutteringbat{} E \\ + A \xleftflutteringbat[\text{a long subscript}]{\text{a long superscript}} B + \xleftflutteringbat[\text{a long subscript}]{|} C + \xleftflutteringbat{|} D \xleftflutteringbat{} E +\end{gather*} +I'd say it's now OK\@\ldots + +\bigbreak + +Extensible arrows with pitchfork: +\begin{gather*} + A \xrightwitchonpitchfork[a]{\sumxn} B \xrightwitchonpitchfork{x+z} C + \xrightwitchonpitchfork{} D \\ + A \xrightwitchonpitchfork*[a]{\sumxn} B \xrightwitchonpitchfork*{x+z} C + \xrightwitchonpitchfork*{} D \\ + A \xleftwitchonpitchfork*[a]{\sumxn} B \xleftwitchonpitchfork*{x+z} C + \xleftwitchonpitchfork*{} D \\ + A \xleftwitchonpitchfork[a]{\sumxn} B \xleftwitchonpitchfork{x+z} C + \xleftwitchonpitchfork{} D +\end{gather*} +And \( \overrightwitchonpitchfork*{\sumxn}=0 \) versus \( +\overrightwitchonpitchfork{\sumxn}=0 \); or \( +\overleftwitchonpitchfork*{\sumxn}=0 \) versus \( +\overleftwitchonpitchfork{\sumxn}=0 \). There are \( +\underleftwitchonpitchfork*{\sumxn}=0 \) and \( +\underrightwitchonpitchfork*{x+y+z} \) as well. + +\begingroup + +\bfseries \mathversion{bold} + +Now again, but all in boldface: +\begin{gather*} + A \xrightwitchonpitchfork[a]{\sumxn} B \xrightwitchonpitchfork{x+z} C + \xrightwitchonpitchfork{} D \\ + A \xrightwitchonpitchfork*[a]{\sumxn} B \xrightwitchonpitchfork*{x+z} C + \xrightwitchonpitchfork*{} D \\ + A \xleftwitchonpitchfork*[a]{\sumxn} B \xleftwitchonpitchfork*{x+z} C + \xleftwitchonpitchfork*{} D \\ + A \xleftwitchonpitchfork[a]{\sumxn} B \xleftwitchonpitchfork{x+z} C + \xleftwitchonpitchfork{} D +\end{gather*} +And \( \overrightwitchonpitchfork*{\sumxn}=0 \) versus \( +\overrightwitchonpitchfork{\sumxn}=0 \); or \( +\overleftwitchonpitchfork*{\sumxn}=0 \) versus \( +\overleftwitchonpitchfork{\sumxn}=0 \). There are \( +\underleftwitchonpitchfork*{\sumxn}=0 \) and \( +\underrightwitchonpitchfork*{x+y+z} \) as well. + +\endgroup + +The big table of the rest: +\begin{align*} + A &\xrightbroom{\sumxn} B & + \overrightbroom {\sumxn} = 0 && + \underrightbroom{\sumxn} = 0 \\ + && + \overscriptrightbroom {\sumxn} = 0 && + \underscriptrightbroom{\sumxn} = 0 \\ + A &\xleftbroom{\sumxn} B & + \overleftbroom {\sumxn} = 0 && + \underleftbroom{\sumxn} = 0 \\ + && + \overscriptleftbroom {\sumxn} = 0 && + \underscriptleftbroom{\sumxn} = 0 \\ + A &\xrightpitchfork{\sumxn} B & + \overrightpitchfork {\sumxn} = 0 && + \underrightpitchfork{\sumxn} = 0 \\ + && + \overscriptrightpitchfork {\sumxn} = 0 && + \underscriptrightpitchfork{\sumxn} = 0 \\ + A &\xleftpitchfork{\sumxn} B & + \overleftpitchfork {\sumxn} = 0 && + \underleftpitchfork{\sumxn} = 0 \\ + && + \overscriptleftpitchfork {\sumxn} = 0 && + \underscriptleftpitchfork{\sumxn} = 0 \\ +\end{align*} + +Now in bold\ldots\space No, please, seriously, just the examples for the minimal +size: in \texttt{normal} math we show \( A \xrightbroom{} B \) and \( C +\xleftpitchfork{} D \) and \( \overscriptrightbroom{} \) and \( +\overscriptleftpitchfork{} \), which we now repeat {\bfseries\boldmath in +\texttt{bold} math \( A \xrightbroom{} B \) and \( C \xleftpitchfork{} D \) and +\( \overscriptrightbroom{} \) and \( \overscriptleftpitchfork{} \).} Mmmh, the +minimal size seems way too narrow: is it the same for the standard arrows? +Let's see: +\begin{align*} + A &\xrightarrow{} B & \overrightarrow{} && \overscriptrightarrow{} \\ + A &\xleftarrow {} B & \overleftarrow {} && \overscriptleftarrow {} \\ + A &\xrightbroom{} B & \overrightbroom{} && \overscriptrightbroom{} \\ + A &\xleftbroom {} B & \overleftbroom {} && \overscriptleftbroom {} +\end{align*} +Well, almost so, but the arrow tip is much more ``discrete''\ldots + +To cope with this problem, \verb|\rightbroom| and siblings have been introduced: +for example, \( X\rightbroom Y \). + +A comparative table follows: +\begin{align*} + A &\rightbroom B & C &\hmrightpitchfork D \\ + A &\leftbroom B & C &\hmleftpitchfork D \\ + A &\longrightarrow B & C &\Longrightarrow D \\ + A &\longleftarrow B & C &\Longleftarrow D \\ + A &\xrightwitchonbroom{} B & C &\xrightwitchonpitchfork{} D \\ + A &\xleftwitchonbroom{} B & C &\xleftwitchonpitchfork{} D \\ +\end{align*} + +Finally, \( \overbat{y} + \underbat{x} + z = 0 \) versus \( \overbat*{y} + +\underbat*{x} + z = 0 \), and also note that \( {\overbat{x}}_{2} \ne +{\overbat*{x}}_{2} \). Oh, wait, we have to check {\bfseries\boldmath the bold +version \( {\overbat{x}}_{2} \ne {\overbat*{x}}_{2} \)} too! + +\bigbreak + +We've now gotten to skulls. +\[ A \xrightswishingghost{\mspace{100mu}} B \skull C \] + +Skulls are similar to pumpkins, and thus to \verb|\oplus|: +\begin{gather*} + H_{1} \skull \dots \skull H_{n} \\ + H_{1} \oplus \dots \oplus H_{n} \\ + H_{1} \pumpkin \dots \pumpkin H_{n} +\end{gather*} +As you can see, though, the dimensions differ slightly: +\( {\skull}{\oplus}{\pumpkin} \). +Subscript: \( A_{x\skull y} \). +Now the ``large'' operator version: +\begin{align*} + \bigskull _{i=1}^{n} H_{i} &= H_{1} \skull \dots \skull H_{n} \\ + \bigoplus _{i=1}^{n} H_{i} &= H_{1} \oplus \dots \oplus H_{n} \\ + \bigpumpkin_{i=1}^{n} H_{i} &= H_{1} \pumpkin \dots \pumpkin H_{n} +\end{align*} +In-line: \( \bigskull_{i=1}^{n} H_{i} = H_{1}\skull\dots\skull H_{n} \). +Example of close comparison: \( \bigoplus\bigskull\bigpumpkin X \). +{\bfseries\boldmath Now repeat in bold: \( \bigskull_{i=1}^{n} H_{i} = +H_{1}\skull\dots\skull H_{n} \).} + +Skulls look much gloomier than pumpkins: compare \( P\pumpkin U\pumpkin M = P \) +with \( S\skull K\skull U = L\odot L \). Why did~I ever outline such a grim and +dreary picture? The ``large operator'' variant, then, is truly dreadful! How +could anybody write a formula like \( \bigskull_{i}\bigskull_{j} A_{i}\otimes +B_{j} \)? How much cheerer is \( \bigpumpkin_{i}\bigpumpkin_{j} A_{i}\otimes +B_{j} \)? And look at the displayed version: +\[ + \bigskull_{i=1}^{m}\bigskull_{j=1}^{n} A_{i}\otimes B_{j} \neq + \bigpumpkin_{i=1}^{m}\bigpumpkin_{j=1}^{n} A_{i}\otimes B_{j} +\] + +Comparison between math versions: $x\skull y$ is normal math, +{\bfseries\boldmath whereas $x\skull y$ is bold.} Similarly, \( +\bigskull_{i-1}^{n} K_{i} = L \) is normal, {\bfseries\boldmath but \( +\bigskull_{i-1}^{n} K_{i} = L \) is bold.} And now the displays: normal +\[ + \bigskull_{i=1}^{m}\bigskull_{j=1}^{n} A_{i}\otimes B_{j} \neq + \bigpumpkin_{i=1}^{m}\bigpumpkin_{j=1}^{n} A_{i}\otimes B_{j} +\] +versus {\bfseries\boldmath bold +\[ + \bigskull_{i=1}^{m}\bigskull_{j=1}^{n} A_{i}\otimes B_{j} \neq + \bigpumpkin_{i=1}^{m}\bigpumpkin_{j=1}^{n} A_{i}\otimes B_{j} +\] +math.} Back to the normal font. + +\end{document} diff --git a/Master/texmf-dist/doc/latex/halloweenmath/manifest.txt b/Master/texmf-dist/doc/latex/halloweenmath/manifest.txt index 74ae5fc5634..137e4967b8c 100644 --- a/Master/texmf-dist/doc/latex/halloweenmath/manifest.txt +++ b/Master/texmf-dist/doc/latex/halloweenmath/manifest.txt @@ -21,7 +21,7 @@ precisely, it explains how the locutions "Work" and "Compiled Work", used in the LaTeX Project Public License, are to be interpreted in the case of this work. -January 6, 2017 (vers. 0.01) +April 16, 2017 (vers. 0.10) @@ -82,8 +82,8 @@ Network (CTAN) includes also the following five files: README -- guide to directory contents halloweenmath-doc.pdf -- overview of the halloweenmath package (PDF) -halloweenexample.tex -- example LaTeX source for this package -halloweenexample.pdf -- typeset version of the preceding item (PDF) +halloweenmath-man.pdf -- user's manual for this same package (PDF) +halloweenmath-man.tex -- LaTeX source of the preceding item Makefile -- Makefile to generate code or documentation These five files are included only for convenience's sake and are _not_ diff --git a/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx index 5b36bece28b..8826f1aa900 100644 --- a/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx +++ b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx @@ -32,14 +32,23 @@ % \fi % % \def\filename{halloweenmath.dtx} -% \def\fileversion{0.01} -% \def\filedate{2017/01/06} -% \def\docdate {2017/01/06} -% \def\doclongdate{January~6, 2017} +% \def\fileversion{0.10} +% \def\filedate{2017/04/16} +% \def\docdate {2017/04/16} +% \def\doclongdate{April~16, 2017} % -% ^^A \CheckSum{13} +% \CheckSum{2259} % % \changes{0.01}{2017 Jan 06}{First writing of the code} +% \changes{0.10}{2017 Apr 16}{Changed the look of the broom in the extensible +% ``arrow-like'' symbols, but retained the old one in newly added pitchforks} +% \changes{0.10}{2017 Apr 16}{Added bats (ordinary symbols and extensible +% ``arrow-like'' series)} +% \changes{0.10}{2017 Apr 16}{Added skulls (binary operators and ``large'' +% operators)} +% \changes{0.10}{2017 Apr 16}{Added ``unwitched'' extensible brooms and +% pitchforks} +% \changes{0.10}{2017 Apr 16}{Added ``Boo'' options} % %% \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 @@ -68,6 +77,7 @@ % \DoNotIndex{\expandafter,\do,\relax,\advance,\multiply,\divide} % \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions} % \DoNotIndex{\",\.,\@} +% \DoNotIndex{\-,\+} % % \IndexPrologue{ % \section{\indexname} @@ -95,8 +105,18 @@ % \makeatletter % \newcommand*{\myspecialindex}[2] % {\special@index{#1\actualchar#2\encapchar main}} -% \newcommand*{\param}[1]{\(\mbox{\##1}\leftarrow{}\)\>} +% \newcounter{paramlist} +% \renewcommand*{\theparamlist}{^^A +% \ifnum \value{paramlist}>\z@ +% \ifnum \value{paramlist}<10 +% \arabic{paramlist}^^A +% \else +% \@ctrerr +% \fi +% \fi +% } % \newenvironment*{paramlist}{^^A +% \setcounter{paramlist}\z@ % \@beginparpenalty \@M \relax % \setlength\topsep{\z@}^^A % \tabbing @@ -104,6 +124,28 @@ % }{^^A % \endtabbing % } +% \newcommand*{\param}{^^A +% \stepcounter{paramlist}^^A +% \(\mbox{\#\theparamlist}\leftarrow{}\)\>^^A +% } +% \newenvironment*{tightitemize}{^^A +% \itemize +% \setlength\topsep{\p@ \@plus\p@}^^A +% \setlength\partopsep{\z@}^^A +% \setlength\itemsep{\p@}^^A +% \setlength\parsep{\z@ \@plus\p@}^^A +% \setlength\parskip{\parsep}^^A +% \setlength\@topsepadd{\topsep}^^A +% \setlength\@topsep{\@topsepadd}^^A +% }{\enditemize} +% \newcommand{\@no@imp@StopEventually}[1]{#1\endinput} +% \newcommand*{\IfImplementation}{% +% \ifx \StopEventually \@no@imp@StopEventually +% \expandafter\@secondoftwo +% \else +% \expandafter\@firstoftwo +% \fi +% } % \makeatother % \newcommand*{\counterindex}[1]{\myspecialindex{#1}{{\string\ttfamily % \space #1} (counter)}\index{counters:\levelchar{\protect\ttfamily @@ -111,19 +153,31 @@ % \newcommand*{\optuseindex}[1]{\SortIndex{#1}{\protect\opt{#1} % (option)\encapchar usage}\index{options:\levelchar % \protect\opt{#1}\encapchar usage}} +% ^^A REMEMBER: "\DeclareTextFontCommand" can be used only in preamble! % \DeclareRobustCommand*{\packlass}[1]{{\normalfont\sffamily #1}} -% \DeclareRobustCommand*{\filedir}[1]{{\normalfont\ttfamily #1}} +% \DeclareRobustCommand*{\filedir} [1]{{\normalfont\ttfamily #1}} % \DeclareRobustCommand*{\env}[1]{{\normalfont\ttfamily #1}} -% \DeclareRobustCommand*{\ctr}[1]{{\normalfont\ttfamily #1}} +% ^^A \DeclareRobustCommand*{\ctr}[]{{\normalfont\ttfamily #1}} % \DeclareRobustCommand*{\opt}[1]{{\normalfont\ttfamily #1}} % \newcommand*{\sopt}[1]{\mbox{\opt{#1}}\optuseindex{#1}} +% \newcommand*{\binvert}{\mathbin{|}} +% \DeclareRobustCommand*{\TeXSXFullName}{^^A +% \TeX \kern .13333em --\,\LaTeX\ Stack Exchange^^A +% } +% \DeclareRobustCommand*{\TeXSXAbbrev}{\TeX.SX\@} % \DeclareRobustCommand*{\TeXSXuser}[1]{{\normalfont\sffamily #1}} +% \DeclareRobustCommand*{\TeXtok}[1]{\mbox{$\langle$#1\/$\rangle$}} % \newcommand*{\cfr}{\TeXSXuser{cfr}} +% \newcommand*{\eg}{\emph{e.g.}, } ^^A note the space at the end % % \providecommand*{\href}[3][]{#3} % \providecommand*{\pdfbookmark}[3][]{} +% \providecommand*{\nolinkurl}[1]{\url{#1}} ^^A if hyperref isn't loades, +% ^^A hand over to url package % \providecommand*{\hypersetup}{} % +% \addtolength{\marginparwidth}{2pt} +% % \newcommand*{\magicstar}[1]{^^A % \begingroup % \setlength\unitlength{#1\unitlength}^^A @@ -156,8 +210,8 @@ % pdfauthor = {G. Mezzetti}, % pdfsubject = {Documentation of the halloweenmath package}, % pdfkeywords = {Halloween, math, scary mathematical symbols}, -% pdfcreationdate = {D:20170106000000}, -% pdfmoddate = {D:20170106000000}, +% pdfcreationdate = {D:20170416000000}, +% pdfmoddate = {D:20170416000000}, % bookmarksopen, % bookmarksopenlevel = 1 % } @@ -168,9 +222,9 @@ % \begin{abstract} % This document describes a \LaTeX\ package that originates from a question % asked for enjoyment on -% \href{http://tex.stackexchange.com/}{\emph{\TeX\,-\,\LaTeX\ Stack -% Exchange}} (see~\cite{bib:cfr}) by the user -% \href{http://tex.stackexchange.com/users/39222/cfr}{\cfr}; this package +% \href{https://tex.stackexchange.com/}{\emph{\TeXSXFullName}} +% (see~\cite{bib:cfr}) by the user +% \href{https://tex.stackexchange.com/users/39222/cfr}{\cfr}; this package % defines a handful of commands for typesetting mathematical symbols of % various kinds (including ``large'' operators, extensible arrow-like % relations, and growing arrow-like math accents) that all draw from the @@ -234,7 +288,7 @@ % % \newpage % \tableofcontents -% \listoffigures +% \IfImplementation{\listoffigures}{} % % \newpage % \begingroup @@ -311,15 +365,15 @@ % \section{Introduction} % % On October~31, 2016, around 3 in the morning (GMT\@), user -% \href{http://tex.stackexchange.com/users/39222/cfr}{\cfr} asked a +% \href{https://tex.stackexchange.com/users/39222/cfr}{\cfr} asked a % question~\cite{bib:cfr} on the -% \href{http://tex.stackexchange.com/}{\emph{\TeX\,-\,\LaTeX\ Stack Exchange} -% network}, challenging other users to contribute \LaTeX\ documents that -% showcased ``the spookiest, creepiest images'' ever possible. I~was aware -% of a method---well known, nonetheless---to integrate arbitrary pictures -% into math formulas as though they were mathematical symbols, so, on the -% pretext ``that, since \hologo{(La)TeX} is a language primarily designed to -% handle text with math, the lack of a `math-flavored' +% \href{https://tex.stackexchange.com/}{\emph{\TeXSXFullName} network}, +% challenging other users to contribute \LaTeX\ documents that showcased +% ``the spookiest, creepiest images'' ever possible. I~was aware of a +% method---well known, nonetheless---to integrate arbitrary pictures into +% math formulas as though they were mathematical symbols, so, on the pretext +% ``that, since \hologo{(La)TeX} is a language primarily designed to handle +% text with math, the lack of a `math-flavored' % answer~\ldots\linebreak[0]\,was a gap that ought to be filled'', I~wrote an % answer implementing a command that drew a (not particularly spooky or % creepy) little witch astride of her broom, but with the silly distinctive @@ -333,7 +387,7 @@ % witch and a black cat, and my answer ended up winning the contest (the % presence of the cat turned out to be a decisive factor); besides, some % users were so enthusiast of the new commands that they requested that they -% were re-implemented as a new, stand-alone package. And here it is. +% were re-implemented as a new, stand-alone package. Well, here it is. % % In the writing of the package, more features, and creatures, have been % added. Also available now are: @@ -351,7 +405,7 @@ % \item % clouds, for denoting unscrutable subformulas (this one is even sensible!); % \item -% and still more. +% fluttering bats, skulls, and more. % \end{itemize} % All the above are available for the \texttt{bold} math version as well as % for the \texttt{normal} one. @@ -362,11 +416,11 @@ % page~\pageref{S:MyAddresses}. % % As for the name of this new package, \cfr\ initially -% \href{http://tex.stackexchange.com/questions/336768/seasonal-challenge-contributions-from-texing-dead-welcome#comment828307_337719}{proposed} +% \href{https://tex.stackexchange.com/questions/336768/seasonal-challenge-contributions-from-texing-dead-welcome#comment828307_337719}{proposed} % \packlass{mathwitch} (from the name of the main command); -% \href{http://tex.stackexchange.com/users/81905/guilherme-zanotelli}{\TeXSXuser{Guilherme +% \href{https://tex.stackexchange.com/users/81905/guilherme-zanotelli}{\TeXSXuser{Guilherme % Zanotelli}} then -% \href{http://tex.stackexchange.com/questions/336768/seasonal-challenge-contributions-from-texing-dead-welcome#comment828796_337719}{suggested} +% \href{https://tex.stackexchange.com/questions/336768/seasonal-challenge-contributions-from-texing-dead-welcome#comment828796_337719}{suggested} % \packlass{mathemagics} (a truly befitting pun!); but in the end I~decided % to choose \packlass{\halloweenmath} because (1)~it instantly and clearly % communicates the context in which the package arose, as well as the purpose @@ -376,7 +430,8 @@ % light, and to whom I~am offering it ``as an Epiphany present''---or rather, % as one would say in Italian, ``\emph{come regalo per la Befana}'', where % the last word bears not-so-subtle connections with the world of -% witches\ldots +% witches\ldots\footnote{Indeed, the first version of this package was +% released on January~6, 2017.} % % \subsection{Disclaimer} % @@ -410,16 +465,14 @@ % in the usual \DS\ format; if you are not a \LaTeX\ hacker, this % part will probably have little meaning to you. % -% As I~said above, this package is an Epiphany gift for \TeXSXuser{cfr}, and, -% for this reason, I~want to submit it to CTAN\@ on January~6, 2017. -% Regrettably, I~couldn't write most of the comments in the -% \emph{Implemenation} part in time for the submission, which, on the other -% hand, I~don't want to defer to a later date for any reason whatsoever. -% Some sparse comments, nonetheless, are sprinkled throughout the code at -% certain key places, and I~hope they will suffice to understand what's going -% on. I~apologize for submitting this work in an incomplete form; -% unfortunately, at present I~cannot even foresee when I'll be able to finish -% it. +% In this release too, alas, I~have to ask to be excused for not having +% completed the comments in the \emph{Implementation} part. Some~35\% of the +% code is still uncommented, and, as I~had already said in the +% \emph{Introduction} to version~0.01, at present I~cannot yet make any +% reliable guess as to when (or even if!\@) I'll be able to finish the work. +% It is precisely for this reason that I~decided to release it in this +% incomplete form, to avoid deferring indefinitely the availability of the +% new, horrifying features that this version introduces. % % % @@ -446,8 +499,8 @@ % This section explains everything you need to know in order to be able to % use the \packlass{\halloweenmath} package. However, to keep this document % independent of the package itself, the output produced by the various -% commands is not shown here: for this, you are referred to \cite{bib:manual} -% and to~\cite{bib:sample}. +% commands is not shown here: for this, you are referred to +% \cite{bib:manual}. % % \subsection{Package loading} % @@ -469,6 +522,7 @@ % math version, when in force. They can be loosely grouped as follows. % % \subsubsection{Pumpkins} +% \label{ssS:Pumpkins} % % \DescribeMacro{\pumpkin} % \DescribeMacro{\bigpumpkin} @@ -489,6 +543,7 @@ % "\greatpumpkin" is available as a perfect synonym for "\bigpumpkin". % % \subsubsection{Witches, brooms, and black cats} +% \label{ssS:Witches} % % All this arose from a witch. % @@ -507,14 +562,30 @@ % \DescribeMacro{\xleftwitchonbroom} % Witches infest the field of extensible ``arrow-like'' symbols too: the % commands "\xrightwitchonbroom" and "\xleftwitchonbroom" are syntactically -% identical to, \emph{e.g.}, "\xrightarrow", but produce an extensible broom -% with a witch sitting on it. That is to say, the syntax for -% "\xrightwitchonbroom" is as follows +% identical to, \eg "\xrightarrow", but produce an extensible broom with a +% witch sitting on it. That is to say, the syntax for "\xrightwitchonbroom" +% is as follows % \begin{flushleft} % \cmd{\xrightwitchonbroom}\oarg{under text}\marg{over text} % \end{flushleft} % and "\xleftwitchonbroom" is similar. % +% \DescribeMacro{\xrightwitchonpitchfork} +% \DescribeMacro{\xleftwitchonpitchfork} +% In version~0.01 of this package, the "\x"$\,*\,$"witchonbroom" commands +% drew under the witch a ``broom'' that, actually, looked more like a +% pitchfork (\TeXSXuser{cfr} had already complained about this in +% \href{https://tex.stackexchange.com/questions/336768/seasonal-challenge-contributions-from-texing-dead-welcome#comment829686_337719}{one +% of her comments} to my original answer on \TeXSXAbbrev); in the present +% version this has been corrected, but the output produced by the first +% version (which I~liked) can still be obtained by means of these two +% commands, whose name is, indeed, more appropriate to the look of the +% symbols they yield. Obviously, their syntax remains identical, +% \emph{e.g.}, +% \begin{flushleft} +% \cmd{\xleftwitchonpitchfork}\oarg{under text}\marg{over text} +% \end{flushleft} +% % \DescribeMacro{\overrightwitchonbroom} % \DescribeMacro{\overleftwitchonbroom} % \DescribeMacro{\underrightwitchonbroom} @@ -526,12 +597,26 @@ % "\underrightwitchonbroom"\marg{subformula} \\ % "\underleftwitchonbroom "\marg{subformula} % \end{flushleft} -% are similar to, \emph{e.g.}, "\overrightarrow", and typeset a broom, with a -% witch sitting on it, over or under the subformula specified in their +% are similar to, \eg "\overrightarrow", and typeset a broom, with a witch +% sitting on it, over or under the subformula specified in their % argument.\footnote{It should be noted that, in my answers % to~\cite{bib:cfr}, only the command that now corresponds to % \cmd{\overrightwitchonbroom} was provided, but under the different name % \cmd{\overrightbroom}.} +% \DescribeMacro{\overrightwitchonpitchfork} +% \DescribeMacro{\overleftwitchonpitchfork} +% \DescribeMacro{\underrightwitchonpitchfork} +% \DescribeMacro{\underleftwitchonpitchfork} +% Also in this case, the look of the symbols they draw has changed since +% version~0.01 of this package, but the old shapes have been kept available +% under different, and more appropriate, names: just use +% \begin{flushleft} +% "\overrightwitchonpitchfork "\marg{subformula} \\ +% "\overleftwitchonpitchfork "\marg{subformula} \\ +% "\underrightwitchonpitchfork"\marg{subformula} \\ +% "\underleftwitchonpitchfork "\marg{subformula} +% \end{flushleft} +% instead of the above. % % \paragraph*{Important note:} % All the commands described in this subsection have a \mbox{$*$-form} that @@ -540,7 +625,7 @@ % % \subsubsection{Ghosts} % -% Of course, on Hallowen, ghosts cannot be missing either. +% Of course, on Halloween, ghosts cannot be missing either. % % \DescribeMacro{\mathghost} % \DescribeMacro{\mathrightghost} @@ -559,8 +644,8 @@ % "\xrightswishingghost"\oarg{under text}\marg{over text} \\ % "\xleftswishingghost "\oarg{under text}\marg{over text} % \end{flushleft} -% are analogous to, \emph{e.g.}, "\xrightarrow", but, in place of the arrow, -% draw a ghost swishing, respectively, toward the right and toward the left. +% are analogous to, \eg "\xrightarrow", but, in place of the arrow, draw a +% ghost swishing, respectively, toward the right and toward the left. % % \DescribeMacro{\overrightswishingghost} % \DescribeMacro{\overleftswishingghost} @@ -574,6 +659,80 @@ % "\underleftswishingghost "\marg{subformula} % \end{flushleft} % +% \subsubsection{Bats} +% +% For some people, bats are even more horrifying than ghosts. The +% \packlass{\halloweenmath} package provides a collection of commands for +% drawing bat-like symbols that are closely analogous to the ghost-related +% ones. +% +% \DescribeMacro{\mathbat} +% \DescribeMacro{\mathrightbat} +% \DescribeMacro{\mathleftbat} +% You can get an ordinary symbol resembling a bat flying, respectively, +% toward you, toward the right, and toward the left with the three +% argumentless commands "\mathbat", "\mathrightbat", and "\mathleftbat". The +% height of these symbols has intentionally been made pretty small, to +% facilitate their use in superscripts. +% +% \DescribeMacro{\xrightflutteringbat} +% \DescribeMacro{\xleftflutteringbat} +% You can get extensible ``arrow-like'' relation symbols that depict a +% fluttering bat by means of the following constructs: +% \begin{flushleft} +% "\xrightflutteringbat"\oarg{under text}\marg{over text} \\ +% "\xleftflutteringbat "\oarg{under text}\marg{over text} +% \end{flushleft} +% \DescribeMacro{\overrightflutteringbat} +% \DescribeMacro{\overleftflutteringbat} +% \DescribeMacro{\underrightflutteringbat} +% \DescribeMacro{\underleftflutteringbat} +% And these are the associated ``over\mbox{-}\slash under-arrow-like'' +% commands: +% \begin{flushleft} +% "\overrightflutteringbat "\marg{subformula} \\ +% "\overleftflutteringbat "\marg{subformula} \\ +% "\underrightflutteringbat"\marg{subformula} \\ +% "\underleftflutteringbat "\marg{subformula} +% \end{flushleft} +% +% \DescribeMacro{\overbat} +% \DescribeMacro{\underbat} +% There are, finally, two more commands that have no parallel in the +% collection of ghostly symbols (because ghost are to tall!): they are +% \begin{flushleft} +% "\overbat "$*$\marg{subformula} \\ +% "\underbat"$*$\marg{subformula} +% \end{flushleft} +% where $*$ indicates an optional "*" denoting, as usual, their +% \mbox{$*$-form}. These constructs typeset \meta{subformula} respectively +% surmounted by the bat produced by "\mathbat", or with that symbol +% underneath. The normal (\emph{i.e.}, unstarred) form pretends that the bat +% has zero width (but some height), so that, say, "$x+\overbat{y}+z$" has the +% same horizontal spacing as "$x+y+z$"; if you prefer that the actual width +% of the bat be taken into account instead, then use the starred variants. +% +% \subsubsection{Skulls} +% +% \DescribeMacro{\skull} +% \DescribeMacro{\bigskull} +% For skulls, I~imagined a r\^{o}le very similar to that of +% \hyperref[ssS:Pumpkins]{pumpkins}. Indeed, anything that is shaped like a +% human head reminds me of symbols like "\oplus"~($\oplus$) and +% "\otimes"~($\otimes$), so that my fantasy immediately goes to a binary +% operator and its associated ``large'' operator. In this case, we have: +% \begin{itemize} +% \item +% "\skull", which is the binary operator (similar to "\oplus"); +% \item +% "\bigskull", which is the ``large'' operator (similar to "\bigoplus") and +% which, like all symbols of this kind, becomes significantly larger in +% displayed math. +% \end{itemize} +% As for all ``large'' operators defined by this package, the +% [\opt{no}]\opt{sumlimits} options from the \packlass{\amsmath} package +% affect the "\bigskull" command too. +% % \subsubsection{Other symbols} % % The \packlass{\halloweenmath} package implements one more symbol that could @@ -587,8 +746,22 @@ % formulas than in in-line ones. The companion command "\reversemathcloud" % yields a mirror image of the same symbol. % -% \subsection{Script-style version of standard over\protect\slash under +% \subsection{More \textquotedblleft arrow-like\textquotedblright\ symbols +% (these don\textquoteright t scare!)} +% +% If designing the first symbol, the "\mathwitch", could be relatively +% entertaining, the implementation of the other operators and ordinary +% symbols like "\pumpkin", "\mathghost", "\mathcloud", or "\bigskull" soon +% became a rather dull and repetitive task, that essentialy consisted of +% nothing more than placing lots of dots on a grid. The part related to the +% extensible ``arrow-like'' commands was a bit more amusing, since it +% involved dealing with at least a few typical \TeX nical aspects. Probably, +% it was for this reason that this field grew so much in passing from the +% first release of the package to the second. +% +% \subsubsection{Script-style version of standard over\protect\slash under % arrows} +% \label{ssS:StandardArrows} % % In order to implement our over\slash under ``arrow-like'' symbols, we had % to develop an extension of some internal macros of the \packlass{\amsmath} @@ -615,7 +788,181 @@ % "\underscriptleftrightarrow"\marg{subformula} % \end{flushleft} % -% \section{Installing the \packlass{\halloweenmath} package and generating this manual} +% \subsubsection{\textquotedblleft Unwitched\textquotedblright\ brooms +% and pitchforks} +% +% In the last years, the use of unmanned aircrafts has become increasingly +% important, and it has in parallel become more and more common to see flying +% devices of this kind even across the skies of our cities (just think of +% drones and of how they tend to be employed ubiquitously for the most +% heterogeneous kinds of jobs and services). Needless to say, it was +% inevitable that this aeronautical revolution propagated even to an +% inherently conservative world like that of sorcery, and it should come as +% no great surprise to learn that the \packlass{\halloweenmath} package now +% features ``unwitched'' versions of all the ``arrow-like'' extensible +% symbols too, both of those that depict brooms and of those which stick to +% the original pitchfork-like shape. The useful side of these is that the +% absence of the witch allows for a reduction of the vertical space they take +% up. +% +% \DescribeMacro{\xrightbroom} +% \DescribeMacro{\xleftbroom} +% To begin with, we have the extensible ``arrow-like'' relations, those +% modeled after "\xrightarrow": they are +% \begin{flushleft} +% "\xrightbroom"\oarg{under text}\marg{over text} \\ +% "\xleftbroom "\oarg{under text}\marg{over text} \\ +% \end{flushleft} +% and produce extensible brooms \emph{without} a witch sitting on them. +% \DescribeMacro{\xrightpitchfork} +% \DescribeMacro{\xleftpitchfork} +% The commands +% \begin{flushleft} +% "\xrightpitchfork"\oarg{under text}\marg{over text} \\ +% "\xleftpitchfork "\oarg{under text}\marg{over text} +% \end{flushleft} +% are almost identical, only they yield pitchforks instead of brooms---or, if +% you prefer, brooms with the shape that was used in version~0.01 of this +% package. +% +% \DescribeMacro{\rightbroom} +% \DescribeMacro{\leftbroom} +% When both the \meta{under text} and the \meta{over text} are void, the +% "\xrightbroom"\,\ldots\linebreak[0]"\xleftpitchfork" commands yield a +% symbol that is, on purpose, more or less as large as what "\xrightarrow{}" +% yields (\emph{i.e.},~$\xrightarrow{}$); but it turns out that such a short +% broom (or pitchfork) completely lacks the broomstick. For this reason, the +% two (argumentless) commands "\rightbroom" and "\leftbroom" has been +% provided too: they typeset a broom the same length of a +% "\longrightarrow"\slash "\longleftarrow" ($\longrightarrow$\slash +% $\longleftarrow$). +% \DescribeMacro{\hmrightpitchfork} +% \DescribeMacro{\hmleftpitchfork} +% It would now seem logical to infer that the two companion commands that +% typeset pitchforks should be named "\rightpitchfork" and "\leftpitchfork"; +% unfortunately, these names already denote two different (albeit vaguely +% similar) symbols supplied by the \packlass{MnSymbol} package. Because of +% this potential name clash, we have chosen instead to call them +% "\hmrightpitchfork" and "\hmleftpitchfork", respectively (the +% \texttt{hm}~prefix, of course, stands for ``Halloween math''). +% +% Before getting to the group of the ``over\mbox{-}\slash under-arrow-like'' +% extensible brooms, a preliminary statement needs to be made. For the +% ``witched'' version of all these, we had chosen to typeset them in the +% relative script style associated to the style of the affected subformula. +% For example, in a construct like +% \begin{verbatim}$W_{\overrightwitchonbroom{x_{1}+\dots+x_{n}}}$\end{verbatim} +% the subformula "x_{1}+\dots+x_{n}", argument of the +% "\overrightwitchonbroom" command, is set in script style, therefore the +% style applied to the covering broom (and witch) will be the scriptscript +% style. We already remarked in Subsection~\ref{ssS:StandardArrows} that +% this is not what the standard ``over\mbox{-}\slash under-arrow'' commands +% do: instead, they use for the arrow the same style as that in which the +% argument gets typeset. The reason for this different behavior was that, +% with the same style of the affected subformula, the witch would have looked +% too large; but when the witch isn't there, both solutions are viable, and +% we do provide both. +% +% ^^A \paragraph{Brooms\slash pitchforks in the same relative style.} +% We have, in the first place, a set of commands for placing brooms or +% pitchforks (a.k.a.\ version-0.01-styled brooms) over or under a subformula, +% setting them in the same style as the subformula itself. +% \DescribeMacro{\overrightbroom} +% \DescribeMacro{\overleftbroom} +% \DescribeMacro{\underrightbroom} +% \DescribeMacro{\underleftbroom} +% There are four ``over\mbox{-}\slash under-arrow-like'' extensible +% brooms\ldots +% \begin{flushleft} +% "\overrightbroom "\marg{subformula} \\ +% "\overleftbroom "\marg{subformula} \\ +% "\underrightbroom"\marg{subformula} \\ +% "\underleftbroom "\marg{subformula} +% \end{flushleft} +% \DescribeMacro{\overrightpitchfork} +% \DescribeMacro{\overleftpitchfork} +% \DescribeMacro{\underrightpitchfork} +% \DescribeMacro{\underleftpitchfork} +% \ldots and four corresponding ``over\mbox{-}\slash under-arrow-like'' +% extensible pitchforks: +% \begin{flushleft} +% "\overrightpitchfork "\marg{subformula} \\ +% "\overleftpitchfork "\marg{subformula} \\ +% "\underrightpitchfork"\marg{subformula} \\ +% "\underleftpitchfork "\marg{subformula} +% \end{flushleft} +% +% ^^A \paragraph{Brooms\slash pitchforks in relative script style.} +% Then, for each of the commands just listed, a corresponding variant is +% provided that sets the broom, or the pitchfork, in the relative script +% style of the style applied to \meta{subformula}, and which is named +% following the same convention we already used for the commands of +% Subsection~\ref{ssS:StandardArrows}, that is, inserting the "script" +% substring. +% \DescribeMacro{\overscriptrightbroom} +% \DescribeMacro{\overscriptleftbroom} +% \DescribeMacro{\underscriptrightbroom} +% \DescribeMacro{\underscriptleftbroom} +% Thus, again, we find four ``over\mbox{-}\slash under-arrow-like'' +% extensible brooms\ldots +% \begin{flushleft} +% "\overscriptrightbroom "\marg{subformula} \\ +% "\overscriptleftbroom "\marg{subformula} \\ +% "\underscriptrightbroom"\marg{subformula} \\ +% "\underscriptleftbroom "\marg{subformula} +% \end{flushleft} +% \DescribeMacro{\overscriptrightpitchfork} +% \DescribeMacro{\overscriptleftpitchfork} +% \DescribeMacro{\underscriptrightpitchfork} +% \DescribeMacro{\underscriptleftpitchfork} +% \ldots and four matching ``over\mbox{-}\slash under-arrow-like'' extensible +% pitchforks: +% \begin{flushleft} +% "\overscriptrightpitchfork "\marg{subformula} \\ +% "\overscriptleftpitchfork "\marg{subformula} \\ +% "\underscriptrightpitchfork"\marg{subformula} \\ +% "\underscriptleftpitchfork "\marg{subformula} +% \end{flushleft} +% +% \paragraph*{Please note:} +% Since all of the commands listed in this subsection omit the witch, none +% of them has got a \mbox{$*$-form} for adding a cat (the cat can only go +% with the witch: no witch, no cat). +% +% \subsubsection{Summary of the naming scheme} +% +% It is worth noting that the commands for the extensible brooms\slash +% pitchforks follow a consistent naming scheme: the name is of the form +% \begin{center} +% \texttt{\bslash}\meta{x-over-under}\meta{opt-script}^^A +% \meta{left-right}\meta{opt-witch}\meta{broom-pitchf} +% \end{center} +% where +% \begin{flalign*} +% \meta{x-over-under} &\longrightarrow +% \texttt{x}\binvert\texttt{over}\binvert\texttt{under} & +% \meta{opt-script} &\longrightarrow +% \meta{empty}\binvert\texttt{script} \\ +% \meta{left-right} &\longrightarrow +% \texttt{left}\binvert\texttt{right} & +% \meta{opt-witch} &\longrightarrow +% \meta{empty}\binvert\texttt{witchon} \\ +% \meta{broom-pitchf} &\longrightarrow +% \texttt{broom}\binvert\texttt{pitchfork} +% \end{flalign*} +% with the constraint that \meta{opt-script} must be \meta{empty} if either \( \meta{x-over-under} = +% \texttt{x} \) or \( \meta{opt-witch} \neq \meta{empty} \). +% +% \section +% [Installing the pacakge code and documentation] +% {Installing the package code and documentation\footnote{^^A +% Recall that you need to read this section only in the unusual case that you +% have to carry out a manual installation from the sources; normally, you'll +% be using a prepackaged \TeX\ distribution like +% \href{https://www.tug.org/texlive/}{\TeX~Live} or +% \href{https://miktex.org/}{MiK\TeX}, which can automatically manage +% installation as well as updates.^^A +% }} % % As usual for \LaTeX\ distributions, the \packlass{\halloweenmath} % package is distributed in the form of a \filedir{.dtx} file, @@ -636,37 +983,53 @@ % terminal at the end of the run of the file \filedir{\halloweenmath.ins}. % The documentation of your \TeX\ installation should tell you how to find % the \LaTeX\ input directory/ies, and probably also how to create new -% \LaTeX\ input directories reserved to contain your private classes and -% packages. -% -% The \emph{proposed} TDS-compliant directory where the above file should be -% put is +% \LaTeX\ input directories reserved to contain your personal packages. +% The accepted TDS-compliant directory where the above file should be put is % \begin{quote} -% \texttt{\$TEXMF/tex/latex/halloweenmath/} +% \filedir{\$TEXMF/tex/latex/halloweenmath/} % \end{quote} % -% Please note that before using the \packlass{\halloweenmath} package -% you must read its license (see Subsection~\ref{sS:License}) to -% see whether its terms are acceptable for you, especially for what -% concerns the lack of any warranty; if they are not, don't use -% this program. +% Please note: before using the \packlass{\halloweenmath} package you +% must read its license (see Subsection~\ref{sS:License}) to see whether its +% terms are acceptable for you, especially for what concerns the lack of any +% warranty; if they are not, don't use it. % % \subsection{Documentation} % -% To produce this documentation, run \LaTeX\ three times (for the -% table of contents to be correct) on the file -% \filedir{\halloweenmath.dtx}. This won't produce the index and the -% change history, however: for those, you have to run +% To produce this documentation, run \LaTeX\ three times (for the ToC to get +% right) on the file \filedir{\halloweenmath.dtx}. This won't give you the +% index and the change history, though: for those, you should run % \emph{MakeIndex} on the files \filedir{\halloweenmath.idx} and -% \filedir{\halloweenmath.glo}, produced during the last of the -% aforesaid three \LaTeX\ runs, with the styles \filedir{gind.ist} -% and \filedir{gglo.ist}, respectively (these styles are part of -% the standard \LaTeX\ distribution); then pass -% \filedir{\halloweenmath.dtx} through \LaTeX\ twice more. +% \filedir{\halloweenmath.glo}, obtained during the last of the aforesaid +% three \LaTeX\ runs, with styles \filedir{gind.ist} and \filedir{gglo.ist}, +% respectively (which are part of the standard \LaTeX\ distribution); then +% pass \filedir{\halloweenmath.dtx} through \LaTeX\ twice more. +% +% The documentation produced by default includes the \emph{Implementation} +% part too; see the beginning of this part for instructions on how to omit +% it. % -% The documentation produced by default includes the -% \emph{Implementation} part too; see the beginning of this part -% for instructions on how to omit it. +% \subsection{The makefile} +% \label{sS:Makefile} +% +% A (quite trivial!\@) makefile, named \filedir{Makefile}, that ``knows'' how +% to carry out the installation, is offered along with the package. Although +% it is not a required part of the distribution (as per LPPL\@), you may find +% that some distributors supply it all the same (I~hope the CTAN\@ sites will +% do so). With this makefile in the same directory as the two source files +% \filedir{\filename} and \filedir{\halloweenmath.ins}, the simple shell +% command, given inside that same directory, +% \begin{quote} +% \ttfamily +% make +% \end{quote} +% will \emph{both} extract the code file \emph{and} typeset the full +% documentation (in~PDF\@). Type +% \begin{quote} +% \ttfamily +% make help +% \end{quote} +% for more information. % % \subsection{License} % \label{sS:License} @@ -742,15 +1105,25 @@ % \bibitem{bib:cfr} % \emph{Seasonal Challenge (Contributions from \TeX ing Dead % Welcome)},\\ -% \url{http://tex.stackexchange.com/q/336768/69818} +% \url{https://tex.stackexchange.com/q/336768/69818} % % \bibitem{bib:manual} -% \emph{A short manual for the \packlass{\halloweenmath} package}, -% in preparatiom. -% -% \bibitem{bib:sample} -% \emph{A sample article that uses the \packlass{\halloweenmath} package}, -% in preparation. +% \emph{User's manual for the \packlass{\halloweenmath} package}, included +% in the documentation of the \packlass{\halloweenmath} package,\\ +% \href{file:halloweenmath-man.pdf} +% {\nolinkurl{$TEXMF/doc/latex/halloweenmath/halloweenmath-man.pdf}} +% +% \IfImplementation{ +% \bibitem{bib:diffs-m} +% File \filedir{diffs-m.txt}, which is part of the standard +% \hologo{AmSLaTeX} distribution,\\ +% \nolinkurl{$TEXMF/doc/latex/amsmath/diffs-m.txt} +% +% \bibitem{bib:std} +% \emph{Why does the \packlass{\amsmath} package define +% \textnormal{\cs{std@minus}} and \textnormal{\cs{std@equal}}?},\\ +% \url{https://tex.stackexchange.com/q/352043} +% }{} % % \end{thebibliography} % } @@ -780,7 +1153,7 @@ % and the packages we require. % \begin{macrocode} \documentclass{ltxdoc} -\usepackage{color,pict2e,hologo} +\usepackage{amsmath,color,pict2e,hologo} \usepackage{hypdoc} % \end{macrocode} % We now set a few typesetting options. @@ -847,20 +1220,80 @@ % The usual identification: % \begin{macrocode} \ProvidesPackage{halloweenmath} - [2017/01/06 v0.01 (development)] + [2017/04/16 v0.10 (development)] % \end{macrocode} % % \subsection{Initial code} % -% This segment is empty in the \packlass{\halloweenmath} package. +% \begin{macro}{\@HwM@say@BOO} +% Of course, to make this anything even vaguely resembling an ``Easter egg'', +% I~should at least pretend to try to obfuscate the code; but too much time +% has already been wasted on this huge and ridicolous heap of foolishness. +% \begin{macrocode} +\newcommand*\@HwM@say@BOO{% + \begingroup + \escapechar \m@ne + \def~{\string\\}% + \def\-{\space\space}% + \def\+{\space\space\space\space}% + \def\={\+\+\+\+}% + \def\*{****}% + \typeout{}% + \typeout{\+ _-==-_ \+ /~/~/~}% + \typeout{\+|\-\-\-|\+< BOO! >\+\+\+\today...}% + \typeout{\+|(.)(.)|\+/~/~/~/}% + \typeout{\++--/~--+\- /\=\*\*\*\*\*\*\*}% + \typeout{\+ [::::] __/ \= ... This is HALLOWEENMATH!}% + \typeout{\+\-----\-\+\=\*\*\*\*\*\*\*}% + \typeout{}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@opt@say@BOO} +% Well, at least do not add comments to what is already crystal clear by +% itself\ldots +% \begin{macrocode} +\newcommand*\@HwM@opt@say@BOO{} +% \end{macrocode} +% \end{macro} % % \subsection{Declaration of options} % -% This segment is empty in the \packlass{\halloweenmath} package. +% Hidden options. Note that they are later processed in the order in which +% they are declared here. +% \begin{macrocode} +\DeclareOption{silent}{% + \let \@HwM@opt@say@BOO \@empty +} +\DeclareOption{boo}{% + \let \@HwM@opt@say@BOO \@HwM@say@BOO +} +\DeclareOption{boo-10-31}{% + \ifnum\month=10 + \ifnum\day=31 + \let \@HwM@opt@say@BOO \@HwM@say@BOO + \else + \let \@HwM@opt@say@BOO \@empty + \fi + \else + \let \@HwM@opt@say@BOO \@empty + \fi +} +% \end{macrocode} % % \subsection{Option processing} % -% This segment is empty in the \packlass{\halloweenmath} package. +% Note that, at the end, at least we release the memory taken up by this +% piece of buffoonery. +% \begin{macrocode} +\ExecuteOptions{boo-10-31} +\ProcessOptions\relax +\@HwM@opt@say@BOO +\let \@HwM@say@BOO = \@undefined +\let \@HwM@opt@say@BOO = \@undefined +% \end{macrocode} % % \subsection{Package loading} % @@ -938,17 +1371,17 @@ % Customized \env{picture} environment for our ``math pictures'', makes some % initializations that are always needed (local to its group). Arguments: % \begin{paramlist} -% \param{1} +% \param % bounding box height, in coordinate units;\\ -% \param{2} +% \param % $y$-coordinate of lower left corner of bounding box;\\ -% \param{3} +% \param % additional code to be executed during initialization;\\ -% \param{4} -% font selector (\emph{e.g.}, "\textfont");\\ -% \param{5} +% \param +% font selector (\eg "\textfont");\\ +% \param % bounding box width, in coordinate units;\\ -% \param{6} +% \param % $x$-coordinate of lower left corner of bounding box. % \end{paramlist} % \begin{macrocode} @@ -975,13 +1408,29 @@ % \end{macro} % % \begin{macro}{\@HwM@oplus@strut} +% \changes{0.10}{2017 Apr 16}{Corrected bug: the size of the strut used to +% be that of \cs{bigoplus}} % Vertical phantom the size of "\oplus". Arguments: % \begin{paramlist} -% \param{1} -% style selector (\emph{e.g.}, "\displaystyle"). +% \param +% style selector (\eg "\scriptstyle"). % \end{paramlist} % \begin{macrocode} \newcommand*\@HwM@oplus@strut[1]{% + \@HwM@short@circuited@vphant #1\oplus +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@bigoplus@strut} +% \changes{0.10}{2017 Apr 16}{Added this macro} +% Vertical phantom the size of "\bigoplus". Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\displaystyle"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@bigoplus@strut[1]{% \@HwM@short@circuited@vphant #1\bigoplus@ } % \end{macrocode} @@ -1035,6 +1484,28 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\@HwM@bigop@picture} +% \begin{macro}{\end@HwM@bigop@picture} +% This is actually a definition of an environment. The environment beign +% defined, namely \env{@HwM@bigop@picture}, is simply syntactic sugar for a +% typical invocation of the \env{@HwM@math@picture} environment, for a +% picture having the vertical size of a "\bigoplus", with baseline running at +% \( y=-1 \). Supplies arguments \#1--\#3 of \env{@HwM@math@picture}; the +% caller must supply the others, \emph{including} argument~\#4, immediately +% after the single argument to this environment, which is +% \begin{paramlist} +% \param +% style selector (\eg "\displaystyle"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@bigop@picture[1]{% + \@HwM@math@picture{0}{-1}{\@HwM@bigoplus@strut #1}% +} +\let\end@HwM@bigop@picture = \end@HwM@math@picture +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\@HwM@oplus@picture} % \begin{macro}{\end@HwM@oplus@picture} % This is actually a definition of an environment. The environment beign @@ -1042,7 +1513,12 @@ % typical invocation of the \env{@HwM@math@picture} environment, for a % picture having the vertical size of an "\oplus", with baseline running at % \( y=-1 \). Supplies arguments \#1--\#3 of \env{@HwM@math@picture}; the -% caller must supply the others, \emph{including} argument~\#4. +% caller must supply the others, \emph{including} argument~\#4, immediately +% after the single argument to this environment, which is +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle"). +% \end{paramlist} % \begin{macrocode} \newcommand*\@HwM@oplus@picture[1]{% \@HwM@math@picture{0}{-1}{\@HwM@oplus@strut #1}% @@ -1052,6 +1528,44 @@ % \end{macro} % \end{macro} % +% \paragraph*{Comment added in version~0.10:} +% After all, I~think I'd better recap what the full argument lists for the +% ``specialized'' math picture environments are. +% +% \medskip +% Full argument list for \env{@HwM@large@picture}: +% \begin{paramlist} +% \param +% bounding box width, in coordinate units;\\ +% \param +% $x$-coordinate of lower left corner of bounding box. +% \end{paramlist} +% +% \medskip +% Full argument list for \env{@HwM@small@picture}: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont");\\ +% \param +% bounding box width, in coordinate units;\\ +% \param +% $x$-coordinate of lower left corner of bounding box. +% \end{paramlist} +% +% \medskip +% Full argument list for both \env{@HwM@bigop@picture} and +% \env{@HwM@oplus@picture}: +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont");\\ +% \param +% bounding box width, in coordinate units;\\ +% \param +% $x$-coordinate of lower left corner of bounding box. +% \end{paramlist} +% % \begin{macro}{\if@HwM@cat@} % Switch that tells whether a witch that is about to be drawn should be % accompanied by her cat or not. @@ -1060,17 +1574,33 @@ % \end{macrocode} % \end{macro} % -% The following two macros should probably be unified (but is this -% feasible?\@), since the first one isn't used elsewhere in the code. +% \begin{macro}{\@HwM@bold@version@name} +% In version~0.01 of this package, the definition of the "\@HwM@if@bold@math" +% macro (see below) used to be +% \begin{verbatim}\newcommand*\@HwM@if@bold@math{% +% \def\@tempa{bold}% +% \ifx\math@version\@tempa +% \expandafter\@firstoftwo +% \else +% \expandafter\@secondoftwo +% \fi +%}\end{verbatim} +% We have now decided to set the comparison string (\texttt{bold}) here, once +% and for all: this allows the following macro to be purely expandable, a +% feature we'll now need. +% \begin{macrocode} +\newcommand*\@HwM@bold@version@name{bold} +% \end{macrocode} +% \end{macro} % % \begin{macro}{\@HwM@if@bold@math} +% \changes{0.10}{2017 Apr 16}{Made purely expandable} % \LaTeX-style conditional: if the math version is currently \texttt{bold}, % executes the code in the first argument, otherwise the code in the second -% argument. +% argument. Now made purely expandable (see above). % \begin{macrocode} \newcommand*\@HwM@if@bold@math{% - \def\@tempa{bold}% - \ifx\math@version\@tempa + \ifx\math@version\@HwM@bold@version@name \expandafter\@firstoftwo \else \expandafter\@secondoftwo @@ -1080,12 +1610,47 @@ % \end{macro} % % \begin{macro}{\@HwM@choose@thicknesses} -% Shuffles arguments according to the current math version. +% Shuffles arguments according to the current math version. Now purely +% expandable. % \begin{macrocode} \newcommand*\@HwM@choose@thicknesses[3]{% \@HwM@if@bold@math{#1#3}{#1#2} } % \end{macrocode} +% The typical use of this macro is as follows: suppose you have a macro +% \cmd{\CS} with, say, five arguments, and suppose you want to invoke it +% passing different values for some of the arguments, depending on the +% current math version; more precisely, let's say that you want the following +% call to be made +% \begin{flushleft} +% \small +% "\CS{"\meta{fixed-value1}"}{"\meta{fixed-value2}"}{"^^A +% \meta{bold-value3}"}{"\meta{bold-value4}"}{"^^A +% \meta{bold-value5}"}" +% \end{flushleft} +% if the current math version is \texttt{bold}, but that you want, instead, +% to call +% \begin{flushleft} +% \small +% "\CS{"\meta{fixed-value1}"}{"\meta{fixed-value2}"}{"^^A +% \meta{nrml-value3}"}{"\meta{nrml-value4}"}{"^^A +% \meta{nrml-value5}"}" +% \end{flushleft} +% if it is not; then you would say +% \begin{flushleft} +% \small +% "\@HwM@choose@thicknesses{\CS{"\meta{fixed-value1}"}{"^^A +% \meta{fixed-value2}"}}"\\ +% " {{"\meta{normal-value3}"}{"\meta{normal-value4}"}{"^^A +% \meta{normal-value5}"}}"\\ +% " {{"\meta{bold-value3}"}{"\meta{bold-value4}"}{"^^A +% \meta{bold-value5}"}}" +% \end{flushleft} +% Note the inner pairs of braces; as usual, they can be omitted if they +% surround a single token, \emph{e.g.}, +% \begin{verbatim}\@HwM@choose@thicknesses{\CS{FFF1}\textfont} +% {\thr@@{4.0}{5.0}} +% {{BBB3}{BBB4}\@empty}\end{verbatim} % \end{macro} % % \begin{macro}{\@HwM@magic@star} @@ -1105,10 +1670,10 @@ % % \paragraph*{General remark:} % In all of the following drawings, the thickness of most of the lines -% depends on the current math style. On the other hand, some pictures are +% depends on the current math version. On the other hand, some pictures are % made up of smaller reusable pieces that are shared among more than one % drawing. As a matter of mental order, I~prefer to confine the lookup for -% the current style to a single place for each picture, and pass the +% the current version to a single place for each picture, and pass the % appropriate thicknesses down to the macros that draw the single pieces as % parameters. Nonetheless, the interface toward the rest of the code % requires macros that can draw a picture without requiring the caller to @@ -1253,17 +1818,17 @@ % "\displaystyle"). This is the ``private'' variant, with the following % parameters: % \begin{paramlist} -% \param{1} +% \param % "l"~for a right-facing witch, "r"~for a left-facing one;\\ -% \param{2} +% \param % "r"~for a right-facing witch, "l"~for a left-facing one;\\ -% \param{3} -% main drawing thickness, in units of the default-rule-thickness +% \param +% main drawing thickn., in units of the default-rule-thickness % "\fontdimen";\\ -% \param{4} +% \param % thickness of the broomstick and of the cat's tail, in the same units;\\ -% \param{5} -% thickness of hair (beard, whiskers), in the same units. +% \param +% thickness of hair (beard, whiskers), in points~(\texttt{pt}). % \end{paramlist} % \begin{macrocode} \newcommand*\@HwM@large@witch[5]{% @@ -1293,8 +1858,8 @@ (0,-.6)(\+1.4,-.6)(\+1.8,-.4)(\+2,0)(0,0)% (0,1.4)% \polygon*(\-3,2)(\-2.8,3)(\-2,4)(\-1.5,4.1)(\-1,4)(0,3.5)% - (\+1,3.8)(\+2.5,3.5)(\+3,3.3)(\+2,3.4)(0,3)(\-1,2)(\-2,1.6)% - (\-2.7,2)(\-2,2)(\-1,3)(\-2,3.5)(\-2.6,3)% + (\+1,3.8)(\+2.5,3.5)(\+3,3.3)(\+2,3.4)(0,3)(\-1,2)% + (\-2,1.6)(\-2.7,2)(\-2,2)(\-1,3)(\-2,3.5)(\-2.6,3)% \buttcap % \end{macrocode} % The witch's eye: @@ -1327,9 +1892,9 @@ % \begin{macro}{\@HwM@Large@Witch} % The ``public'' variant of the above, with the following parameters: % \begin{paramlist} -% \param{1} +% \param % "l"~for a right-facing witch, "r"~for a left-facing one;\\ -% \param{2} +% \param % "r"~for a right-facing witch, "l"~for a left-facing one. % \end{paramlist} % \begin{macrocode} @@ -1349,9 +1914,9 @@ % parts that are common to all such constructions. This is the ``private'' % variant, with the following parameters: % \begin{paramlist} -% \param{1} -% font selector (\emph{e.g.}, "\textfont");\\ -% \param{2} +% \param +% font selector (\eg "\textfont");\\ +% \param % line thickness for the witch's face, in relative units. % \end{paramlist} % \begin{macrocode} @@ -1383,8 +1948,8 @@ % \begin{macro}{\@HwM@Common@Small@Body} % The ``public'' variant of the above; parameters: % \begin{paramlist} -% \param{1} -% font selector (\emph{e.g.}, "\textfont"). +% \param +% font selector (\eg "\textfont"). % \end{paramlist} % \begin{macrocode} \newcommand*\@HwM@Common@Small@Body[1]{% @@ -1394,12 +1959,12 @@ % \end{macro} % % \begin{macro}{\@HwM@common@small@cat} -% Draw the part of the cat that is shared also by the extensible brooms; +% Draws the part of the cat that is shared also by the extensible brooms; % ``private'' variant, parameters are as follows: % \begin{paramlist} -% \param{1} -% font selector (\emph{e.g.}, "\textfont");\\ -% \param{2} +% \param +% font selector (\eg "\textfont");\\ +% \param % line thickness for the cat's tail, in relative units. % \end{paramlist} % \begin{macrocode} @@ -1410,7 +1975,8 @@ \put(\+1.8,.5){\circle*{.6}}% \put(\+2.1,.7){\circle*{.5}}% \put(\+2.25,1){\circle*{.4}}% - \polygon*(\+2.05,1)(\+2.05,1.25)(\+2.25,1.1)(\+2.45,1.25)(\+2.45,1)% + \polygon*(\+2.05,1)(\+2.05,1.25)(\+2.25,1.1)(\+2.45,1.25) + (\+2.45,1)% \cbezier(\+1.8,.4)(\+1.2,.1)(\+2,-.1)(\+1.4,-.4)% \fi } @@ -1420,8 +1986,8 @@ % \begin{macro}{\@HwM@Common@Small@Cat} % The ``public'' variant of the above; parameters: % \begin{paramlist} -% \param{1} -% font selector (\emph{e.g.}, "\textfont"). +% \param +% font selector (\eg "\textfont"). % \end{paramlist} % \begin{macrocode} \newcommand*\@HwM@Common@Small@Cat[1]{% @@ -1435,10 +2001,10 @@ % (for styles other than "\displaystyle"). This one exists only in the % ``public'' variant, with the following arguments: % \begin{paramlist} -% \param{1} -% style selector (\emph{e.g.}, "\displaystyle");\\ -% \param{2} -% font selector (\emph{e.g.}, "\textfont"). +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont"). % \end{paramlist} % The first parameter is imposed by the interface toward other parts of the % code, because other macros that share the same interface might need it, but @@ -1461,40 +2027,189 @@ % \end{macrocode} % \end{macro} % -% \textbf{Uncommented code} starts here. +% \begin{macro}{\@HwM@Small@Witch@Wo@Broom} +% Draws the small witch w/o the broom. This one exists only in the +% ``public'' variant, with the following argument: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} % \begin{macrocode} -% -% Drawing the small witch w/o the broom: \newcommand*\@HwM@Small@Witch@Wo@Broom[1]{% \begin{@HwM@math@picture}{4}{-2}{}#1{0}{\+1}% \@HwM@Common@Small@Body #1% \polygon*(\-.1,.4)(\+1,-.9)(\+1,-1.2)(\+.8,-1.2)(\-.1,0)% \end{@HwM@math@picture}% } +% \end{macrocode} +% \end{macro} % -% Drawing the cat on a horizontal broomstick: +% \begin{macro}{\@HwM@Small@Cat@On@Hori@Broom} +% Draws a small cat on a horizontal broomstick. This one exists only in the +% ``public'' variant, with the following argument: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@Small@Cat@On@Hori@Broom[1]{% \begin{@HwM@math@picture}{0}{-.6}{}#1{0}{\+2.5}% \@HwM@Common@Small@Cat #1% \Line(\+2.2,.8)(\+2.4,.4)% \end{@HwM@math@picture}% } +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Drawing the pumpkins} +% +% Here we group the macros that take care of drawing the pumpkins. +% Figure~\ref{fig:pumpkins} shows a sketch of the relevant drawings. +% +% \begin{figure}[tp] +% \newcommand*{\PumpkinSmallMouth}[7]{^^A +% \polygon*^^A +% (-#1)(-#2)(-#3)(0,#4)(#3)(#2)(#1)^^A +% (#5)(#6)(0,#7)(-#6)(-#5)^^A +% } +% \newcommand*{\PumpkinLargeMouth}[9]{^^A +% \polygon*^^A +% (-#1)(-#2)(-#3)(-#4)(0,#5)(#4)(#3)(#2)(#1)^^A +% (#6)(#7)(#8)(0,#9)(-#8)(-#7)(-#6)^^A +% } +% +% \centering +% +% The binary operator variant:\\*[\medskipamount] +% \begin{picture}(3.2,4)(-1.6,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-2,-2)(1,0){5}{\line(0,1){4}} +% \multiput(-2,-2)(0,1){5}{\line(1,0){4}} +% \color{black} +% \roundcap +% \linethickness{1.3pt} +% \Line(-.1,1)(-.15,1.4)(.15,1.4)(.1,1) +% \Line(-.1,-1)(.1,-1) +% \newcommand*{\PumpkinProfile}[1]{% +% \cbezier(#1.1,1)(#11.2,1.7)(#11.6,.8)(#11.6,0)% +% \cbezier(#1.1,-1)(#11,-1.5)(#11.6,-.8)(#11.6,0)% +% \put(#1.6,.5){\circle*{.4}}% +% } +% \PumpkinProfile- +% \PumpkinProfile+ +% \PumpkinSmallMouth{1,-.1}{.7,-.5}{.4,-.4} +% {-.7} +% {.6,-.3}{.3,-.2} +% {-.4} +% \end{picture} +% +% \bigskip\bigskip +% +% The small variant:\\*[\medskipamount] +% \begin{picture}(4.5,4)(-2.25,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \roundcap +% \linethickness{2pt} +% \Line(-.1,1.5)(-.15,2)(.15,2)(.1,1.5) +% \Line(-.1,-1.8)(.1,-1.8) +% \newcommand*{\PumpkinProfile}[1]{% +% \cbezier(#1.1,1.5)(#11.75,2.5)(#12.25,1)(#12.25,0)% +% \cbezier(#1.1,-1.8)(#11.6,-2.4)(#12.25,-1)(#12.25,0)% +% \put(#1.75,.75){\circle*{.5}}% +% } +% \PumpkinProfile- +% \PumpkinProfile+ +% \polygon*(0,.2)(-.2,-.2)(.2,-.2) +% \PumpkinSmallMouth{1.3,-.3}{.8,-.8}{.5,-.7} +% {-1} +% {.7,-.6}{.4,-.5} +% {-.7} +% \end{picture} +% +% \bigskip\bigskip +% +% The large variant:\\*[\medskipamount] +% \begin{picture}(9,8)(-4.5,-4) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-5,-4)(1,0){11}{\line(0,1) {8}} +% \multiput(-5,-4)(0,1) {9}{\line(1,0){10}} +% \color{black} +% \roundcap +% \linethickness{3pt} +% \Line(-.15,2.25)(-.3,3)(.3,3)(.15,2.25) +% \Line(-.15,-2.7)(.15,-2.7) +% \newcommand*{\PumpkinProfile}[1]{% +% \cbezier(#1.15,2.25)(#12.63,3.75)(#13.38,1.5)(#13.38,0)% +% \cbezier(#1.15,-2.7)(#12.4,-3.6)(#13.38,-1.5)(#13.38,0)% +% \put(#11.13,1.13){\circle*{.8}}% +% } +% \PumpkinProfile- +% \PumpkinProfile+ +% \polygon*(0,.35)(-.35,-.35)(.35,-.35) +% \PumpkinLargeMouth{2,-.5}{1.3,-1.4}{.8,-1.3}{.5,-1.6} +% {-1.5} +% {1.2,-1.1}{.7,-1}{.45,-1.1} +% {-1} +% \end{picture} % -% Pumpkins. +% \caption{Sketches of the pumpkins} +% \label{fig:pumpkins} +% \end{figure} +% +% As you can see in figure~\ref{fig:pumpkins}, pumpkins come in three +% variants: a binary operator and the two versions (both for display and +% nondisplay math) of a ``large'' operator. Below, the macros for each +% version are preceded by one or two useful ``subroutines'', that draw some +% patterns that appear more than once in the picture. +% +% \begin{macro}{\@HwM@large@pumpkin@profile} +% Subroutine that draws the outline of the pumpkin and one eye, for a +% ``large'' operator in display style. Argument~\#1 is either \texttt{-} +% or~\texttt{+}, depending on which half of the pumpkin you want to draw. +% \begin{macrocode} \newcommand*\@HwM@large@pumpkin@profile[1]{% \cbezier(#1.15,2.25)(#12.63,3.75)(#13.38,1.5)(#13.38,0)% \cbezier(#1.15,-2.7)(#12.4,-3.6)(#13.38,-1.5)(#13.38,0)% \put(#11.13,1.13){\circle*{.8}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@large@pumpkin@mouth} +% This subroutine draws the variant of the mouth that is used by the display +% version of the ``large'' operator. The parameters are suitable point +% coordinates. +% \begin{macrocode} \newcommand*\@HwM@large@pumpkin@mouth[9]{% \polygon*% - % lower lip: +% \end{macrocode} +% Lower lip: +% \begin{macrocode} (-#1)(-#2)(-#3)(-#4)(0,#5)(#4)(#3)(#2)(#1)% - % upper lip: +% \end{macrocode} +% Upper lip: +% \begin{macrocode} (#6)(#7)(#8)(0,#9)(-#8)(-#7)(-#6)% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@large@pumpkin} +% Private version of the macro that draws the pumpkin correspondng to a +% ``large'' operator used in display math mode. Argument: +% \begin{paramlist} +% \param +% drawing thickness, in units of the default-rule-thickness "\fontdimen". +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@large@pumpkin[1]{% - \begin{@HwM@oplus@picture}\displaystyle \textfont {7.5}{-3.75}% + \begin{@HwM@bigop@picture}\displaystyle \textfont {7.5}{-3.75}% \roundcap \linethickness{#1\@HwM@thickness@units@for \textfont}% \Line(-.15,2.25)(-.3,3)(.3,3)(.15,2.25)% @@ -1506,27 +2221,69 @@ {-1.5}% {1.2,-1.1}{.7,-1}{.45,-1.1}% {-1}% - \end{@HwM@oplus@picture}% + \end{@HwM@bigop@picture}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Large@Pumpkin} +% Public version of the above; requires no parameters. +% \begin{macrocode} \newcommand*\@HwM@Large@Pumpkin{% \@HwM@choose@thicknesses \@HwM@large@pumpkin {{1.8}}% {{2.2}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@pumpkin@profile} +% Subroutine that draws the outline of the pumpkin and one eye, for a +% ``large'' operator \emph{not} in display style. Argument~\#1 is either +% \texttt{-} or~\texttt{+}, depending on which half of the pumpkin you want +% to draw. +% \begin{macrocode} \newcommand*\@HwM@small@pumpkin@profile[1]{% \cbezier(#1.1,1.5)(#11.75,2.5)(#12.25,1)(#12.25,0)% \cbezier(#1.1,-1.8)(#11.6,-2.4)(#12.25,-1)(#12.25,0)% \put(#1.75,.75){\circle*{.5}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@pumpkin@mouth} +% This subroutine draws the variant of the mouth that is shared between the +% binary operator and the nondisplay version of the ``large'' operator. The +% parameters are suitable point coordinates. +% \begin{macrocode} \newcommand*\@HwM@small@pumpkin@mouth[7]{% \polygon*% - % lower lip: +% \end{macrocode} +% Lower lip: +% \begin{macrocode} (-#1)(-#2)(-#3)(0,#4)(#3)(#2)(#1)% - % upper lip: +% \end{macrocode} +% Upper lip: +% \begin{macrocode} (#5)(#6)(0,#7)(-#6)(-#5)% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@pumpkin} +% Private version of the macro that draws the pumpkin correspondng to a +% ``large'' operator used in nondisplay math mode. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont");\\ +% \param +% drawing thickness, in units of the default-rule-thickness "\fontdimen". +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@small@pumpkin[3]{% - \begin{@HwM@oplus@picture}#1#2{5}{-2.5}% + \begin{@HwM@bigop@picture}#1#2{5}{-2.5}% \roundcap \linethickness{#3\@HwM@thickness@units@for #2}% \Line(-.1,1.5)(-.15,2)(.15,2)(.1,1.5)% @@ -1538,39 +2295,781 @@ {-1}% {.7,-.6}{.4,-.5}% {-.7}% - \end{@HwM@oplus@picture}% + \end{@HwM@bigop@picture}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Small@Pumpkin} +% Public version of the above, with the following arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont"). +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@Small@Pumpkin[2]{% \@HwM@choose@thicknesses{\@HwM@small@pumpkin #1#2}% {{}}% {{1.5}}% } -\newcommand*\@HwM@oplus@pumpkin@profile[1]{% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@binop@pumpkin@profile} +% Subroutine that draws the outline of the pumpkin and one eye, for a binary +% operator (in whatever style). Argument~\#1 is either \texttt{-} +% or~\texttt{+}, depending on which half of the pumpkin you want to draw. +% \begin{macrocode} +\newcommand*\@HwM@binop@pumpkin@profile[1]{% \cbezier(#1.1,1)(#11.2,1.7)(#11.6,.8)(#11.6,0)% \cbezier(#1.1,-1)(#11,-1.5)(#11.6,-.8)(#11.6,0)% \put(#1.6,.5){\circle*{.4}}% } -\newcommand*\@HwM@oplus@pumpkin[3]{% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@binop@pumpkin} +% Private version of the macro that draws the pumpkin correspondng to a +% binary operator. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% font selector (\eg "\textfont");\\ +% \param +% drawing thickness, in units of the default-rule-thickness "\fontdimen". +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@binop@pumpkin[3]{% \begin{@HwM@oplus@picture}#1#2{3.6}{-1.8}% \roundcap \linethickness{#3\@HwM@thickness@units@for #2}% \Line(-.1,1)(-.15,1.4)(.15,1.4)(.1,1)% \Line(-.1,-1)(.1,-1)% - \@HwM@oplus@pumpkin@profile-% - \@HwM@oplus@pumpkin@profile+% + \@HwM@binop@pumpkin@profile-% + \@HwM@binop@pumpkin@profile+% \@HwM@small@pumpkin@mouth{1,-.1}{.7,-.5}{.4,-.4}% {-.7}% {.6,-.3}{.3,-.2}% {-.4}% \end{@HwM@oplus@picture}% } -\newcommand*\@HwM@Oplus@Pumpkin[2]{% - \@HwM@choose@thicknesses{\@HwM@oplus@pumpkin #1#2}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Binop@Pumpkin} +% Public version of the above, with the following arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@Binop@Pumpkin[2]{% + \@HwM@choose@thicknesses{\@HwM@binop@pumpkin #1#2}% {{.6}}% {{1.2}}% } +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Drawing the skulls} +% +% Now it's the turn of the macros that take care of drawing the skulls. +% Figure~\ref{fig:skulls} shows a sketch of the relevant drawings. +% +% \begin{figure}[tp] +% \newcommand*{\binaryskullnose}[8]{^^A +% \moveto(0,-.#1)^^A +% \curveto(-.#2,-.#1)(-.#3,-.#4)(-.#5,-.#6)^^A +% \curveto(-.#7,-.#8)(.#7,-.#8)(.#5,-.#6)^^A +% \curveto(.#3,-.#4)(.#2,-.#1)(0,-.#1)^^A +% \fillpath +% } +% \newcommand*{\semibinaryskullcontour}[1]{^^A +% \moveto(#1.15,0)^^A +% \curveto(#1.15,.1)(#1.15,.21)(#1.4,.2)^^A +% \curveto(#1.6,.19)(#1.69,.1)(#1.7,0)^^A +% \curveto(#1.71,-.1)(#1.6,-.3)(#1.5,-.3)^^A +% \curveto(#1.4,-.3)(#1.15,-.2)(#1.15,0)^^A +% \fillpath +% \cbezier(0,1.333336)(#11,1.333336)(#11.2,0.5)(#11,0)^^A +% \cbezier(#11,0)(#11.05,-.9)(#1.5,-.3)(#1.5,-.65)^^A +% } +% \newcommand*{\semibinaryskullteeth}[2]{^^A +% \moveto(#1.5,-.7)^^A +% \curveto(#1.45,-.6)(#1.4,-.6)(#1.35,-.7)^^A +% \curveto(#1.4,-1.2)(#1.5,-1.2)(#1.5,-.7)^^A +% \strokepath +% \moveto(#1.33,-.7)^^A +% \curveto(#1.3,-.6)(#1.22,-.6)(#1.19,-.75)^^A +% \curveto(#1.15,-.9)(#1.38,-.9)(#1.33,-.7)^^A +% \strokepath +% \moveto(#1.17,-.75)^^A +% \curveto(#1.13,-.65)(#1.05,-.62)(#1.02,-.75)^^A +% \curveto(#2.03,-.95)(#1.22,-.95)(#1.17,-.75)^^A +% \strokepath +% } +% +% \newcommand*{\semismallskullcontour}[1]{^^A +% \moveto(#1.225,0)^^A +% \curveto(#1.225,.15)(#1.225,.315)(#1.6,.3)^^A +% \curveto(#1.9,.285)(#11.035,.15)(#11.05,0)^^A +% \curveto(#11.065,-.15)(#1.9,-.45)(#1.75,-.45)^^A +% \curveto(#1.6,-.45)(#1.225,-.3)(#1.225,0)^^A +% \fillpath +% \cbezier(0,2)(#11.5,2)(#11.8,0.75)(#11.5,0)^^A +% \cbezier(#11.5,0)(#11.575,-1.35)(#1.75,-.45)(#1.75,-1)^^A +% } +% \newcommand*{\semismallskulljaw}[1]{^^A +% \moveto(#11.25,-.9)^^A +% \curveto(#11.24,-1.2)(#11.2,-1)(#11.1,-1.3)^^A +% \curveto(#11,-1.6)(#11,-1.8)(#1.75,-1.9)^^A +% \curveto(0,-2.1)(#1.3,-2)(0,-2)^^A +% \strokepath +% } +% \newcommand*{\semismallskullinnerjaw}[1]{^^A +% \moveto(#11,-.9)^^A +% \curveto(#1.9,-1)(#11,-1.5)(#1.75,-1.5)^^A +% \strokepath +% } +% \newcommand*{\semismallskullteeth}[2]{^^A +% \moveto(#1.75,-1)^^A +% \curveto(#1.65,-.9)(#1.6,-.9)(#1.5,-1)^^A +% \curveto(#1.6,-2)(#1.7,-2)(#1.75,-1)^^A +% \strokepath +% \moveto(#1.45,-1)^^A +% \curveto(#1.4,-.9)(#1.3,-.9)(#1.285,-1.05)^^A +% \curveto(#1.2,-1.35)(#1.6,-1.35)(#1.45,-1)^^A +% \strokepath +% \moveto(#1.25,-1.05)^^A +% \curveto(#1.2,-.9)(#1.04,-.9)(#1.03,-1.05)^^A +% \curveto(#2.08,-1.4)(#1.35,-1.4)(#1.25,-1.05)^^A +% \strokepath +% \moveto(#1.5,-1.5)^^A +% \curveto(#1.47,-1.65)(#1.35,-1.6)(#1.3,-1.55)^^A +% \curveto(#1.15,-1.25)(#1.65,-1.25)(#1.5,-1.5)^^A +% \strokepath +% \moveto(#1.25,-1.55)^^A +% \curveto(#1.2,-1.7)(#1.04,-1.7)(#1.03,-1.55)^^A +% \curveto(#2.1,-1.3)(#1.35,-1.3)(#1.25,-1.55)^^A +% \strokepath +% } +% +% \newcommand*{\largeskullnose}[9]{^^A +% \moveto(0,-#1)^^A +% \curveto(-#2,-#1)(-#3,-#1)(-#4,-#5)^^A +% \curveto(-#6,-#7)(-#8,-#9)(0,-#9)^^A +% \curveto(#8,-#9)(#6,-#7)(#4,-#5)^^A +% \curveto(#3,-#1)(#2,-#1)(0,-#1)^^A +% \fillpath +% } +% \newcommand*{\semilargeskullcontour}[1]{^^A +% \moveto(#1.3375,0)^^A +% \curveto(#1.3375,.225)(#1.3375,.4725)(#1.9,.45)^^A +% \curveto(#11.35,.4275)(#11.5525,.225)(#11.575,0)^^A +% \curveto(#11.5975,-.225)(#11.35,-.675)(#11.125,-.675)^^A +% \curveto(#1.9,-.675)(#1.3375,-.45)(#1.3375,0)^^A +% \fillpath +% \cbezier(#12,2)(#12.1,1.8)(#12.7,1.125)(#12.25,0)^^A +% \moveto(#12.24,.1)^^A +% \curveto(#12.3,-1)(#12,-1.2)(#11.5,-1.2)^^A +% \curveto(#11.3,-1.2)(#11.125,-1.3)(#11.125,-1.5)^^A +% \strokepath +% ^^A Jaw +% \moveto(#11.875,-1.35)^^A +% \curveto(#11.86,-1.8)(#11.8,-1.5)(#11.65,-1.95)^^A +% \curveto(#11.5,-2.4)(#11.5,-2.75)(#11.2,-2.9)^^A +% \curveto(#1.9,-3.05)(#11,-3.2)(#1.3,-3.1)^^A +% \strokepath +% } +% \newcommand*{\semilargeskullinnerjaw}[1]{^^A +% \moveto(#11.5,-1.35)^^A +% \curveto(#11.35,-1.5)(#11.5,-2.25)(#11.125,-2.25)^^A +% \strokepath +% } +% \newcommand*{\semilargeskullteeth}[2]{^^A +% \moveto(#1.75,-2.25)^^A +% \curveto(#1.65,-2.5)(#1.55,-2.5)(#1.45,-2.3)^^A +% \curveto(#1.35,-2.05)(#1.4,-2)(#1.6,-2)^^A +% \curveto(#1.8,-2)(#1.8,-2.05)(#1.75,-2.25)^^A +% \strokepath +% \moveto(#1.35,-2.3)^^A +% \curveto(#1.25,-2.6)(#1.1,-2.65)(#1.05,-2.3)^^A +% \curveto(#1.05,-2.05)(0,-2.05)(#1.2,-2.05)^^A +% \curveto(#1.4,-2.05)(#1.42,-2)(#1.35,-2.3)^^A +% \strokepath +% \moveto(#11.12,-1.6)^^A +% \curveto(#11,-1.3)(#1.9,-1.3)(#1.75,-1.6)^^A +% \curveto(#11,-3)(#11,-3)(#11.12,-1.5)^^A +% \strokepath +% \moveto(#1.7,-1.6)^^A +% \curveto(#1.6,-1.4)(#1.5,-1.4)(#1.45,-1.65)^^A +% \curveto(#1.45,-1.85)(#1.4,-1.95)(#1.55,-1.95)^^A +% \curveto(#1.85,-1.95)(#1.75,-1.75)(#1.7,-1.6)^^A +% \strokepath +% \moveto(#1.4,-1.65)^^A +% \curveto(#1.3,-1.4)(#1.1,-1.4)(#1.05,-1.7)^^A +% \curveto(#1.05,-1.9)(#2.05,-2)(#1.225,-2)^^A +% \curveto(#1.5,-2)(#1.45,-1.9)(#1.4,-1.65) +% \strokepath +% } +% \newcommand*{\semilargeskullthinlines}[1]{^^A +% \moveto(#1.8,.7)^^A +% \curveto(#1.4,.7)(#1.4,.9)(#1.2,.7)^^A +% \curveto(#1.1,.6)(#1.2,.4)(#1.2,.3)^^A +% \strokepath +% \cbezier(#11.3,.7)(#11.5,.7)(#11.5,.75)(#11.75,.5)^^A +% } +% +% \centering +% +% The binary operator variant:\\*[\medskipamount] +% \begin{picture}(3.2,4)(-1.6,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-2,-2)(1,0){5}{\line(0,1){4}} +% \multiput(-2,-2)(0,1){5}{\line(1,0){4}} +% \color{black} +% \roundcap +% \linethickness{.7pt} +% \semibinaryskullteeth-+ +% \semibinaryskullteeth+- +% \linethickness{1.3pt} +% \binaryskullnose{5}{1}{2}{5}{15}{4}{1}{1} +% \semibinaryskullcontour- +% \semibinaryskullcontour+ +% \end{picture} +% +% \bigskip\bigskip +% +% The small variant:\\*[\medskipamount] +% \begin{picture}(4,4)(-2,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-2,-2)(1,0){5}{\line(0,1){4}} +% \multiput(-2,-2)(0,1){5}{\line(1,0){4}} +% \color{black} +% \roundcap +% \linethickness{.8pt} +% \semismallskullteeth-+ +% \semismallskullteeth+- +% \linethickness{2pt} +% \binaryskullnose{75}{15}{3}{75}{225}{6}{15}{15} +% \semismallskullcontour- +% \semismallskullcontour+ +% \semismallskulljaw- +% \semismallskulljaw+ +% \linethickness{1.2pt} +% \semismallskullinnerjaw- +% \semismallskullinnerjaw+ +% \end{picture} +% +% \bigskip\bigskip +% +% The large variant:\\*[\medskipamount] +% \begin{picture}(9,8)(-4.5,-4) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-4,-4)(1,0){9}{\line(0,1){8}} +% \multiput(-4,-4)(0,1){9}{\line(1,0){8}} +% \color{black} +% \roundcap +% \linethickness{1pt} +% \semilargeskullteeth-+ +% \semilargeskullteeth+- +% \linethickness{3pt} +% \largeskullnose +% {1.125}{.1}{.5}{.3375}{.9}{.147}{.7}{.2}{.4} +% \cbezier(-2,2)(-1.25,3.5)(1.25,3.5)(2,2) +% \semilargeskullcontour- +% \semilargeskullcontour+ +% \cbezier(-.3,-3.1)(0,-3)(0,-3)(.3,-3.1) +% \linethickness{1.8pt} +% \semilargeskullinnerjaw- +% \semilargeskullinnerjaw+ +% \linethickness{.5pt} +% \semilargeskullthinlines- +% \semilargeskullthinlines+ +% \end{picture} +% +% \caption{Sketches of the skulls} +% \label{fig:skulls} +% \end{figure} +% +% As you can see in figure~\ref{fig:pumpkins}, skulls too come in three +% variants: a binary operator and the two versions (both for display and +% nondisplay math) of a ``large'' operator. Below, the macros for each +% version are preceded by one or two useful ``subroutines'', that draw some +% patterns that appear more than once in the picture. +% +% \begin{macro}{\@HwM@large@skull@nose} +% Subroutine that draws the (hole corresponding to the) nose in the variant +% of the skull that is used for a ``large'' operator typeset in display +% style. Parameters are suitable points coordinates. +% \begin{macrocode} +\newcommand*\@HwM@large@skull@nose[9]{% + \moveto(0,-#1)% + \curveto(-#2,-#1)(-#3,-#1)(-#4,-#5)% + \curveto(-#6,-#7)(-#8,-#9)(0,-#9)% + \curveto(#8,-#9)(#6,-#7)(#4,-#5)% + \curveto(#3,-#1)(#2,-#1)(0,-#1)% + \fillpath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@large@skull@profile} +% Subroutine that draws the outline and the outer part of the jaw in the +% variant of the skull that is used for a ``large'' operator typeset in +% display style. Argument~\#1 is either \texttt{-} or~\texttt{+}, depending +% on which half of the skull you want to draw. +% \begin{macrocode} +\newcommand*\@HwM@large@skull@profile[1]{% + \moveto(#1.3375,0)% + \curveto(#1.3375,.225)(#1.3375,.4725)(#1.9,.45)% + \curveto(#11.35,.4275)(#11.5525,.225)(#11.575,0)% + \curveto(#11.5975,-.225)(#11.35,-.675)(#11.125,-.675)% + \curveto(#1.9,-.675)(#1.3375,-.45)(#1.3375,0)% + \fillpath + \cbezier(#12,2)(#12.1,1.8)(#12.7,1.125)(#12.25,0)% + \moveto(#12.24,.1)% + \curveto(#12.3,-1)(#12,-1.2)(#11.5,-1.2)% + \curveto(#11.3,-1.2)(#11.125,-1.3)(#11.125,-1.5)% + \strokepath +% \end{macrocode} +% The outer contour of the jaw: +% \begin{macrocode} + \moveto(#11.875,-1.35)% + \curveto(#11.86,-1.8)(#11.8,-1.5)(#11.65,-1.95)% + \curveto(#11.5,-2.4)(#11.5,-2.75)(#11.2,-2.9)% + \curveto(#1.9,-3.05)(#11,-3.2)(#1.3,-3.1)% + \strokepath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@large@skull@innerjaw} +% Subroutine that draws the inner part of the jaw in the variant of the skull +% that is used for a ``large'' operator typeset in display style. +% Argument~\#1 is either \texttt{-} or~\texttt{+}, depending on which half of +% the skull you want to draw. +% \begin{macrocode} +\newcommand*\@HwM@large@skull@innerjaw[1]{% + \moveto(#11.5,-1.35)% + \curveto(#11.35,-1.5)(#11.5,-2.25)(#11.125,-2.25)% + \strokepath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@large@skull@teeth} +% Subroutine for drawing the teeth in the variant of the skull that is used +% for a ``large'' operator typeset in display style. Argument~\#1 is either +% \texttt{-} or~\texttt{+}, depending on which half of the skull you want to +% draw; then, argument~\#2 must always be the opposite sign (that is, either +% \texttt{+} or~\texttt{-}, respectively). +% \begin{macrocode} +\newcommand*\@HwM@large@skull@teeth[2]{% + \moveto(#1.75,-2.25)% + \curveto(#1.65,-2.5)(#1.55,-2.5)(#1.45,-2.3)% + \curveto(#1.35,-2.05)(#1.4,-2)(#1.6,-2)% + \curveto(#1.8,-2)(#1.8,-2.05)(#1.75,-2.25)% + \strokepath + \moveto(#1.35,-2.3)% + \curveto(#1.25,-2.6)(#1.1,-2.65)(#1.05,-2.3)% + \curveto(#1.05,-2.05)(0,-2.05)(#1.2,-2.05)% + \curveto(#1.4,-2.05)(#1.42,-2)(#1.35,-2.3)% + \strokepath + \moveto(#1.7,-1.6)% + \curveto(#1.6,-1.4)(#1.5,-1.4)(#1.45,-1.65)% + \curveto(#1.45,-1.85)(#1.4,-1.95)(#1.55,-1.95)% + \curveto(#1.85,-1.95)(#1.75,-1.75)(#1.7,-1.6)% + \strokepath + \moveto(#11.12,-1.6)% + \curveto(#11,-1.3)(#1.9,-1.3)(#1.75,-1.6)% + \curveto(#11,-3)(#11,-3)(#11.12,-1.5)% + \strokepath + \moveto(#1.4,-1.65)% + \curveto(#1.3,-1.4)(#1.1,-1.4)(#1.05,-1.7)% + \curveto(#1.05,-1.9)(#2.05,-2)(#1.225,-2)% + \curveto(#1.5,-2)(#1.45,-1.9)(#1.4,-1.65) + \strokepath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@large@skull@brows} +% Subroutine for drawing the brows in the variant of the skull that is used +% for a ``large'' operator typeset in display style. Argument~\#1 is either +% \texttt{-} or~\texttt{+}, depending on which half of the skull you want to +% draw. +% \begin{macrocode} +\newcommand*\@HwM@large@skull@brows[1]{% + \moveto(#1.8,.7)% + \curveto(#1.4,.7)(#1.4,.9)(#1.2,.7)% + \curveto(#1.1,.6)(#1.2,.4)(#1.2,.3)% + \strokepath + \cbezier(#11.3,.7)(#11.5,.7)(#11.5,.75)(#11.75,.5)% +} +% \end{macrocode} +% \end{macro} +% +% Admittedly, not all these subroutines were actually needed; but I~wrote the +% code this way when I~dashed off the skethces, and I~was too lazy to +% streamline it afterwards, when copying it to this package! +% +% \begin{macro}{\@HwM@large@skull} +% Private version of the macro that draws the skull correspondng to a +% ``large'' operator used in display math mode. Arguments: +% \begin{paramlist} +% \param +% main drawing thickn., in units of the default-rule-thickness +% "\fontdimen";\\ +% \param +% line thickness for drawing the inner of the jaw, in the same units;\\ +% \param +% line thickness for drawing the teeth, in the same units;\\ +% \param +% line thickness for drawing the brows, in points~(\texttt{pt}). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@large@skull[4]{% + \begin{@HwM@bigop@picture}\displaystyle \textfont {6}{-3}% + \roundcap + \linethickness{#3\@HwM@thickness@units@for \textfont}% + \@HwM@large@skull@teeth-+% + \@HwM@large@skull@teeth+-% + \linethickness{#1\@HwM@thickness@units@for \textfont}% + \@HwM@large@skull@nose + {1.125}{.1}{.5}{.3375}{.9}{.147}{.7}{.2}{.4}% + \cbezier(-2,2)(-1.25,3.5)(1.25,3.5)(2,2)% + \@HwM@large@skull@profile-% + \@HwM@large@skull@profile+% + \cbezier(-.3,-3.1)(0,-3)(0,-3)(.3,-3.1)% + \linethickness{#2\@HwM@thickness@units@for \textfont}% + \@HwM@large@skull@innerjaw-% + \@HwM@large@skull@innerjaw+% + \linethickness{#4\p@}% + \@HwM@large@skull@brows-% + \@HwM@large@skull@brows+% + \end{@HwM@bigop@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Large@Skull} +% Public version of the above; requires no parameters. +% \begin{macrocode} +\newcommand*\@HwM@Large@Skull{% + \@HwM@choose@thicknesses \@HwM@large@skull + {{1.5}{.9}{.3}{.075}}% + {{2}{1.2}{.4}{.1}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@skull@nose} +% Subroutine that draws the (hole corresponding to the) variant of the nose +% that is shared between the binary operator and the nondisplay version of +% the ``large'' operator. The parameters are suitable point coordinates. +% \begin{macrocode} +\newcommand*\@HwM@small@skull@nose[8]{% + \moveto(0,-.#1)% + \curveto(-.#2,-.#1)(-.#3,-.#4)(-.#5,-.#6)% + \curveto(-.#7,-.#8)(.#7,-.#8)(.#5,-.#6)% + \curveto(.#3,-.#4)(.#2,-.#1)(0,-.#1)% + \fillpath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@skull@profile} +% Subroutine that draws the outline and the outer part of the jaw in the +% variant of the skull that is used for a ``large'' operator typeset in +% \emph{non}-display style. Argument~\#1 is either \texttt{-} or~\texttt{+}, +% depending on which half of the skull you want to draw. +% \begin{macrocode} +\newcommand*\@HwM@small@skull@profile[1]{% + \moveto(#1.225,0)% + \curveto(#1.225,.15)(#1.225,.315)(#1.6,.3)% + \curveto(#1.9,.285)(#11.035,.15)(#11.05,0)% + \curveto(#11.065,-.15)(#1.9,-.45)(#1.75,-.45)% + \curveto(#1.6,-.45)(#1.225,-.3)(#1.225,0)% + \fillpath + \cbezier(0,2)(#11.5,2)(#11.8,0.75)(#11.5,0)% + \cbezier(#11.5,0)(#11.575,-1.35)(#1.75,-.45)(#1.75,-1)% +% \end{macrocode} +% The outer contour of the jaw: +% \begin{macrocode} + \moveto(#11.25,-.9)% + \curveto(#11.24,-1.2)(#11.2,-1)(#11.1,-1.3)% + \curveto(#11,-1.6)(#11,-1.8)(#1.75,-1.9)% + \curveto(0,-2.1)(#1.3,-2)(0,-2)% + \strokepath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@skull@innerjaw} +% Subroutine that draws the inner part of the jaw in the variant of the skull +% that is used for a ``large'' operator typeset in display style. +% Argument~\#1 is either \texttt{-} or~\texttt{+}, depending on which half of +% the skull you want to draw. +% \begin{macrocode} +\newcommand*\@HwM@small@skull@innerjaw[1]{% + \moveto(#11,-.9)% + \curveto(#1.9,-1)(#11,-1.5)(#1.75,-1.5)% + \strokepath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@skull@teeth} +% Subroutine for drawing the teeth in the variant of the skull that is used +% for a ``large'' operator which gets typeset in \emph{non}-display style. +% Argument~\#1 is either \texttt{-} or~\texttt{+}, depending on which half of +% the skull you want to draw; then, argument~\#2 must always be the opposite +% sign (that is, either \texttt{+} or~\texttt{-}, respectively). +% \begin{macrocode} +\newcommand*\@HwM@small@skull@teeth[2]{% + \moveto(#1.5,-1.5)% + \curveto(#1.47,-1.65)(#1.35,-1.6)(#1.3,-1.55)% + \curveto(#1.15,-1.25)(#1.65,-1.25)(#1.5,-1.5)% + \strokepath + \moveto(#1.25,-1.55)% + \curveto(#1.2,-1.7)(#1.04,-1.7)(#1.03,-1.55)% + \curveto(#2.1,-1.3)(#1.35,-1.3)(#1.25,-1.55)% + \strokepath + \moveto(#1.45,-1)% + \curveto(#1.4,-.9)(#1.3,-.9)(#1.285,-1.05)% + \curveto(#1.2,-1.35)(#1.6,-1.35)(#1.45,-1)% + \strokepath + \moveto(#1.75,-1)% + \curveto(#1.65,-.9)(#1.6,-.9)(#1.5,-1)% + \curveto(#1.6,-2)(#1.7,-2)(#1.75,-1)% + \strokepath + \moveto(#1.25,-1.05)% + \curveto(#1.2,-.9)(#1.04,-.9)(#1.03,-1.05)% + \curveto(#2.08,-1.4)(#1.35,-1.4)(#1.25,-1.05)% + \strokepath +} +% \end{macrocode} +% \end{macro} +% +% The same remark, as the one we made above, about the redundancy of these +% subroutines (and about my laziness!\@) applies here. +% +% \begin{macro}{\@HwM@small@skull} +% Private version of the macro that draws the skull correspondng to a +% ``large'' operator used in \emph{non}-display math mode. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont");\\ +% \param +% main drawing thickn., in units of the default-rule-thickness +% "\fontdimen";\\ +% \param +% line thickness for drawing the inner of the jaw, in the same units;\\ +% \param +% line thickness for drawing the teeth, in the same units. +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@small@skull[5]{% + \begin{@HwM@bigop@picture}#1#2{3.48}{-1.74}% + \roundcap + \linethickness{#5\@HwM@thickness@units@for #2}% + \@HwM@small@skull@teeth-+% + \@HwM@small@skull@teeth+-% + \linethickness{#3\@HwM@thickness@units@for #2}% + \@HwM@small@skull@nose{75}{15}{3}{75}{225}{6}{15}{15}% + \@HwM@small@skull@profile-% + \@HwM@small@skull@profile+% + \linethickness{#4\@HwM@thickness@units@for #2}% + \@HwM@small@skull@innerjaw-% + \@HwM@small@skull@innerjaw+% + \end{@HwM@bigop@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Small@Skull} +% Public version of the above, with the following arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@Small@Skull[2]{% + \@HwM@choose@thicknesses{\@HwM@small@skull #1#2}% + {{}{.6}{.25}}% + {{1.333333}{.7}{.3}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@binop@skull@profile} +% Subroutine that draws the outline of the variant of the skull that is used +% for a binary operator (in whatever style). Argument~\#1 is either +% \texttt{-} or~\texttt{+}, depending on which half of the skull you want to +% draw. +% \begin{macrocode} +\newcommand*\@HwM@binop@skull@profile[1]{% + \moveto(#1.15,0)% + \curveto(#1.15,.1)(#1.15,.21)(#1.4,.2)% + \curveto(#1.6,.19)(#1.69,.1)(#1.7,0)% + \curveto(#1.71,-.1)(#1.6,-.3)(#1.5,-.3)% + \curveto(#1.4,-.3)(#1.15,-.2)(#1.15,0)% + \fillpath + \cbezier(0,1.333336)(#11,1.333336)(#11.2,0.5)(#11,0)% + \cbezier(#11,0)(#11.05,-.9)(#1.5,-.3)(#1.5,-.65)% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@binop@skull@teeth} +% Subroutine for drawing the teeth in the variant of the skull that is used +% for a binary operator. Argument~\#1 is either \texttt{-} or~\texttt{+}, +% depending on which half of the skull you want to draw; then, argument~\#2 +% must always be the opposite sign (that is, either \texttt{+} or~\texttt{-}, +% respectively). +% \begin{macrocode} +\newcommand*\@HwM@binop@skull@teeth[2]{% + \moveto(#1.33,-.7)% + \curveto(#1.3,-.6)(#1.22,-.6)(#1.19,-.75)% + \curveto(#1.15,-.9)(#1.38,-.9)(#1.33,-.7)% + \strokepath + \moveto(#1.5,-.7)% + \curveto(#1.45,-.6)(#1.4,-.6)(#1.35,-.7)% + \curveto(#1.4,-1.2)(#1.5,-1.2)(#1.5,-.7)% + \strokepath + \moveto(#1.17,-.75)% + \curveto(#1.13,-.65)(#1.05,-.62)(#1.02,-.75)% + \curveto(#2.03,-.95)(#1.22,-.95)(#1.17,-.75)% + \strokepath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@binop@skull} +% Private version of the macro that draws the skull for a binary operator. +% Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% font selector (\eg "\textfont");\\ +% \param +% main drawing thickn., in units of the default-rule-thickness +% "\fontdimen";\\ +% \param +% line thickness for drawing the teeth, in the same units. +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@binop@skull[4]{% + \begin{@HwM@oplus@picture}#1#2{2.48}{-1.24}% + \roundcap + \linethickness{#4\@HwM@thickness@units@for #2}% + \@HwM@binop@skull@teeth-+% + \@HwM@binop@skull@teeth+-% + \linethickness{#3\@HwM@thickness@units@for #2}% + \@HwM@small@skull@nose{5}{1}{2}{5}{15}{4}{1}{1}% + \@HwM@binop@skull@profile-% + \@HwM@binop@skull@profile+% + \end{@HwM@oplus@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Binop@Skull} +% Public version of the above, with the following arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@Binop@Skull[2]{% + \@HwM@choose@thicknesses{\@HwM@binop@skull #1#2}% + {{.6}{.2}}% + {{.9}{.266667}}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Drawing the clouds} +% +% Clouds are relatively simple to deal with: they are treated similarly to +% fractions, in that they are typeset in a larger version, used only for +% "\displaystyle" math, and in a smaller one, used in all the other cases. +% Figure~\ref{fig:cloud} sketches both variants. +% +% \begin{figure}[tp] +% \centering +% The small variant:\\*[\bigskipamount] +% \begin{picture}(6,4)(-3,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \linethickness{1.5pt} +% \roundcap +% \cbezier(-2.5,0)(-3.5,.25)(-3,2)(-1,1.5) +% \cbezier(-1.2,1.25)(-.75,2)(1,2.5)(1,1.5) +% \cbezier(.9,1.4)(1.25,2)(2.25,1.25)(1.4,.9) +% \cbezier(1.6,1)(3.5,1)(3,0)(2.5,0) +% \cbezier(2.5,0)(3,0)(3.5,-1)(2.1,-1.2) +% \cbezier(2.5,-1.1)(2.5,-2)(1,-2.5)(0,-1.5) +% \cbezier(.1,-1.2)(-.1,-2.25)(-2.25,-2)(-2,-1) +% \cbezier(-1.7,-1)(-2.75,-1)(-3.25,-.25)(-2.5,0) +% \end{picture} +% +% \bigskip\bigskip\bigskip % -% Clouds. +% The large variant:\\*[\bigskipamount] +% \begin{picture}(12,8)(-6,-4) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-6,-4)(1,0){13}{\line(0,1){8}} +% \multiput(-6,-4)(0,1) {9}{\line(1,0){12}} +% \color{black} +% \roundcap +% \linethickness{2pt} +% \cbezier(-5,0)(-7,.5)(-5.5,3.25)(-4,2.5) +% \cbezier(-3.8,2.1)(-4.75,3.5)(-2,4)(-2,3) +% \cbezier(-2.4,2.5)(-1.5,4)(2,5)(2,3) +% \cbezier(1.8,2.8)(2.5,4)(4.5,2.5)(2.8,1.8) +% \cbezier(3.2,2)(7,2)(6,0)(5,0) +% \cbezier(5,0)(6,0)(6.25,-1)(5.3,-1.4) +% \cbezier(4.6,-1.1)(6.8,-1.5)(4.3,-4)(3.6,-2.1) +% \cbezier(3.9,-2.6)(4,-3)(2,-5)(0,-3) +% \cbezier(.2,-2.4)(-.2,-4.5)(-4.5,-4)(-4,-2) +% \cbezier(-3.4,-2)(-5.5,-2)(-6.5,-.5)(-5,0) +% \end{picture} +% +% \caption{Sketches of the cloud} +% \label{fig:cloud} +% \end{figure} +% +% By good fortune, clouds do not require any subroutine\ldots +% +% \begin{macro}{\@HwM@large@cloud} +% This is the private version of the macro that draws the larger cloud. +% Argument: +% \begin{paramlist} +% \param +% drawing thickness, in units of the default-rule-thickness "\fontdimen". +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@large@cloud[1]{% \begin{@HwM@large@picture}{12}{-6}% \roundcap @@ -1587,11 +3086,30 @@ \cbezier(\-3.4,-2)(\-5.5,-2)(\-6.5,-.5)(\-5,0)% \end{@HwM@large@picture}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Large@Cloud} +% Public version of the above; requires no parameters. +% \begin{macrocode} \newcommand*\@HwM@Large@Cloud{% \@HwM@choose@thicknesses \@HwM@large@cloud {{.8}}% {{1.6}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@small@cloud} +% Private version of the macro that draws the smaller cloud (which has a +% little fewer details than the larger one). Arguments: +% \begin{paramlist} +% \param +% font selector (\eg "\scriptfont");\\ +% \param +% drawing thickness, in units of the default-rule-thickness "\fontdimen". +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@small@cloud[2]{% \begin{@HwM@small@picture}#1{6}{-3}% \roundcap @@ -1606,13 +3124,119 @@ \cbezier(\-1.7,-1)(\-2.75,-1)(\-3.25,-.25)(\-2.5,0)% \end{@HwM@small@picture}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Small@Cloud} +% Public version of the above. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\scriptstyle");\\ +% \param +% font selector (\eg "\scriptfont"). +% \end{paramlist} +% The first parameter is imposed by the interface toward other parts of the +% code, because other macros that share the same interface might need it, but +% isn't actually used in this case. +% \begin{macrocode} \newcommand*\@HwM@Small@Cloud[2]{% \@HwM@choose@thicknesses{\@HwM@small@cloud #2}% {{.5}}% {{1.2}}% } +% \end{macrocode} +% \end{macro} +% +% That's all: as we promised, this has been a quick one! +% +% \subsubsection{Drawing the ghosts} +% +% For ghosts, I~imagined a r\^{o}le as ordinary symbols, and nothing else; +% therefore, they exist in only one size, but, in return, they can be seen +% from three different views (left, front, and right), as +% figure~\ref{fig:ghosts} depicts. From the implementation viewpoint, only +% two variants need to be defined: a ``symmetric ghost'', that corresponds to +% the front view, and an ``asymmetric ghost'', which yields the left and the +% right views through the same mechanism that toggles, for example, between +% the straight and the reverse witch. +% +% \begin{figure}[tp] +% \newcommand*{\SymmetricGhostContour}[8]{^^A +% \cbezier(-#1,#2)(-#3,#4)(-#3,#5)(-#3,#6)^^A +% \Line(-#3,#6)(-#3,#7)^^A +% \cbezier(#1,#2)(#3,#4)(#3,#5)(#3,#6)^^A +% \Line(#3,#6)(#3,#7)^^A +% \cbezier(-#3,#7)(-#3,#8)(#3,#8)(#3,#7)^^A +% } +% \newcommand*{\SymmetricGhostBorder}[8]{^^A +% \cbezier(-#1,#2)(-#3,#4)(-#5,#6)(-#7,#2)^^A +% \qbezier(-#7,#2)(0,#8)(#7,#2)^^A +% \cbezier(#1,#2)(#3,#4)(#5,#6)(#7,#2)^^A +% } +% \newcommand*{\SymmetricGhostEyes}[3]{^^A +% \put(-#1,#2){\circle*{#3}}^^A +% \put(#1,#2){\circle*{#3}}^^A +% } +% \newcommand*{\AsymmetricGhost}[2]{^^A +% \roundcap +% \linethickness{1.5pt}^^A +% \cbezier(#11.75,-1.5)(#11,-1)(#1.7,-.5)(#1.5,0)^^A +% \cbezier(#1.5,0)(#1.3,.5)(0,1.6)(#21,1.6)^^A +% \cbezier(#21,1.6)(#21.8,1.6)(#21.8,.9)(#21.8,.6)^^A +% \cbezier(#21.8,.6)(#21.8,-.3)(#2.9,-.7)(#21.25,-1.5)^^A +% \linethickness{1pt}^^A +% \cbezier(#11.75,-1.5)(#11.4,-1.2)(#11.1,-1.8)(#1.75,-1.5)^^A +% \cbezier(#1.75,-1.5)(#1.4,-1.2)(#1.1,-1.8)(#2.25,-1.5)^^A +% \cbezier(#2.25,-1.5)(#2.6,-1.2)(#2.9,-1.8)(#21.25,-1.5)^^A +% \put(#21.2,.7){\circle*{.4}}^^A +% } % -% Ghosts. +% \centering +% \addtolength\leftskip {-2cm} +% \addtolength\rightskip{-2cm} +% +% Only the small variant is defined:\\*[\bigskipamount] +% \begin{picture}(4,4)(-2,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-2,-2)(1,0){5}{\line(0,1){4}} +% \multiput(-2,-2)(0,1){5}{\line(1,0){4}} +% \color{black} +% \AsymmetricGhost+- +% \end{picture}\qquad +% \begin{picture}(4,4)(-2,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-2,-2)(1,0){5}{\line(0,1){4}} +% \multiput(-2,-2)(0,1){5}{\line(1,0){4}} +% \color{black} +% \roundcap +% \linethickness{1.5pt} +% \SymmetricGhostContour{1.5}{-1.5}{1}{-1}{-.5}{0}{.5}{2} +% \linethickness{1pt} +% \SymmetricGhostBorder{1.5}{-1.5}{1.1}{-1.1}{.7}{-1.9}{.3}{-1.2} +% \SymmetricGhostEyes{.4}{.7}{.4} +% \end{picture}\qquad +% \begin{picture}(4,4)(-2,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-2,-2)(1,0){5}{\line(0,1){4}} +% \multiput(-2,-2)(0,1){5}{\line(1,0){4}} +% \color{black} +% \AsymmetricGhost-+ +% \end{picture}\par +% +% \caption{Sketches of the ghosts} +% \label{fig:ghosts} +% \end{figure} +% +% For ghosts, again, we do have some subroutines; and, again, some of these +% could actually be inserted inline. +% +% \begin{macro}{\@HwM@symm@ghost@contour} +% Subroutine that draws the thicker part of a symmetric ghost's contour. +% Parameters are suitable point coordinates. +% \begin{macrocode} \newcommand*\@HwM@symm@ghost@contour[8]{% \cbezier(-#1,#2)(-#3,#4)(-#3,#5)(-#3,#6)% \Line(-#3,#6)(-#3,#7)% @@ -1620,15 +3244,44 @@ \Line(#3,#6)(#3,#7)% \cbezier(-#3,#7)(-#3,#8)(#3,#8)(#3,#7)% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@symm@ghost@border} +% Subroutine that draws the lower border of a symmetric ghost's sheet (the +% thinner part of its contour). Parameters are suitable point coordinates. +% \begin{macrocode} \newcommand*\@HwM@symm@ghost@border[8]{% \cbezier(-#1,#2)(-#3,#4)(-#5,#6)(-#7,#2)% \qbezier(-#7,#2)(0,#8)(#7,#2)% \cbezier(#1,#2)(#3,#4)(#5,#6)(#7,#2)% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@symm@ghost@eyes} +% Subroutine that draws the eyes of a symmetric ghost. The parameters are +% self-explanatory. +% \begin{macrocode} \newcommand*\@HwM@symm@ghost@eyes[3]{% \put(-#1,#2){\circle*{#3}}% \put(#1,#2){\circle*{#3}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@symmetric@ghost} +% Private version of the macro that draws the symmetric ghost. Arguments: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont");\\ +% \param +% contour thickness, in units of the default-rule-thickness +% "\fontdimen";\\ +% \param +% lower border thickness, in the same units. +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@symmetric@ghost[3]{% \begin{@HwM@math@picture}{2.6}{-1}% {\@HwM@d@pict@strut{.6}}#1{3.2}{-1.6}% @@ -1640,11 +3293,41 @@ \@HwM@symm@ghost@eyes{.4}{.7}{.4}% \end{@HwM@math@picture}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Symmetric@Ghost} +% Public version of the above. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% The first parameter is imposed by the interface toward other parts of the +% code, because other macros that share the same interface might need it, but +% isn't actually used in this case. +% \begin{macrocode} \newcommand*\@HwM@Symmetric@Ghost[2]{% \@HwM@choose@thicknesses{\@HwM@symmetric@ghost #2}% {{.9}{.6}}% {{1.8}{1.2}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@asymmetric@ghost} +% Private version of the macro that draws the asymmetric ghost. Arguments: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont");\\ +% \param +% contour thickness, in units of the default-rule-thickness +% "\fontdimen";\\ +% \param +% lower border thickness, in the same units. +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@asymmetric@ghost[3]{% \begin{@HwM@math@picture}{2.6}{-1}% {\@HwM@d@pict@strut{.6}}#1{3.8}% @@ -1662,19 +3345,753 @@ \put(\+1.2,.7){\circle*{.4}}% \end{@HwM@math@picture}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Asymmetric@Ghost} +% Public version of the above. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% The first parameter is imposed by the interface toward other parts of the +% code, because other macros that share the same interface might need it, but +% isn't actually used in this case. +% \begin{macrocode} \newcommand*\@HwM@Asymmetric@Ghost[2]{% \@HwM@choose@thicknesses{\@HwM@asymmetric@ghost #2}% {{.9}{.6}}% {{1.8}{1.2}}% } - -% Extensible arrow-like symbols. +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Drawing the bats} +% +% We've finally got to the last of our characters (at least for this +% version): the bat. Bats are rendered as filled, as opposed to stroked, +% black shapes, and therefore it is impossible to differentiate the normal +% and the bold version by changing the thickness of the strokes (because +% there aren't any): the shape itself needs to be made slightly larger. +% Besides this, as in the case of ghosts we have designed a ``symmetric'' bat +% and an ``asymmetric'' one, where the latter can be drawn in two opposite +% orientations: this makes a total of six possible variants, which are +% portrayed in figures \ref{fig:s-bats} and~\ref{fig:a-bats}. The reference +% lines help you spot the differences between the bold and the normal +% versions. +% +% \begin{figure}[tp] +% \newcommand*{\BatWing}[1]{^^A +% \moveto(#1.7,0)^^A +% \curveto(#11.5,.1)(#12.2,.5)(#12,1)^^A +% \curveto(#12.5,.5)(#12.9,0)(#12.9,-.5)^^A +% \curveto(#12.8,0)(#12,-.5)(#12.25,-1)^^A +% \curveto(#12,-.5)(#11.7,-.3)(#11.5,-.7)^^A +% \curveto(#11.4,-.5)(#11.2,-.3)(#11,-.5)^^A +% \curveto(#1.9,-.4)(#1.7,-.4)(#1.5,-.5)^^A +% \closepath +% \fillpath +% } +% \newcommand*{\BoldBatWing}[1]{^^A +% \moveto(#1.7,.1)^^A +% \curveto(#11.5,.2)(#12.25,.6)(#12,1.1)^^A +% \curveto(#12.6,.5)(#13,0)(#13,-.6)^^A +% \curveto(#12.8,0)(#12,-.6)(#12.25,-1.1)^^A +% \curveto(#12,-.6)(#11.7,-.4)(#11.5,-.8)^^A +% \curveto(#11.4,-.6)(#11.2,-.4)(#11,-.6)^^A +% \curveto(#1.9,-.5)(#1.7,-.5)(#1.5,-.5)^^A +% \closepath +% \fillpath +% } +% +% \newcommand*{\Bat}{^^A +% \moveto(-.5,-.5)^^A +% \curveto(-.4,-.6)(-.2,-.7)(-.2,-1)^^A +% \curveto(-.1,-.7)(.1,-.7)(.2,-1)^^A +% \curveto(.2,-.7)(.4,-.6)(.5,-.5)^^A +% \closepath +% \fillpath +% \BatWing-^^A +% \BatWing+^^A +% \moveto(.5,0)^^A +% \circlearc{.35}{0}{.15}{0}{180}^^A +% \lineto(-.2,0)^^A +% \circlearc{-.35}{0}{.15}{0}{180}^^A +% \lineto(-.75,0)^^A +% \curveto(-.75,.45)(-.7,.5)(-.5,1)^^A +% \circlearc{0}{1}{.5}{180}{360}^^A +% \curveto(.7,.5)(.75,.45)(.75,0)^^A +% \closepath +% \fillpath +% \moveto(-.75,0)^^A +% \circlearc{0}{0}{.75}{180}{360}^^A +% \lineto(.5,0)^^A +% \circlearc{.35}{0}{.15}{360}{180}^^A +% \lineto(-.2,0)^^A +% \circlearc{-.35}{0}{.15}{360}{180}^^A +% \closepath +% \fillpath +% } +% \newcommand*{\BoldBat}{^^A +% \moveto(-.6,-.5)^^A +% \curveto(-.5,-.6)(-.3,-.7)(-.3,-1.1)^^A +% \curveto(-.1,-.7)(.1,-.7)(.3,-1.1)^^A +% \curveto(.3,-.7)(.5,-.6)(.6,-.5)^^A +% \closepath +% \fillpath +% \BoldBatWing-^^A +% \BoldBatWing+^^A +% \moveto(.5,0)^^A +% \circlearc{.35}{0}{.15}{0}{180}^^A +% \lineto(-.2,0)^^A +% \circlearc{-.35}{0}{.15}{0}{180}^^A +% \lineto(-.8,0)^^A +% \curveto(-.8,.5)(-.7,.5)(-.55,1.1)^^A +% \circlearc{0}{1.1}{.55}{180}{360}^^A +% \curveto(.7,.5)(.8,.5)(.8,0)^^A +% \closepath +% \fillpath +% \moveto(-.8,0)^^A +% \circlearc{0}{0}{.8}{180}{360}^^A +% \lineto(.5,0)^^A +% \circlearc{.35}{0}{.15}{360}{180}^^A +% \lineto(-.2,0)^^A +% \circlearc{-.35}{0}{.15}{360}{180}^^A +% \closepath +% \fillpath +% } +% +% \centering +% +% The symmetric bat, +% in the \texttt{normal}\ldots\\*[\bigskipamount] +% \begin{picture}(6,4)(-3,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \Bat +% \end{picture} +% +% \bigskip\bigskip\bigskip +% +% \ldots and in the \texttt{bold} math version.\\*[\bigskipamount] +% \begin{picture}(6,4)(-3,-2) +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \BoldBat +% \end{picture} +% +% \caption{Sketches of the symmetric bats} +% \label{fig:s-bats} +% \end{figure} +% +% \begin{figure}[tp] +% \newcommand*{\AsymmBat}{^^A +% \moveto(\-.5,.2)^^A +% \curveto(\-1.5,.3)(\-2.2,.5)(\-1.8,1)^^A +% \curveto(\-2.5,.5)(\-2.9,0)(\-2.9,-.5)^^A +% \curveto(\-2.7,0)(\-2,-.25)(\-2,-.8)^^A +% \curveto(\-2,-.5)(\-1.6,-.25)(\-1.4,-.5)^^A +% \curveto(\-1.4,-.2)(\-1.2,-.1)(\-1,-.3)^^A +% \curveto(\-1,-.1)(\-.7,-.1)(\-.6,-.1)^^A +% \closepath +% \fillpath +% \moveto(\+.9,0)^^A +% \curveto(\+2,-.1)(\+2.2,.5)(\+2,.7)^^A +% \curveto(\+2.5,.6)(\+3.2,0)(\+2.9,-.7)^^A +% \curveto(\+2.6,-.2)(\+2,-.5)(\+2,-1)^^A +% \curveto(\+2,-.5)(\+1.7,-.4)(\+1.5,-.7)^^A +% \curveto(\+1.6,-.4)(\+1.3,-.2)(\+1.1,-.5)^^A +% \curveto(\+1.1,-.3)(\+1,-.3)(\+.8,-.3)^^A +% \closepath +% \fillpath +% \moveto(\+.8,-.1)^^A +% \curveto(\+.85,.08)(\+.65,.13)(\+.6,-.05)^^A +% \lineto(\+.3,0)^^A +% \curveto(\+.35,.2)(\+.05,.3)(0,.1)^^A +% \lineto(\-.8,0)^^A +% \curveto(\-.7,.3)(\-.4,.7)(\+.25,1)^^A +% \curveto(\+.2,.4)(\+.8,.3)(\+1,.9)^^A +% \curveto(\+1.1,.7)(\+1.1,.2)(\+1,0)^^A +% \closepath +% \fillpath +% \moveto(\+.8,-.1)^^A +% \curveto(\+.75,-.28)(\+.55,-.23)(\+.6,-.05)^^A +% \lineto(\+.3,0)^^A +% \curveto(\+.25,-.18)(\-.05,-.08)(0,.1)^^A +% \lineto(\-.8,0)^^A +% \curveto(\-.9,-.3)(\-.8,-.6)(\-1,-.9)^^A +% \curveto(\-.8,-.6)(\-.4,-.7)(\-.6,-1)^^A +% \curveto(\-.2,-.8)(\+.2,-.82)(\+.3,-.8)^^A +% \curveto(\+.85,-.69)(\+.99,-.02)(\+1,0)^^A +% \closepath +% \fillpath +% } +% \newcommand*{\BoldAsymmBat}{^^A +% \moveto(\-.5,.3)^^A +% \curveto(\-1.5,.4)(\-2.2,.6)(\-1.9,1.1)^^A +% \curveto(\-2.6,.6)(\-3,0)(\-3,-.6)^^A +% \curveto(\-2.6,-.1)(\-2,-.4)(\-2,-.9)^^A +% \curveto(\-2,-.6)(\-1.6,-.35)(\-1.4,-.6)^^A +% \curveto(\-1.4,-.3)(\-1.2,-.2)(\-1,-.4)^^A +% \curveto(\-1,-.2)(\-.7,-.2)(\-.6,-.2)^^A +% \closepath +% \fillpath +% \moveto(\+.9,.1)^^A +% \curveto(\+1.8,0)(\+2.3,.3)(\+2.1,.8)^^A +% \curveto(\+2.6,.7)(\+3.3,-.1)(\+3,-.8)^^A +% \curveto(\+2.7,-.3)(\+2,-.6)(\+2,-1.1)^^A +% \curveto(\+2,-.6)(\+1.7,-.5)(\+1.5,-.8)^^A +% \curveto(\+1.6,-.5)(\+1.3,-.3)(\+1.1,-.6)^^A +% \curveto(\+1.1,-.4)(\+1,-.4)(\+.8,-.4)^^A +% \closepath +% \fillpath +% \moveto(\+.8,-.1)^^A +% \curveto(\+.85,.08)(\+.65,.13)(\+.6,-.05)^^A +% \lineto(\+.3,0)^^A +% \curveto(\+.35,.2)(\+.05,.3)(0,.1)^^A +% \lineto(\-.85,0)^^A +% \curveto(\-.75,.3)(\-.4,.7)(\+.25,1.1)^^A +% \curveto(\+.2,.55)(\+.8,.45)(\+1,1)^^A +% \curveto(\+1.1,.8)(\+1.2,.2)(\+1.05,0)^^A +% \closepath +% \fillpath +% \moveto(\+.8,-.1)^^A +% \curveto(\+.75,-.28)(\+.55,-.23)(\+.6,-.05)^^A +% \lineto(\+.3,0)^^A +% \curveto(\+.25,-.18)(\-.05,-.08)(0,.1)^^A +% \lineto(\-.85,0)^^A +% \curveto(\-.95,-.3)(\-.8,-.6)(\-1,-1)^^A +% \curveto(\-.75,-.7)(\-.4,-.8)(\-.5,-1.1)^^A +% \curveto(\-.2,-.8)(\+.2,-.82)(\+.3,-.8)^^A +% \curveto(\+.85,-.69)(\+1.04,-.0133333)(\+1.05,0)^^A +% \closepath +% \fillpath +% } +% +% \centering +% \addtolength\leftskip {-2cm} +% \addtolength\rightskip{-2cm} +% +% The asymmetric bat, +% in the \texttt{normal}\ldots\\*[\bigskipamount] +% \begin{picture}(6,4)(-3,-2) +% \def\+{-} +% \def\-{+} +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \AsymmBat +% \end{picture}\qquad +% \begin{picture}(6,4)(-3,-2) +% \def\+{+} +% \def\-{-} +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \AsymmBat +% \end{picture} +% +% \bigskip\bigskip\bigskip +% +% \ldots and in the \texttt{bold} math version.\\*[\bigskipamount] +% \begin{picture}(6,4)(-3,-2) +% \def\+{-} +% \def\-{+} +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \BoldAsymmBat +% \end{picture}\qquad +% \begin{picture}(6,4)(-3,-2) +% \def\+{+} +% \def\-{-} +% \linethickness{.1pt} +% \color{guidelines} +% \multiput(-3,-2)(1,0){7}{\line(0,1){4}} +% \multiput(-3,-2)(0,1){5}{\line(1,0){6}} +% \color{black} +% \BoldAsymmBat +% \end{picture} +% +% \caption{Sketches of the asymmetric bats} +% \label{fig:a-bats} +% \end{figure} +% +% \begin{macro}{\@HwM@symmetric@bat@wing} +% Subroutine that draws the wing of a symmetric, normal (that is, not bold) +% bat. Argument~\#1 is either \texttt{-} or~\texttt{+}, depending on which +% wing you want to draw. +% \begin{macrocode} +\newcommand*\@HwM@symmetric@bat@wing[1]{% + \moveto(#1.7,0)% + \curveto(#11.5,.1)(#12.2,.5)(#12,1)% + \curveto(#12.5,.5)(#12.9,0)(#12.9,-.5)% + \curveto(#12.8,0)(#12,-.5)(#12.25,-1)% + \curveto(#12,-.5)(#11.7,-.3)(#11.5,-.7)% + \curveto(#11.4,-.5)(#11.2,-.3)(#11,-.5)% + \curveto(#1.9,-.4)(#1.7,-.4)(#1.5,-.5)% + \closepath + \fillpath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@symmetric@bbat@wing} +% Subroutine that draws the wing of a symmetric, bold bat (note the +% additional~\texttt{b}). Argument~\#1 is either \texttt{-} or~\texttt{+}, +% depending on which wing you want to draw. +% \begin{macrocode} +\newcommand*\@HwM@symmetric@bbat@wing[1]{% + \moveto(#1.7,.1)% + \curveto(#11.5,.2)(#12.25,.6)(#12,1.1)% + \curveto(#12.6,.5)(#13,0)(#13,-.6)% + \curveto(#12.8,0)(#12,-.6)(#12.25,-1.1)% + \curveto(#12,-.6)(#11.7,-.4)(#11.5,-.8)% + \curveto(#11.4,-.6)(#11.2,-.4)(#11,-.6)% + \curveto(#1.9,-.5)(#1.7,-.5)(#1.5,-.5)% + \closepath + \fillpath +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@symmetric@bat} +% Macro that draws the symmetric, normal (that is, not bold) bat. Argument: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@symmetric@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(-.5,-.5)% + \curveto(-.4,-.6)(-.2,-.7)(-.2,-1)% + \curveto(-.1,-.7)(.1,-.7)(.2,-1)% + \curveto(.2,-.7)(.4,-.6)(.5,-.5)% + \closepath + \fillpath + \@HwM@symmetric@bat@wing-% + \@HwM@symmetric@bat@wing+% + \moveto(.5,0)% + \circlearc{.35}{0}{.15}{0}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{0}{180}% + \lineto(-.75,0)% + \curveto(-.75,.45)(-.7,.5)(-.5,1)% + \circlearc{0}{1}{.5}{180}{360}% + \curveto(.7,.5)(.75,.45)(.75,0)% + \closepath + \fillpath + \moveto(-.75,0)% + \circlearc{0}{0}{.75}{180}{360}% + \lineto(.5,0)% + \circlearc{.35}{0}{.15}{360}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{360}{180}% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@symmetric@bold@bat} +% Macro that draws the symmetric, bold bat. Argument: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@symmetric@bold@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(-.6,-.5)% + \curveto(-.5,-.6)(-.3,-.7)(-.3,-1.1)% + \curveto(-.1,-.7)(.1,-.7)(.3,-1.1)% + \curveto(.3,-.7)(.5,-.6)(.6,-.5)% + \closepath + \fillpath + \@HwM@symmetric@bbat@wing-% + \@HwM@symmetric@bbat@wing+% + \moveto(.5,0)% + \circlearc{.35}{0}{.15}{0}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{0}{180}% + \lineto(-.8,0)% + \curveto(-.8,.5)(-.7,.5)(-.55,1.1)% + \circlearc{0}{1.1}{.55}{180}{360}% + \curveto(.7,.5)(.8,.5)(.8,0)% + \closepath + \fillpath + \moveto(-.8,0)% + \circlearc{0}{0}{.8}{180}{360}% + \lineto(.5,0)% + \circlearc{.35}{0}{.15}{360}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{360}{180}% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Symmetric@Bat} +% Macro that draws the symmetric bat, automatically choosing between the +% normal and the bold version; because of this, it is directly a ``public'' +% macro. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% The first parameter is imposed by the interface toward other parts of the +% code, even if is not used here (as it happened in several other similar +% macros). +% \begin{macrocode} +\newcommand*\@HwM@Symmetric@Bat[2]{% + \@HwM@if@bold@math{% + \@HwM@symmetric@bold@bat #2% + }{% + \@HwM@symmetric@bat #2% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@asymmetric@bat} +% Macro that draws the asymmetric, normal (that is, not bold) bat. Argument: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@asymmetric@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(\-.5,.2)% + \curveto(\-1.5,.3)(\-2.2,.5)(\-1.8,1)% + \curveto(\-2.5,.5)(\-2.9,0)(\-2.9,-.5)% + \curveto(\-2.7,0)(\-2,-.25)(\-2,-.8)% + \curveto(\-2,-.5)(\-1.6,-.25)(\-1.4,-.5)% + \curveto(\-1.4,-.2)(\-1.2,-.1)(\-1,-.3)% + \curveto(\-1,-.1)(\-.7,-.1)(\-.6,-.1)% + \closepath + \fillpath + \moveto(\+.9,0) + \curveto(\+2,-.1)(\+2.2,.5)(\+2,.7) + \curveto(\+2.5,.6)(\+3.2,0)(\+2.9,-.7)% + \curveto(\+2.6,-.2)(\+2,-.5)(\+2,-1)% + \curveto(\+2,-.5)(\+1.7,-.4)(\+1.5,-.7)% + \curveto(\+1.6,-.4)(\+1.3,-.2)(\+1.1,-.5)% + \curveto(\+1.1,-.3)(\+1,-.3)(\+.8,-.3)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.85,.08)(\+.65,.13)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.35,.2)(\+.05,.3)(0,.1)% + \lineto(\-.8,0)% + \curveto(\-.7,.3)(\-.4,.7)(\+.25,1)% + \curveto(\+.2,.4)(\+.8,.3)(\+1,.9)% + \curveto(\+1.1,.7)(\+1.1,.2)(\+1,0)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.75,-.28)(\+.55,-.23)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.25,-.18)(\-.05,-.08)(0,.1)% + \lineto(\-.8,0)% + \curveto(\-.9,-.3)(\-.8,-.6)(\-1,-.9)% + \curveto(\-.8,-.6)(\-.4,-.7)(\-.6,-1)% + \curveto(\-.2,-.8)(\+.2,-.82)(\+.3,-.8)% + \curveto(\+.85,-.69)(\+.99,-.02)(\+1,0)% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@asymmetric@bold@bat} +% Macro that draws the asymmetric, bold bat. Argument: +% \begin{paramlist} +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@asymmetric@bold@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(\-.5,.3)% + \curveto(\-1.5,.4)(\-2.2,.6)(\-1.9,1.1)% + \curveto(\-2.6,.6)(\-3,0)(\-3,-.6)% + \curveto(\-2.6,-.1)(\-2,-.4)(\-2,-.9)% + \curveto(\-2,-.6)(\-1.6,-.35)(\-1.4,-.6)% + \curveto(\-1.4,-.3)(\-1.2,-.2)(\-1,-.4)% + \curveto(\-1,-.2)(\-.7,-.2)(\-.6,-.2)% + \closepath + \fillpath + \moveto(\+.9,.1) + \curveto(\+1.8,0)(\+2.3,.3)(\+2.1,.8)% + \curveto(\+2.6,.7)(\+3.3,-.1)(\+3,-.8)% + \curveto(\+2.7,-.3)(\+2,-.6)(\+2,-1.1)% + \curveto(\+2,-.6)(\+1.7,-.5)(\+1.5,-.8)% + \curveto(\+1.6,-.5)(\+1.3,-.3)(\+1.1,-.6)% + \curveto(\+1.1,-.4)(\+1,-.4)(\+.8,-.4)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.85,.08)(\+.65,.13)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.35,.2)(\+.05,.3)(0,.1)% + \lineto(\-.85,0)% + \curveto(\-.75,.3)(\-.4,.7)(\+.25,1.1)% + \curveto(\+.2,.55)(\+.8,.45)(\+1,1)% + \curveto(\+1.1,.8)(\+1.2,.2)(\+1.05,0)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.75,-.28)(\+.55,-.23)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.25,-.18)(\-.05,-.08)(0,.1)% + \lineto(\-.85,0)% + \curveto(\-.95,-.3)(\-.8,-.6)(\-1,-1)% + \curveto(\-.75,-.7)(\-.4,-.8)(\-.5,-1.1)% + \curveto(\-.2,-.8)(\+.2,-.82)(\+.3,-.8)% + \curveto(\+.85,-.69)(\+1.04,-.0133333)(\+1.05,0)% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Asymmetric@Bat} +% Macro that draws the asymmetric bat, automatically choosing between the +% normal and the bold version; because of this, it is directly a ``public'' +% macro. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% This should be the last time we have to repeat the usual remark about the +% first parameter: although it is not used in this macro, it is imposed by +% the interface toward other parts of the code, which is shared also by a few +% macros that, instead, require the information it conveys. +% \begin{macrocode} +\newcommand*\@HwM@Asymmetric@Bat[2]{% + \@HwM@if@bold@math{% + \@HwM@asymmetric@bold@bat #2% + }{% + \@HwM@asymmetric@bat #2% + }% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{New brooms, old pitchforks} +% +% As we have already remarked in the first part, more precisely in +% Subsection~\ref{ssS:Witches}, the look of brooms, as they were implemented +% by the first release of this package, had already been +% \href{https://tex.stackexchange.com/questions/336768/seasonal-challenge-contributions-from-texing-dead-welcome#comment829686_337719}{politely +% questioned}: the problem was that, in certain commands, the brush was +% rendered as an "\in" or~"\ni" character ($\in$/$\ni$), making the supposed +% broom look more like a pitchfork. The same commands now represent the +% brush with a composite character obtained by overprinting a $<$ or~$>$ +% character to a~$-$; however, the old representation is retained too, using +% different command names. The following macros define both the old-style +% pitchforks and the new ``composite'' brushes. +% +% \begin{macro}{\@HwM@oooalign} +% This macro overprints two or more characters, taking math style into due +% account. It is my personal version of "\ooalign". Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\textstyle");\\ +% \param +% the symbols to be printed over oneanother, separated by "\cr". +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@oooalign[2]{% + \leavevmode + \vbox{% + \baselineskip\z@skip +% \end{macrocode} +% The following line is just for elegance, since "\lineskip" will never be +% used\ldots +% \begin{macrocode} + \lineskip\z@skip +% \end{macrocode} +% \ldots given the setting of "\lineskiplimit". +% \begin{macrocode} + \lineskiplimit -\maxdimen + \m@th + \ialign{\hfil$#1##$\hfil\crcr #2\crcr}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@overprint@rel} +% This macro builds a composite relation symbol out of the two characters +% specified in the arguments. +% \begin{macrocode} +\newcommand*\@HwM@overprint@rel[2]{% + \mathrel{\mathpalette \@HwM@oooalign {#1\cr#2}}% +} +% \end{macrocode} +% \end{macro} +% +% The \packlass{\amsmath} package secures away, under the name "\std@minus", +% the original "\mathcode" of the \texttt{-}~character; it does so because +% this "\mathcode" is redefined when typesetting operator names +% (see~\cite{bib:diffs-m}, near the end of the ``Changes in amsmath~2.0 +% [November 1999]''), and this would cause an extensible arrow, that happened +% to be used inside an operator name, as in +% \begin{verbatim}\DeclareMathOperator{\test}{\underleftrightarrow{test}}\end{verbatim} +% to come out wrong. The saved "\mathcode" is used later in the "\relbar" +% macro. Since we use are using "\relbar" for our brooms too, for some while +% we've been concerned that other symbols we are going to employ could ``get +% out of synch'', as it were, with what "\relbar" would yield. This had +% initially led us to adopt the following, ``paranoid'' approach: +% \begin{verbatim}\def\do#1#2{\@ifdefinable#1{\mathchardef#1=\mathcode`#2\relax}} +%\do \@HwM@std@greater > +%\do \@HwM@std@less < +%\def\do#1#2\@ifdefinable#1{\let #1=#2} +%\do \@HwM@std@in \in +%\do \@HwM@std@ni \ni +%\AtBeginDocument{% +% \mathchardef \@HwM@std@greater \mathcode`>\relax +% \mathchardef \@HwM@std@less \mathcode`<\relax +% \let \@HwM@std@in = \in +% \let \@HwM@std@ni = \ni +%} +%\newcommand*\@HwM@rightbroomtail{% +% \@HwM@overprint@rel \std@minus \@HwM@std@greater +%} +%\newcommand*\@HwM@leftbroomtail{% +% \@HwM@overprint@rel \std@minus \@HwM@std@less +%} +%\newcommand*\@HwM@rightpforktail{\mathrel\@HwM@std@ni} +%\newcommand*\@HwM@leftpforktail {\mathrel\@HwM@std@in}\end{verbatim} +% Note that the definition of "\in" and~"\ni" was secured away too (and saved +% again at "\begin{document}"!\@), and not even I~can tell what was the +% reasoning behind that: being \TeXtok{mathchardef token}'s by their own, +% "\in" and~"\ni" needn't be saved as such; admittedly, there had been no +% reasoning at all! The redundant "\mathrel" in the definition of +% "\@HwM@rightpforktail" and "\@HwM@leftpforktail" deserves special mention +% as well; but we find the same redundancy in the definition of "\Relbar", +% not only in \packlass{\amsmath}, but also back in Knuth's coding of the +% \texttt{plain} format. +% +% Later on, paranoia was lowered to what could even be deemed a sensible +% level; indeed, storing away the "\mathcode" of~\texttt{<}/\texttt{>} is +% closely similar to what the \packlass{\amsmath} package does when it +% defines "\std@equal". +% \begin{verbatim}\def\do#1#2{\@ifdefinable#1{\mathchardef#1=\mathcode`#2\relax}} +%\do \@HwM@std@greater > +%\do \@HwM@std@less < +%\AtBeginDocument{% +% \mathchardef \@HwM@std@greater \mathcode`>\relax +% \mathchardef \@HwM@std@less \mathcode`<\relax +%} +%\newcommand*\@HwM@rightbroomtail{% +% \@HwM@overprint@rel \std@minus \@HwM@std@greater +%} +%\newcommand*\@HwM@leftbroomtail{% +% \@HwM@overprint@rel \std@minus \@HwM@std@less +%} +%\newcommand*\@HwM@rightpforktail{\mathrel\ni} +%\newcommand*\@HwM@leftpforktail {\mathrel\in}\end{verbatim} +% However, this code retains the fundamental drawback that affected the +% previous version as well: it will break down with engines that use Unicode +% math. Of course, it would be easy to cater for this too, but the point is +% that\ldots\ well, there's no point in all this "\mathcode" securement in +% the first place: OK\@, it is necessary to provide it for the~\texttt{-} +% character, which can denote two different symbols (minus and hyphen), taken +% from two different fonts, but neither for \texttt{<} or~\texttt{>}, nor, +% for that matter, for~\texttt{=}. So, in the end we decided simply to keep +% the symbolic names for the ``broom tail'' symbols, so that they serve as +% hooks, should we ever need to take a different course of action in the +% future, but to specify \texttt{<} and~\texttt{>} as literals, at least for +% now. +% +% \begin{macro}{\@HwM@rightbroomtail} +% The representation of the brush in the ``new'' brooms; version for brooms +% that point to the right. +% \begin{macrocode} +\newcommand*\@HwM@rightbroomtail{\@HwM@overprint@rel \std@minus >} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@leftbroomtail} +% As above, but for brooms that point to the left. +% \begin{macrocode} +\newcommand*\@HwM@leftbroomtail {\@HwM@overprint@rel \std@minus <} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@rightpforktail} +% Similar hook, but for pitchforks, pointing to the right. +% \begin{macrocode} +\newcommand*\@HwM@rightpforktail{\mathrel\ni} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@leftpforktail} +% For pitchforks pointing to the left. +% \begin{macrocode} +\newcommand*\@HwM@leftpforktail {\mathrel\in} +% \end{macrocode} +% \end{macro} +% +% Note again that, in the last two macros, we retained the redundant +% "\mathrel", exactly as Knuth and the authors of \packlass{\amsmath} did in +% the definition of "\Relbar": indeed, in order for "\joinrel" to work +% properly, it is essential that the symbols it acts on behave as relations, +% while, on the other hand, as remote as it might seem, there is always the +% possibility that the final user has redefined the r\^{o}le of "\in"/"ni". +% (Or, at least, this the tale I~recount to myself\ldots) +% +% For the above discussion about "\std@minus", I~have to thank again the +% people at \href{https://tex.stackexchange.com/}{\TeXSXAbbrev}, who provided +% me with the necessary insight into the matter: see~\cite{bib:std}. +% +% \subsubsection{Helper macros for the extensible symbols} +% \label{sS:ExtensHelper} +% +% This subsection contains some utility macros that help typeset certain +% extensible components, like broomsticks, swishes of ghosts, and so on. +% Such components are implemented by means of the "\leaders" primitive, or of +% a variant thereof. +% +% \begin{macro}{\@HwM@arrowfill@skip} +% Instead of relying on temporaries, we reserve a "\skip" register +% specifically devoted to holding the skip for the "\leaders". +% \begin{macrocode} \newlength\@HwM@arrowfill@skip % \end{macrocode} +% \end{macro} % % \begin{macro}{\@HwM@auto@font@selector} -% Suppose you have \meta{something} (\emph{e.g.}, a macro token) that expects -% to be followed by a pair \meta{style selector}\meta{font selector}, where +% Suppose you have \meta{something} (\eg a macro token) that expects to be +% followed by a pair \meta{style selector}\meta{font selector}, where % \meta{style selctor} is a single token like "\displaystyle" or % "\scriptscriptstyle", and \meta{font selector} is a single token like % "\textfont" or "\scriptfont"; then @@ -1685,56 +4102,105 @@ % \begin{flushleft} % \meta{something}\meta{style selector}\meta{font selector} % \end{flushleft} -% where \meta{style selector} is the same style selector as the one that was +% where \meta{style selector} is the same selector as the one that was % originally present, and \meta{font selector} is the correct font selector -% associated with it (that is, "\textfont" for "\displaystyle" and -% "\textstyle", and so on). For example, +% that is associated with it (namely, "\textfont" for "\displaystyle" and +% "\textstyle", "\scriptfont" for "\scriptstyle", and "\scriptscriptfont" for +% "\scriptscriptstyle"). For example, % \begin{flushleft} -% "\@HwM@auto@font@selector{"\meta{something}"}\scriptstyle" +% "\@HwM@auto@font@selector{"\meta{something}"}\displaystyle" % \end{flushleft} % is transformed into % \begin{flushleft} -% \meta{something}"\scriptstyle\scriptfont" +% \meta{something}"\displaystyle\textfont" % \end{flushleft} % In other words, prepending \meta{something} with "\@HwM@auto@font@selector" % turns it from something that requires the two arguments \meta{style % selector}\meta{font selector} into something else that takes just the % single argument \meta{style selector}: the appropriate \meta{font selector} % will be automatically supplied (whence the name of this macro). -% \textbf{Beware:} the following is a simple implementation that relies on +% In version~0.01 of this package, this macro was implemented as shown here: +% \begin{verbatim}\newcommand*\@HwM@auto@font@selector[2]{% +% \def\@tempa{#1}% +% \edef\@tempb{% +% \ifx\displaystyle #2% +% \textfont +% \else \ifx\textstyle #2% +% \textfont +% \else \ifx\scriptstyle #2% +% \scriptfont +% \else \ifx\scriptscriptstyle #2% +% \scriptscriptfont +% \fi\fi\fi\fi +% }% +% \expandafter \@tempa \expandafter #2\@tempb +%}\end{verbatim} +% But in this version, the multiple-choice conditional has been simplified as +% follows. +% \textbf{Beware:} this is still a simple implementation that relies on % assignments and that is therefore \emph{not} purely expandable. % \begin{macrocode} \newcommand*\@HwM@auto@font@selector[2]{% \def\@tempa{#1}% \edef\@tempb{% - \ifx\displaystyle #2% - \textfont - \else \ifx\textstyle #2% - \textfont + \ifx\scriptscriptstyle #2% + \scriptscriptfont \else \ifx\scriptstyle #2% \scriptfont - \else \ifx\scriptscriptstyle #2% - \scriptscriptfont - \fi\fi\fi\fi + \else + \textfont + \fi\fi }% \expandafter \@tempa \expandafter #2\@tempb } % \end{macrocode} % \end{macro} % -% \textbf{Uncommented code} again. +% \begin{macro}{\@HwM@extended@arrowfill@} +% This macro is loosely similar to the "\arrowfill@" macro found in the +% \packlass{\amsmath} package, though its functionality is extended so as to +% satisfy our needs. Basically, it invokes a caller-supplied (pseudo-)macro +% that typeset the "\leaders", passing to it the appropriate value for +% "\@HwM@arrowfill@skip". Arguments: +% \begin{paramlist} +% \param +% the "\leaders" (pseudo-)macro (its arguments are specified below);\\ +% \param +% the minimal width, expressed as a multiple of 18~math units. +% \end{paramlist} +% Arguments of the caller-supplied (pseudo-)macro: +% \begin{paramlist} +% \param +% style selector (\eg "\displaystyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} % \begin{macrocode} \newcommand*\@HwM@extended@arrowfill@[2]{% - % #1 is the "leaders" (pseudo-)macro (must gobble 2 arguments) - % #2 is the minimal width in math units \@HwM@auto@font@selector {\@HwM@stylefont@arrowfill{#1}{#2}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@stylefont@arrowfill} +% This is, in a sense, the ``internal'' version of the above macro, that is, +% the version that ought to be called \emph{after} the process of argument +% doubling implemented by "\@HwM@auto@font@selector" has taken place (see the +% description of that macro for details). Note that the name of this macro +% does \emph{not} end in an~\texttt{@}. Arguments: +% \begin{paramlist} +% \param +% the "\leaders" (pseudo-)macro (having the same 2~arguments as above);\\ +% \param +% the minimal width, expressed as a multiple of 18~math units;\\ +% \param +% style selector (\eg "\displaystyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@stylefont@arrowfill[4]{% - % #1 is the "leaders" (pseudo-)macro (must gobble 2 arguments) - % #2 is the minimal width in math units - % #3 is style selector (e.g., "\displaystyle") - % #4 is font selector (e.g., "\textfont") $\m@th \thickmuskip 0mu% \medmuskip \thickmuskip @@ -1745,49 +4211,194 @@ #1#3#4% $% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@enriched@arrowfill@} +% This macro provides an ``enriched'' version of the "\arrowfill@" macro, +% that invokes two additional macros, supplied by the caller, one before and +% one after "\cleaders"; these macros can insert additional stretchable +% material. In practice, this is used, below, to add the black cat on the +% broomstick. Note that, here, the ``"\leaders" pseudo-macro'' is +% ``"\HwM@arrowfill@cleaders{#1}{#2}{#3}{#4}{#5}"''. +% +% The arguments for this macro are as follows: +% \begin{tightitemize} +% \item +% \#1, \#2, and~\#3 are the three characters that would be used by +% "\arrowfill@" for the "\cleaders" (resp.: left, repeatable, right); +% \item +% \#4 and~\#5 are the two additional macros (resp.: left of "\cleaders", +% right of "\cleaders"); +% \item +% those argument must be followed, in the calling code, by the argument +% that holds the minimal size of the extensible symbol. +% \end{tightitemize} +% The arguments of the two ``additional macros'' are as follows: +% \begin{paramlist} +% \param +% style selector (\eg "\displaystyle");\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@enriched@arrowfill@[5]{% - % #1, #2, and #3 are the three characters - % #4 and #5 are the two additional macros (both with 2 arguments) - % its call must be followed by the argument for the minimal width \@HwM@extended@arrowfill@ {\HwM@arrowfill@cleaders{#1}{#2}{#3}{#4}{#5}}% } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HwM@arrowfill@cleaders} +% The arguments for this macro are as follows: +% \begin{tightitemize} +% \item +% \#1, \#2, and~\#3 are the three characters, as above; +% \item +% \#4 and~\#5 are the two additional macros, as above; +% \item +% \( \mbox{\#6} \leftarrow \mbox{style sel.} \) +% (\eg "\displaystyle"), +% \( \mbox{\#7} \leftarrow \mbox{font sel.} \) +% (\eg "\textfont"). +% \end{tightitemize} +% \begin{macrocode} \newcommand*\HwM@arrowfill@cleaders[7]{% - % #1, #2, and #3 are the three characters - % #4 and #5 are the two additional macros (both with 2 arguments) - % #6 is style selector (e.g., "\displaystyle") - % #7 is font selector (e.g., "\textfont") #4#6#7% \relax #1\mkern-7mu% \cleaders\hbox{$#6\mkern-2mu#2\mkern-2mu$}\hskip\@HwM@arrowfill@skip \mkern-7mu#3\relax #5#6#7% } +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Macros for extensible symbols (brooms, ghosts,~\ldots)} +% +% \begin{macro}{\@HwM@rightbroomfill@Wwac@} +% This macro should be thought of as an analog of \packlass{\amsmath}'s +% "\rightarrowfill@": it takes no arguments and yields an extensible broom +% complete with witch and, if appropriate, cat, both facing toward the right. +% For this macro only, we choose to include extensive comments, that +% exemplify how the macros defined in the +% \hyperref[sS:ExtensHelper]{preceding subsection} can be utilized. +% \begin{macrocode} \newcommand*\@HwM@rightbroomfill@Wwac@{% +% \end{macrocode} +% Set up the right-facing direction: +% \begin{macrocode} \@HwM@set@right@dir - \@HwM@enriched@arrowfill@ \ni\relbar\relbar +% \end{macrocode} +% Have "\@HwM@enriched@arrowfill@" (assemble and) supply the extensible +% broom. Recall that the first three arguments are the characters it is +% built from: +% \begin{macrocode} + \@HwM@enriched@arrowfill@ \@HwM@rightbroomtail\relbar\relbar +% \end{macrocode} +% The first additional macro (left of "\cleaders") does nothing, +% yet it must gobble two arguments: +% \begin{macrocode} + \@gobbletwo +% \end{macrocode} +% The second additional macro adds the witch, and possibly the cat, to the +% right of the "\cleaders", and is defined below: +% \begin{macrocode} + \@HwM@right@add@witch@cat +% \end{macrocode} +% The minimal size of the extensible broom (1~chunk of 18\,mu =~18\,mu): +% \begin{macrocode} + \@ne +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@rightpitchfill@Wwac@} +% Like "\@HwM@rightbroomfill@Wwac@", but yields an extensible pitchfork. +% \begin{macrocode} +\newcommand*\@HwM@rightpitchfill@Wwac@{% + \@HwM@set@right@dir + \@HwM@enriched@arrowfill@ \@HwM@rightpforktail\relbar\relbar \@gobbletwo \@HwM@right@add@witch@cat \@ne } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@right@add@witch@cat} +% Adds the witch and possibly the cat. Arguments: +% \begin{paramlist} +% \param +% style selector (\eg "\displaystyle"), ignored;\\ +% \param +% font selector (\eg "\textfont"). +% \end{paramlist} +% \begin{macrocode} \newcommand*\@HwM@right@add@witch@cat[2]{% +% \end{macrocode} +% First backspace by half of the width of the extensible symbol\ldots +% \begin{macrocode} \hskip -\glueexpr \@HwM@arrowfill@skip/\tw@ \relax +% \end{macrocode} +% \ldots then typeset the witch. +% \begin{macrocode} \@HwM@Small@Witch@Wo@Broom #2% +% \end{macrocode} +% If the cat has also been requested\ldots +% \begin{macrocode} \if@HwM@cat@ +% \end{macrocode} +% \ldots then move forward by $1/4$~of the width\ldots +% \begin{macrocode} \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax +% \end{macrocode} +% \ldots typeset the cat\ldots +% \begin{macrocode} \@HwM@Small@Cat@On@Hori@Broom #2% +% \end{macrocode} +% \ldots then move forward by another $1/4$~of the width. +% \begin{macrocode} \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax +% \end{macrocode} +% Otherwise, just move forward by $1/2$~of the width, thus canceling the +% previous backspace. +% \begin{macrocode} \else \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ \relax \fi -}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@leftbroomfill@Wwac@} +% Like "\@HwM@rightbroomfill@Wwac@", but facing to the left. +% \begin{macrocode} \newcommand*\@HwM@leftbroomfill@Wwac@{% \@HwM@set@left@dir - \@HwM@enriched@arrowfill@ \relbar\relbar\in + \@HwM@enriched@arrowfill@ \relbar\relbar\@HwM@leftbroomtail + \@HwM@left@add@witch@cat + \@gobbletwo + \@ne +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@leftpitchfill@Wwac@} +% Like "\@HwM@rightpitchfill@Wwac@", but facing to the left. +% \begin{macrocode} +\newcommand*\@HwM@leftpitchfill@Wwac@{% + \@HwM@set@left@dir + \@HwM@enriched@arrowfill@ \relbar\relbar\@HwM@leftpforktail \@HwM@left@add@witch@cat \@gobbletwo \@ne } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@left@add@witch@cat[} +% Similar to "\@HwM@right@add@witch@cat". +% \begin{macrocode} \newcommand*\@HwM@left@add@witch@cat[2]{% \if@HwM@cat@ \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax @@ -1799,9 +4410,15 @@ \@HwM@Small@Witch@Wo@Broom #2% \hskip -\glueexpr \@HwM@arrowfill@skip/\tw@ \relax } +% \end{macrocode} +% \end{macro} +% +% \textbf{Uncommented code} starts here. +% \begin{macrocode} + \newcommand*\@HwM@init@swish@dimens[1]{% \dimen4 \glueexpr \fontdimen 22 #1\tw@ *\tw@/\thr@@ - \dimen6 .25\@HwM@thickness@units@for #1% + \dimen6 .\@HwM@if@bold@math{333333}{25}\@HwM@thickness@units@for #1% \dimen@ \dimen4 \@HwM@calc@swish@thickness } @@ -1812,8 +4429,11 @@ \newcommand*\@HwM@swish@leaders{% \leaders \hrule \@height\dimen@ \@depth\dimen@ii \hskip } -\newcommand*\@HwM@right@ghost@swish[2]{% - \@HwM@init@swish@dimens #2% +\newcommand*\@HwM@right@swish[3]{% + % #1 := swishing subform. (e.g., "\mkern 1.5mu\relax \mathrightbat") + % #2 := style selector (e.g., "\displaystyle") + % #3 := font selector (e.g., "\textfont") + \@HwM@init@swish@dimens #3% \hskip \glueexpr \@HwM@arrowfill@skip/4\relax \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/4\relax \hskip \glueexpr \@HwM@arrowfill@skip/8\relax @@ -1831,11 +4451,14 @@ \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax \kern -\dimen4 - \mathrightghost + #1% } -\newcommand*\@HwM@left@ghost@swish[2]{% - \mathleftghost - \@HwM@init@swish@dimens #2% +\newcommand*\@HwM@left@swish[3]{% + % #1 := swishing subformula (e.g., "\mathleftbat \mkern 1.5mu\relax") + % #2 := style selector (e.g., "\displaystyle") + % #3 := font selector (e.g., "\textfont") + #1% + \@HwM@init@swish@dimens #3% \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/8\relax \hskip \glueexpr \@HwM@arrowfill@skip/8\relax \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/4\relax @@ -1854,13 +4477,33 @@ \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax } \newcommand*\@HwM@rightghostfill@{% - \@HwM@extended@arrowfill@ \@HwM@right@ghost@swish {.5}% + \@HwM@extended@arrowfill@ {\@HwM@right@swish \mathrightghost}{.5}% } \newcommand*\@HwM@leftghostfill@{% - \@HwM@extended@arrowfill@ \@HwM@left@ghost@swish {.5}% + \@HwM@extended@arrowfill@ {\@HwM@left@swish \mathleftghost}{.5}% +} +\newcommand*\@HwM@rightbatfill@{% + \@HwM@extended@arrowfill@ + {\@HwM@right@swish{\mkern 1.5mu\relax \mathrightbat}}{.5}% +} +\newcommand*\@HwM@leftbatfill@{% + \@HwM@extended@arrowfill@ + {\@HwM@left@swish{\mathleftbat \mkern 1.5mu\relax}}{.5}% +} + +\newcommand*\@HwM@rightbroomfill@{% + \arrowfill@ \@HwM@rightbroomtail\relbar\relbar +} +\newcommand*\@HwM@leftbroomfill@{% + \arrowfill@ \relbar\relbar\@HwM@leftbroomtail +} +\newcommand*\@HwM@rightpitchfill@{% + \arrowfill@ \@HwM@rightpforktail\relbar\relbar +} +\newcommand*\@HwM@leftpitchfill@{% + \arrowfill@ \relbar\relbar\@HwM@leftpforktail } -% three versions of "\mathpalette" adapted to our needs: \newcommand*\@HwM@dblstyle@mathpalette[2]{% % Works like "\mathpalette", but macro passed in #1 must take % (at least) three arguments, of which the first _two_ are @@ -1886,7 +4529,6 @@ {#1\scriptscriptstyle \scriptscriptfont}% } -% General calls: \newcommand*\@HwM@general@large@operator[2]{% \mathop{% \@HwM@variable@mathpalette{#1}{#2}% @@ -1913,8 +4555,6 @@ {\@HwM@cat@false #1}% } -% -% User-level commands: \newcommand*\mathwitch{% \DOTSB \@HwM@set@right@dir @@ -1926,12 +4566,14 @@ \@HwM@ifstar@cat{\@HwM@mathwitch rl}% } \newcommand*\@HwM@mathwitch[2]{% - \@HwM@general@large@operator {\@HwM@Large@Witch #1#2}\@HwM@Small@Witch + \@HwM@general@large@operator + {\@HwM@Large@Witch #1#2}% + \@HwM@Small@Witch } \newcommand*\pumpkin{% \DOTSB - \@HwM@general@binary@operation \@HwM@Oplus@Pumpkin + \@HwM@general@binary@operation \@HwM@Binop@Pumpkin } \newcommand*\bigpumpkin{% \DOTSB @@ -1939,6 +4581,15 @@ } \@ifdefinable\greatpumpkin{\let\greatpumpkin=\bigpumpkin} +\newcommand*\skull{% + \DOTSB + \@HwM@general@binary@operation \@HwM@Binop@Skull +} +\newcommand*\bigskull{% + \DOTSB + \@HwM@general@large@operator \@HwM@Large@Skull \@HwM@Small@Skull +} + \newcommand*\mathcloud {\@HwM@set@right@dir \@HwM@mathcloud} \newcommand*\reversemathcloud{\@HwM@set@left@dir \@HwM@mathcloud} \newcommand*\@HwM@mathcloud{% @@ -1953,8 +4604,16 @@ \newcommand*\@HwM@mathghost{% \@HwM@general@ordinary@symbol \@HwM@Asymmetric@Ghost } -% -% Accents. + +\newcommand*\mathbat{% + \@HwM@general@ordinary@symbol \@HwM@Symmetric@Bat +} +\newcommand*\mathrightbat{\@HwM@set@right@dir \@HwM@mathbat} +\newcommand*\mathleftbat {\@HwM@set@left@dir \@HwM@mathbat} +\newcommand*\@HwM@mathbat{% + \@HwM@general@ordinary@symbol \@HwM@Asymmetric@Bat +} + \newcommand*\@HwM@dblstyle@overarrow@[4]{% % #1 := stretchable covering arrow % #2 := base style @@ -1988,6 +4647,14 @@ \@HwM@general@ou@w@cat {\@HwM@dblstyle@overarrow@ \@HwM@leftbroomfill@Wwac@}% } +\newcommand*\overrightwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@rightpitchfill@Wwac@}% +} +\newcommand*\overleftwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@leftpitchfill@Wwac@}% +} \newcommand*\overrightswishingghost{% \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@overarrow@ \@HwM@rightghostfill@}% @@ -1996,6 +4663,14 @@ \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@overarrow@ \@HwM@leftghostfill@}% } +\newcommand*\overrightflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightbatfill@}% +} +\newcommand*\overleftflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftbatfill@}% +} \newcommand*\underrightwitchonbroom{% \@HwM@general@ou@w@cat {\@HwM@dblstyle@underarrow@ \@HwM@rightbroomfill@Wwac@}% @@ -2004,6 +4679,14 @@ \@HwM@general@ou@w@cat {\@HwM@dblstyle@underarrow@ \@HwM@leftbroomfill@Wwac@}% } +\newcommand*\underrightwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@rightpitchfill@Wwac@}% +} +\newcommand*\underleftwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@leftpitchfill@Wwac@}% +} \newcommand*\underrightswishingghost{% \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@underarrow@ \@HwM@rightghostfill@}% @@ -2012,8 +4695,70 @@ \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@underarrow@ \@HwM@leftghostfill@}% } -% -% The script version of standard over/under arrows. +\newcommand*\underrightflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightbatfill@}% +} +\newcommand*\underleftflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftbatfill@}% +} +\newcommand*\overrightbroom{% + \mathpalette{\overarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\overleftbroom{% + \mathpalette{\overarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\overrightpitchfork{% + \mathpalette{\overarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\overleftpitchfork{% + \mathpalette{\overarrow@ \@HwM@leftpitchfill@}% +} +\newcommand*\underrightbroom{% + \mathpalette{\underarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\underleftbroom{% + \mathpalette{\underarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\underrightpitchfork{% + \mathpalette{\underarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\underleftpitchfork{% + \mathpalette{\underarrow@ \@HwM@leftpitchfill@}% +} +\newcommand*\overscriptrightbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\overscriptleftbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\overscriptrightpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\overscriptleftpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftpitchfill@}% +} +\newcommand*\underscriptrightbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\underscriptleftbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\underscriptrightpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\underscriptleftpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftpitchfill@}% +} \newcommand*\overscriptrightarrow{% \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@overarrow@ \rightarrowfill@}% @@ -2038,8 +4783,41 @@ \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@underarrow@ \leftrightarrowfill@}% } -% -% Extensible "arrow-like" symbols. + +\newcommand*\@HwM@make@arrowfill@like[3]{% + % #1 := base symbol, which expects as its own arguments + % - #1, a style selector (e.g., "\scriptstyle") + % - #2, a font selector (e.g., "\scriptfont") + % #2 := centering method, either "\hfil" or "\hidewidth" + % #3 := style selector (e.g., "\scriptstyle") + #2% + \@HwM@auto@font@selector{#1}#3% braces around #1 are for robustness + #2% +} +\newcommand*\@HwM@over@under@bat[2]{% + % #1 := "\@HwM@dblstyle@overarrow@" | "\@HwM@dblstyle@underarrow@" + % #2 := "\hfil" | "\hidewidth" + \@HwM@dblstyle@mathpalette{% + #1{% + \@HwM@make@arrowfill@like \@HwM@Symmetric@Bat #2% + }% + }% +} +\newcommand*\overbat{% + \@ifstar{% + \@HwM@over@under@bat \@HwM@dblstyle@overarrow@ \hfil + }{% + \@HwM@over@under@bat \@HwM@dblstyle@overarrow@ \hidewidth + }% +} +\newcommand*\underbat{% + \@ifstar{% + \@HwM@over@under@bat \@HwM@dblstyle@underarrow@ \hfil + }{% + \@HwM@over@under@bat \@HwM@dblstyle@underarrow@ \hidewidth + }% +} + \newcommand*\@HwM@ext@arrow@w@cat[5]{% \def\@HwM@tempa{\ext@arrow {#1}{#2}{#3}{#4}{#5}}% \@HwM@ifstar@cat{\@HwM@ext@arrow@w@cat@x}% @@ -2048,10 +4826,16 @@ \@HwM@tempa {#1}{#2}% } \newcommand*\xrightwitchonbroom{% - \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@Wwac@% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@Wwac@ } \newcommand*\xleftwitchonbroom{% - \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@Wwac@% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@Wwac@ +} +\newcommand*\xrightwitchonpitchfork{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightpitchfill@Wwac@ +} +\newcommand*\xleftwitchonpitchfork{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftpitchfill@Wwac@ } \newcommand*\xrightswishingghost[2][]{% \ext@arrow 3{12}5{15}\@HwM@rightghostfill@{#1}{#2}% @@ -2059,6 +4843,62 @@ \newcommand*\xleftswishingghost[2][]{% \ext@arrow {12}3{15}5\@HwM@leftghostfill@{#1}{#2}% } +\newcommand*\xrightflutteringbat[2][]{% + \ext@arrow 0055\@HwM@rightbatfill@{#1}{#2}% +} +\newcommand*\xleftflutteringbat[2][]{% + \ext@arrow 0055\@HwM@leftbatfill@{#1}{#2}% +} +\newcommand*\xrightbroom{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@ +} +\newcommand*\xleftbroom{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@ +} +\newcommand*\xrightpitchfork{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightpitchfill@ +} +\newcommand*\xleftpitchfork{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftpitchfill@ +} + +\newcommand*\@HwM@tighter@joinrel{% + \mathrel{\mkern-6.5mu}% +} +\newcommand*\rightbroom{% + \DOTSB + \protect\@HwM@rightbroomtail + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar +} +\newcommand*\leftbroom{% + \DOTSB + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\@HwM@leftbroomtail +} +\newcommand*\hmrightpitchfork{% + \DOTSB + \protect\@HwM@rightpforktail + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar +} +\newcommand*\hmleftpitchfork{% + \DOTSB + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\@HwM@leftpforktail +} + +\let \do = \noexpand % \end{macrocode} % % End of the module for the \packlass{\halloweenmath} package. diff --git a/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins index 98ed0480772..1a369c8a792 100644 --- a/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins +++ b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins @@ -25,7 +25,7 @@ % only part of the Work" in the sense of the LaTeX Project Public % License, and should be avoided. % -% January 6, 2017 (vers. 0.01) +% April 16, 2017 (vers. 0.10) % \input docstrip @@ -91,6 +91,8 @@ \fi % of \ifx \usedir\alt@usedir +\catcode`\@ = 12 + \Msg{} \ifWritingToDirectoryOfTDS @@ -139,7 +141,7 @@ Note that the distribution of this file alone is "distribution of only part of the Work" in the sense of the LaTeX Project Public License, and should be avoided. -January 6, 2017 (vers. 0.01) +April 16, 2017 (vers. 0.10) \endpreamble diff --git a/Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty b/Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty index b54bf49c475..09633c6c8ca 100644 --- a/Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty +++ b/Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty @@ -31,7 +31,7 @@ %% only part of the Work" in the sense of the LaTeX Project Public %% License, and should be avoided. %% -%% January 6, 2017 (vers. 0.01) +%% April 16, 2017 (vers. 0.10) %% %% \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 @@ -50,7 +50,48 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e}[2004/06/01] % LaTeX2e is required! \ProvidesPackage{halloweenmath} - [2017/01/06 v0.01 (development)] + [2017/04/16 v0.10 (development)] +\newcommand*\@HwM@say@BOO{% + \begingroup + \escapechar \m@ne + \def~{\string\\}% + \def\-{\space\space}% + \def\+{\space\space\space\space}% + \def\={\+\+\+\+}% + \def\*{****}% + \typeout{}% + \typeout{\+ _-==-_ \+ /~/~/~}% + \typeout{\+|\-\-\-|\+< BOO! >\+\+\+\today...}% + \typeout{\+|(.)(.)|\+/~/~/~/}% + \typeout{\++--/~--+\- /\=\*\*\*\*\*\*\*}% + \typeout{\+ [::::] __/ \= ... This is HALLOWEENMATH!}% + \typeout{\+\-----\-\+\=\*\*\*\*\*\*\*}% + \typeout{}% + \endgroup +} +\newcommand*\@HwM@opt@say@BOO{} +\DeclareOption{silent}{% + \let \@HwM@opt@say@BOO \@empty +} +\DeclareOption{boo}{% + \let \@HwM@opt@say@BOO \@HwM@say@BOO +} +\DeclareOption{boo-10-31}{% + \ifnum\month=10 + \ifnum\day=31 + \let \@HwM@opt@say@BOO \@HwM@say@BOO + \else + \let \@HwM@opt@say@BOO \@empty + \fi + \else + \let \@HwM@opt@say@BOO \@empty + \fi +} +\ExecuteOptions{boo-10-31} +\ProcessOptions\relax +\@HwM@opt@say@BOO +\let \@HwM@say@BOO = \@undefined +\let \@HwM@opt@say@BOO = \@undefined \RequirePackage{amsmath,pict2e} \@ifdefinable\@HwM@tempa{} \newcommand*\@HwM@thickness@units@for[1]{\fontdimen 8 #1\thr@@} @@ -75,6 +116,9 @@ }{\endpicture} \newcommand*\@HwM@short@circuited@vphant{\v@true\h@false\mathph@nt} \newcommand*\@HwM@oplus@strut[1]{% + \@HwM@short@circuited@vphant #1\oplus +} +\newcommand*\@HwM@bigoplus@strut[1]{% \@HwM@short@circuited@vphant #1\bigoplus@ } \newcommand*\@HwM@d@pict@strut[1]{% @@ -88,14 +132,18 @@ \@HwM@math@picture{3}{-1}{\@HwM@d@pict@strut\@ne}% } \let\end@HwM@small@picture = \end@HwM@math@picture +\newcommand*\@HwM@bigop@picture[1]{% + \@HwM@math@picture{0}{-1}{\@HwM@bigoplus@strut #1}% +} +\let\end@HwM@bigop@picture = \end@HwM@math@picture \newcommand*\@HwM@oplus@picture[1]{% \@HwM@math@picture{0}{-1}{\@HwM@oplus@strut #1}% } \let\end@HwM@oplus@picture = \end@HwM@math@picture \@ifdefinable\if@HwM@cat@{\newif\if@HwM@cat@} +\newcommand*\@HwM@bold@version@name{bold} \newcommand*\@HwM@if@bold@math{% - \def\@tempa{bold}% - \ifx\math@version\@tempa + \ifx\math@version\@HwM@bold@version@name \expandafter\@firstoftwo \else \expandafter\@secondoftwo @@ -140,8 +188,8 @@ (0,-.6)(\+1.4,-.6)(\+1.8,-.4)(\+2,0)(0,0)% (0,1.4)% \polygon*(\-3,2)(\-2.8,3)(\-2,4)(\-1.5,4.1)(\-1,4)(0,3.5)% - (\+1,3.8)(\+2.5,3.5)(\+3,3.3)(\+2,3.4)(0,3)(\-1,2)(\-2,1.6)% - (\-2.7,2)(\-2,2)(\-1,3)(\-2,3.5)(\-2.6,3)% + (\+1,3.8)(\+2.5,3.5)(\+3,3.3)(\+2,3.4)(0,3)(\-1,2)% + (\-2,1.6)(\-2.7,2)(\-2,2)(\-1,3)(\-2,3.5)(\-2.6,3)% \buttcap \Line(\+.2,2.8)(\+.6,3)% \linethickness{#5\p@}% @@ -193,7 +241,8 @@ \put(\+1.8,.5){\circle*{.6}}% \put(\+2.1,.7){\circle*{.5}}% \put(\+2.25,1){\circle*{.4}}% - \polygon*(\+2.05,1)(\+2.05,1.25)(\+2.25,1.1)(\+2.45,1.25)(\+2.45,1)% + \polygon*(\+2.05,1)(\+2.05,1.25)(\+2.25,1.1)(\+2.45,1.25) + (\+2.45,1)% \cbezier(\+1.8,.4)(\+1.2,.1)(\+2,-.1)(\+1.4,-.4)% \fi } @@ -233,13 +282,11 @@ } \newcommand*\@HwM@large@pumpkin@mouth[9]{% \polygon*% - % lower lip: (-#1)(-#2)(-#3)(-#4)(0,#5)(#4)(#3)(#2)(#1)% - % upper lip: (#6)(#7)(#8)(0,#9)(-#8)(-#7)(-#6)% } \newcommand*\@HwM@large@pumpkin[1]{% - \begin{@HwM@oplus@picture}\displaystyle \textfont {7.5}{-3.75}% + \begin{@HwM@bigop@picture}\displaystyle \textfont {7.5}{-3.75}% \roundcap \linethickness{#1\@HwM@thickness@units@for \textfont}% \Line(-.15,2.25)(-.3,3)(.3,3)(.15,2.25)% @@ -251,7 +298,7 @@ {-1.5}% {1.2,-1.1}{.7,-1}{.45,-1.1}% {-1}% - \end{@HwM@oplus@picture}% + \end{@HwM@bigop@picture}% } \newcommand*\@HwM@Large@Pumpkin{% \@HwM@choose@thicknesses \@HwM@large@pumpkin @@ -265,13 +312,11 @@ } \newcommand*\@HwM@small@pumpkin@mouth[7]{% \polygon*% - % lower lip: (-#1)(-#2)(-#3)(0,#4)(#3)(#2)(#1)% - % upper lip: (#5)(#6)(0,#7)(-#6)(-#5)% } \newcommand*\@HwM@small@pumpkin[3]{% - \begin{@HwM@oplus@picture}#1#2{5}{-2.5}% + \begin{@HwM@bigop@picture}#1#2{5}{-2.5}% \roundcap \linethickness{#3\@HwM@thickness@units@for #2}% \Line(-.1,1.5)(-.15,2)(.15,2)(.1,1.5)% @@ -283,37 +328,237 @@ {-1}% {.7,-.6}{.4,-.5}% {-.7}% - \end{@HwM@oplus@picture}% + \end{@HwM@bigop@picture}% } \newcommand*\@HwM@Small@Pumpkin[2]{% \@HwM@choose@thicknesses{\@HwM@small@pumpkin #1#2}% {{}}% {{1.5}}% } -\newcommand*\@HwM@oplus@pumpkin@profile[1]{% +\newcommand*\@HwM@binop@pumpkin@profile[1]{% \cbezier(#1.1,1)(#11.2,1.7)(#11.6,.8)(#11.6,0)% \cbezier(#1.1,-1)(#11,-1.5)(#11.6,-.8)(#11.6,0)% \put(#1.6,.5){\circle*{.4}}% } -\newcommand*\@HwM@oplus@pumpkin[3]{% +\newcommand*\@HwM@binop@pumpkin[3]{% \begin{@HwM@oplus@picture}#1#2{3.6}{-1.8}% \roundcap \linethickness{#3\@HwM@thickness@units@for #2}% \Line(-.1,1)(-.15,1.4)(.15,1.4)(.1,1)% \Line(-.1,-1)(.1,-1)% - \@HwM@oplus@pumpkin@profile-% - \@HwM@oplus@pumpkin@profile+% + \@HwM@binop@pumpkin@profile-% + \@HwM@binop@pumpkin@profile+% \@HwM@small@pumpkin@mouth{1,-.1}{.7,-.5}{.4,-.4}% {-.7}% {.6,-.3}{.3,-.2}% {-.4}% \end{@HwM@oplus@picture}% } -\newcommand*\@HwM@Oplus@Pumpkin[2]{% - \@HwM@choose@thicknesses{\@HwM@oplus@pumpkin #1#2}% +\newcommand*\@HwM@Binop@Pumpkin[2]{% + \@HwM@choose@thicknesses{\@HwM@binop@pumpkin #1#2}% {{.6}}% {{1.2}}% } +\newcommand*\@HwM@large@skull@nose[9]{% + \moveto(0,-#1)% + \curveto(-#2,-#1)(-#3,-#1)(-#4,-#5)% + \curveto(-#6,-#7)(-#8,-#9)(0,-#9)% + \curveto(#8,-#9)(#6,-#7)(#4,-#5)% + \curveto(#3,-#1)(#2,-#1)(0,-#1)% + \fillpath +} +\newcommand*\@HwM@large@skull@profile[1]{% + \moveto(#1.3375,0)% + \curveto(#1.3375,.225)(#1.3375,.4725)(#1.9,.45)% + \curveto(#11.35,.4275)(#11.5525,.225)(#11.575,0)% + \curveto(#11.5975,-.225)(#11.35,-.675)(#11.125,-.675)% + \curveto(#1.9,-.675)(#1.3375,-.45)(#1.3375,0)% + \fillpath + \cbezier(#12,2)(#12.1,1.8)(#12.7,1.125)(#12.25,0)% + \moveto(#12.24,.1)% + \curveto(#12.3,-1)(#12,-1.2)(#11.5,-1.2)% + \curveto(#11.3,-1.2)(#11.125,-1.3)(#11.125,-1.5)% + \strokepath + \moveto(#11.875,-1.35)% + \curveto(#11.86,-1.8)(#11.8,-1.5)(#11.65,-1.95)% + \curveto(#11.5,-2.4)(#11.5,-2.75)(#11.2,-2.9)% + \curveto(#1.9,-3.05)(#11,-3.2)(#1.3,-3.1)% + \strokepath +} +\newcommand*\@HwM@large@skull@innerjaw[1]{% + \moveto(#11.5,-1.35)% + \curveto(#11.35,-1.5)(#11.5,-2.25)(#11.125,-2.25)% + \strokepath +} +\newcommand*\@HwM@large@skull@teeth[2]{% + \moveto(#1.75,-2.25)% + \curveto(#1.65,-2.5)(#1.55,-2.5)(#1.45,-2.3)% + \curveto(#1.35,-2.05)(#1.4,-2)(#1.6,-2)% + \curveto(#1.8,-2)(#1.8,-2.05)(#1.75,-2.25)% + \strokepath + \moveto(#1.35,-2.3)% + \curveto(#1.25,-2.6)(#1.1,-2.65)(#1.05,-2.3)% + \curveto(#1.05,-2.05)(0,-2.05)(#1.2,-2.05)% + \curveto(#1.4,-2.05)(#1.42,-2)(#1.35,-2.3)% + \strokepath + \moveto(#1.7,-1.6)% + \curveto(#1.6,-1.4)(#1.5,-1.4)(#1.45,-1.65)% + \curveto(#1.45,-1.85)(#1.4,-1.95)(#1.55,-1.95)% + \curveto(#1.85,-1.95)(#1.75,-1.75)(#1.7,-1.6)% + \strokepath + \moveto(#11.12,-1.6)% + \curveto(#11,-1.3)(#1.9,-1.3)(#1.75,-1.6)% + \curveto(#11,-3)(#11,-3)(#11.12,-1.5)% + \strokepath + \moveto(#1.4,-1.65)% + \curveto(#1.3,-1.4)(#1.1,-1.4)(#1.05,-1.7)% + \curveto(#1.05,-1.9)(#2.05,-2)(#1.225,-2)% + \curveto(#1.5,-2)(#1.45,-1.9)(#1.4,-1.65) + \strokepath +} +\newcommand*\@HwM@large@skull@brows[1]{% + \moveto(#1.8,.7)% + \curveto(#1.4,.7)(#1.4,.9)(#1.2,.7)% + \curveto(#1.1,.6)(#1.2,.4)(#1.2,.3)% + \strokepath + \cbezier(#11.3,.7)(#11.5,.7)(#11.5,.75)(#11.75,.5)% +} +\newcommand*\@HwM@large@skull[4]{% + \begin{@HwM@bigop@picture}\displaystyle \textfont {6}{-3}% + \roundcap + \linethickness{#3\@HwM@thickness@units@for \textfont}% + \@HwM@large@skull@teeth-+% + \@HwM@large@skull@teeth+-% + \linethickness{#1\@HwM@thickness@units@for \textfont}% + \@HwM@large@skull@nose + {1.125}{.1}{.5}{.3375}{.9}{.147}{.7}{.2}{.4}% + \cbezier(-2,2)(-1.25,3.5)(1.25,3.5)(2,2)% + \@HwM@large@skull@profile-% + \@HwM@large@skull@profile+% + \cbezier(-.3,-3.1)(0,-3)(0,-3)(.3,-3.1)% + \linethickness{#2\@HwM@thickness@units@for \textfont}% + \@HwM@large@skull@innerjaw-% + \@HwM@large@skull@innerjaw+% + \linethickness{#4\p@}% + \@HwM@large@skull@brows-% + \@HwM@large@skull@brows+% + \end{@HwM@bigop@picture}% +} +\newcommand*\@HwM@Large@Skull{% + \@HwM@choose@thicknesses \@HwM@large@skull + {{1.5}{.9}{.3}{.075}}% + {{2}{1.2}{.4}{.1}}% +} +\newcommand*\@HwM@small@skull@nose[8]{% + \moveto(0,-.#1)% + \curveto(-.#2,-.#1)(-.#3,-.#4)(-.#5,-.#6)% + \curveto(-.#7,-.#8)(.#7,-.#8)(.#5,-.#6)% + \curveto(.#3,-.#4)(.#2,-.#1)(0,-.#1)% + \fillpath +} +\newcommand*\@HwM@small@skull@profile[1]{% + \moveto(#1.225,0)% + \curveto(#1.225,.15)(#1.225,.315)(#1.6,.3)% + \curveto(#1.9,.285)(#11.035,.15)(#11.05,0)% + \curveto(#11.065,-.15)(#1.9,-.45)(#1.75,-.45)% + \curveto(#1.6,-.45)(#1.225,-.3)(#1.225,0)% + \fillpath + \cbezier(0,2)(#11.5,2)(#11.8,0.75)(#11.5,0)% + \cbezier(#11.5,0)(#11.575,-1.35)(#1.75,-.45)(#1.75,-1)% + \moveto(#11.25,-.9)% + \curveto(#11.24,-1.2)(#11.2,-1)(#11.1,-1.3)% + \curveto(#11,-1.6)(#11,-1.8)(#1.75,-1.9)% + \curveto(0,-2.1)(#1.3,-2)(0,-2)% + \strokepath +} +\newcommand*\@HwM@small@skull@innerjaw[1]{% + \moveto(#11,-.9)% + \curveto(#1.9,-1)(#11,-1.5)(#1.75,-1.5)% + \strokepath +} +\newcommand*\@HwM@small@skull@teeth[2]{% + \moveto(#1.5,-1.5)% + \curveto(#1.47,-1.65)(#1.35,-1.6)(#1.3,-1.55)% + \curveto(#1.15,-1.25)(#1.65,-1.25)(#1.5,-1.5)% + \strokepath + \moveto(#1.25,-1.55)% + \curveto(#1.2,-1.7)(#1.04,-1.7)(#1.03,-1.55)% + \curveto(#2.1,-1.3)(#1.35,-1.3)(#1.25,-1.55)% + \strokepath + \moveto(#1.45,-1)% + \curveto(#1.4,-.9)(#1.3,-.9)(#1.285,-1.05)% + \curveto(#1.2,-1.35)(#1.6,-1.35)(#1.45,-1)% + \strokepath + \moveto(#1.75,-1)% + \curveto(#1.65,-.9)(#1.6,-.9)(#1.5,-1)% + \curveto(#1.6,-2)(#1.7,-2)(#1.75,-1)% + \strokepath + \moveto(#1.25,-1.05)% + \curveto(#1.2,-.9)(#1.04,-.9)(#1.03,-1.05)% + \curveto(#2.08,-1.4)(#1.35,-1.4)(#1.25,-1.05)% + \strokepath +} +\newcommand*\@HwM@small@skull[5]{% + \begin{@HwM@bigop@picture}#1#2{3.48}{-1.74}% + \roundcap + \linethickness{#5\@HwM@thickness@units@for #2}% + \@HwM@small@skull@teeth-+% + \@HwM@small@skull@teeth+-% + \linethickness{#3\@HwM@thickness@units@for #2}% + \@HwM@small@skull@nose{75}{15}{3}{75}{225}{6}{15}{15}% + \@HwM@small@skull@profile-% + \@HwM@small@skull@profile+% + \linethickness{#4\@HwM@thickness@units@for #2}% + \@HwM@small@skull@innerjaw-% + \@HwM@small@skull@innerjaw+% + \end{@HwM@bigop@picture}% +} +\newcommand*\@HwM@Small@Skull[2]{% + \@HwM@choose@thicknesses{\@HwM@small@skull #1#2}% + {{}{.6}{.25}}% + {{1.333333}{.7}{.3}}% +} +\newcommand*\@HwM@binop@skull@profile[1]{% + \moveto(#1.15,0)% + \curveto(#1.15,.1)(#1.15,.21)(#1.4,.2)% + \curveto(#1.6,.19)(#1.69,.1)(#1.7,0)% + \curveto(#1.71,-.1)(#1.6,-.3)(#1.5,-.3)% + \curveto(#1.4,-.3)(#1.15,-.2)(#1.15,0)% + \fillpath + \cbezier(0,1.333336)(#11,1.333336)(#11.2,0.5)(#11,0)% + \cbezier(#11,0)(#11.05,-.9)(#1.5,-.3)(#1.5,-.65)% +} +\newcommand*\@HwM@binop@skull@teeth[2]{% + \moveto(#1.33,-.7)% + \curveto(#1.3,-.6)(#1.22,-.6)(#1.19,-.75)% + \curveto(#1.15,-.9)(#1.38,-.9)(#1.33,-.7)% + \strokepath + \moveto(#1.5,-.7)% + \curveto(#1.45,-.6)(#1.4,-.6)(#1.35,-.7)% + \curveto(#1.4,-1.2)(#1.5,-1.2)(#1.5,-.7)% + \strokepath + \moveto(#1.17,-.75)% + \curveto(#1.13,-.65)(#1.05,-.62)(#1.02,-.75)% + \curveto(#2.03,-.95)(#1.22,-.95)(#1.17,-.75)% + \strokepath +} +\newcommand*\@HwM@binop@skull[4]{% + \begin{@HwM@oplus@picture}#1#2{2.48}{-1.24}% + \roundcap + \linethickness{#4\@HwM@thickness@units@for #2}% + \@HwM@binop@skull@teeth-+% + \@HwM@binop@skull@teeth+-% + \linethickness{#3\@HwM@thickness@units@for #2}% + \@HwM@small@skull@nose{5}{1}{2}{5}{15}{4}{1}{1}% + \@HwM@binop@skull@profile-% + \@HwM@binop@skull@profile+% + \end{@HwM@oplus@picture}% +} +\newcommand*\@HwM@Binop@Skull[2]{% + \@HwM@choose@thicknesses{\@HwM@binop@skull #1#2}% + {{.6}{.2}}% + {{.9}{.266667}}% +} \newcommand*\@HwM@large@cloud[1]{% \begin{@HwM@large@picture}{12}{-6}% \roundcap @@ -408,34 +653,224 @@ {{.9}{.6}}% {{1.8}{1.2}}% } - +\newcommand*\@HwM@symmetric@bat@wing[1]{% + \moveto(#1.7,0)% + \curveto(#11.5,.1)(#12.2,.5)(#12,1)% + \curveto(#12.5,.5)(#12.9,0)(#12.9,-.5)% + \curveto(#12.8,0)(#12,-.5)(#12.25,-1)% + \curveto(#12,-.5)(#11.7,-.3)(#11.5,-.7)% + \curveto(#11.4,-.5)(#11.2,-.3)(#11,-.5)% + \curveto(#1.9,-.4)(#1.7,-.4)(#1.5,-.5)% + \closepath + \fillpath +} +\newcommand*\@HwM@symmetric@bbat@wing[1]{% + \moveto(#1.7,.1)% + \curveto(#11.5,.2)(#12.25,.6)(#12,1.1)% + \curveto(#12.6,.5)(#13,0)(#13,-.6)% + \curveto(#12.8,0)(#12,-.6)(#12.25,-1.1)% + \curveto(#12,-.6)(#11.7,-.4)(#11.5,-.8)% + \curveto(#11.4,-.6)(#11.2,-.4)(#11,-.6)% + \curveto(#1.9,-.5)(#1.7,-.5)(#1.5,-.5)% + \closepath + \fillpath +} +\newcommand*\@HwM@symmetric@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(-.5,-.5)% + \curveto(-.4,-.6)(-.2,-.7)(-.2,-1)% + \curveto(-.1,-.7)(.1,-.7)(.2,-1)% + \curveto(.2,-.7)(.4,-.6)(.5,-.5)% + \closepath + \fillpath + \@HwM@symmetric@bat@wing-% + \@HwM@symmetric@bat@wing+% + \moveto(.5,0)% + \circlearc{.35}{0}{.15}{0}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{0}{180}% + \lineto(-.75,0)% + \curveto(-.75,.45)(-.7,.5)(-.5,1)% + \circlearc{0}{1}{.5}{180}{360}% + \curveto(.7,.5)(.75,.45)(.75,0)% + \closepath + \fillpath + \moveto(-.75,0)% + \circlearc{0}{0}{.75}{180}{360}% + \lineto(.5,0)% + \circlearc{.35}{0}{.15}{360}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{360}{180}% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@symmetric@bold@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(-.6,-.5)% + \curveto(-.5,-.6)(-.3,-.7)(-.3,-1.1)% + \curveto(-.1,-.7)(.1,-.7)(.3,-1.1)% + \curveto(.3,-.7)(.5,-.6)(.6,-.5)% + \closepath + \fillpath + \@HwM@symmetric@bbat@wing-% + \@HwM@symmetric@bbat@wing+% + \moveto(.5,0)% + \circlearc{.35}{0}{.15}{0}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{0}{180}% + \lineto(-.8,0)% + \curveto(-.8,.5)(-.7,.5)(-.55,1.1)% + \circlearc{0}{1.1}{.55}{180}{360}% + \curveto(.7,.5)(.8,.5)(.8,0)% + \closepath + \fillpath + \moveto(-.8,0)% + \circlearc{0}{0}{.8}{180}{360}% + \lineto(.5,0)% + \circlearc{.35}{0}{.15}{360}{180}% + \lineto(-.2,0)% + \circlearc{-.35}{0}{.15}{360}{180}% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@Symmetric@Bat[2]{% + \@HwM@if@bold@math{% + \@HwM@symmetric@bold@bat #2% + }{% + \@HwM@symmetric@bat #2% + }% +} +\newcommand*\@HwM@asymmetric@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(\-.5,.2)% + \curveto(\-1.5,.3)(\-2.2,.5)(\-1.8,1)% + \curveto(\-2.5,.5)(\-2.9,0)(\-2.9,-.5)% + \curveto(\-2.7,0)(\-2,-.25)(\-2,-.8)% + \curveto(\-2,-.5)(\-1.6,-.25)(\-1.4,-.5)% + \curveto(\-1.4,-.2)(\-1.2,-.1)(\-1,-.3)% + \curveto(\-1,-.1)(\-.7,-.1)(\-.6,-.1)% + \closepath + \fillpath + \moveto(\+.9,0) + \curveto(\+2,-.1)(\+2.2,.5)(\+2,.7) + \curveto(\+2.5,.6)(\+3.2,0)(\+2.9,-.7)% + \curveto(\+2.6,-.2)(\+2,-.5)(\+2,-1)% + \curveto(\+2,-.5)(\+1.7,-.4)(\+1.5,-.7)% + \curveto(\+1.6,-.4)(\+1.3,-.2)(\+1.1,-.5)% + \curveto(\+1.1,-.3)(\+1,-.3)(\+.8,-.3)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.85,.08)(\+.65,.13)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.35,.2)(\+.05,.3)(0,.1)% + \lineto(\-.8,0)% + \curveto(\-.7,.3)(\-.4,.7)(\+.25,1)% + \curveto(\+.2,.4)(\+.8,.3)(\+1,.9)% + \curveto(\+1.1,.7)(\+1.1,.2)(\+1,0)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.75,-.28)(\+.55,-.23)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.25,-.18)(\-.05,-.08)(0,.1)% + \lineto(\-.8,0)% + \curveto(\-.9,-.3)(\-.8,-.6)(\-1,-.9)% + \curveto(\-.8,-.6)(\-.4,-.7)(\-.6,-1)% + \curveto(\-.2,-.8)(\+.2,-.82)(\+.3,-.8)% + \curveto(\+.85,-.69)(\+.99,-.02)(\+1,0)% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@asymmetric@bold@bat[1]{% + \begin{@HwM@math@picture}{2}{-1}{}#1{6}{-3}% + \moveto(\-.5,.3)% + \curveto(\-1.5,.4)(\-2.2,.6)(\-1.9,1.1)% + \curveto(\-2.6,.6)(\-3,0)(\-3,-.6)% + \curveto(\-2.6,-.1)(\-2,-.4)(\-2,-.9)% + \curveto(\-2,-.6)(\-1.6,-.35)(\-1.4,-.6)% + \curveto(\-1.4,-.3)(\-1.2,-.2)(\-1,-.4)% + \curveto(\-1,-.2)(\-.7,-.2)(\-.6,-.2)% + \closepath + \fillpath + \moveto(\+.9,.1) + \curveto(\+1.8,0)(\+2.3,.3)(\+2.1,.8)% + \curveto(\+2.6,.7)(\+3.3,-.1)(\+3,-.8)% + \curveto(\+2.7,-.3)(\+2,-.6)(\+2,-1.1)% + \curveto(\+2,-.6)(\+1.7,-.5)(\+1.5,-.8)% + \curveto(\+1.6,-.5)(\+1.3,-.3)(\+1.1,-.6)% + \curveto(\+1.1,-.4)(\+1,-.4)(\+.8,-.4)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.85,.08)(\+.65,.13)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.35,.2)(\+.05,.3)(0,.1)% + \lineto(\-.85,0)% + \curveto(\-.75,.3)(\-.4,.7)(\+.25,1.1)% + \curveto(\+.2,.55)(\+.8,.45)(\+1,1)% + \curveto(\+1.1,.8)(\+1.2,.2)(\+1.05,0)% + \closepath + \fillpath + \moveto(\+.8,-.1)% + \curveto(\+.75,-.28)(\+.55,-.23)(\+.6,-.05)% + \lineto(\+.3,0)% + \curveto(\+.25,-.18)(\-.05,-.08)(0,.1)% + \lineto(\-.85,0)% + \curveto(\-.95,-.3)(\-.8,-.6)(\-1,-1)% + \curveto(\-.75,-.7)(\-.4,-.8)(\-.5,-1.1)% + \curveto(\-.2,-.8)(\+.2,-.82)(\+.3,-.8)% + \curveto(\+.85,-.69)(\+1.04,-.0133333)(\+1.05,0)% + \closepath + \fillpath + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@Asymmetric@Bat[2]{% + \@HwM@if@bold@math{% + \@HwM@asymmetric@bold@bat #2% + }{% + \@HwM@asymmetric@bat #2% + }% +} +\newcommand*\@HwM@oooalign[2]{% + \leavevmode + \vbox{% + \baselineskip\z@skip + \lineskip\z@skip + \lineskiplimit -\maxdimen + \m@th + \ialign{\hfil$#1##$\hfil\crcr #2\crcr}% + }% +} +\newcommand*\@HwM@overprint@rel[2]{% + \mathrel{\mathpalette \@HwM@oooalign {#1\cr#2}}% +} +\newcommand*\@HwM@rightbroomtail{\@HwM@overprint@rel \std@minus >} +\newcommand*\@HwM@leftbroomtail {\@HwM@overprint@rel \std@minus <} +\newcommand*\@HwM@rightpforktail{\mathrel\ni} +\newcommand*\@HwM@leftpforktail {\mathrel\in} \newlength\@HwM@arrowfill@skip \newcommand*\@HwM@auto@font@selector[2]{% \def\@tempa{#1}% \edef\@tempb{% - \ifx\displaystyle #2% - \textfont - \else \ifx\textstyle #2% - \textfont + \ifx\scriptscriptstyle #2% + \scriptscriptfont \else \ifx\scriptstyle #2% \scriptfont - \else \ifx\scriptscriptstyle #2% - \scriptscriptfont - \fi\fi\fi\fi + \else + \textfont + \fi\fi }% \expandafter \@tempa \expandafter #2\@tempb } \newcommand*\@HwM@extended@arrowfill@[2]{% - % #1 is the "leaders" (pseudo-)macro (must gobble 2 arguments) - % #2 is the minimal width in math units \@HwM@auto@font@selector {\@HwM@stylefont@arrowfill{#1}{#2}}% } \newcommand*\@HwM@stylefont@arrowfill[4]{% - % #1 is the "leaders" (pseudo-)macro (must gobble 2 arguments) - % #2 is the minimal width in math units - % #3 is style selector (e.g., "\displaystyle") - % #4 is font selector (e.g., "\textfont") $\m@th \thickmuskip 0mu% \medmuskip \thickmuskip @@ -447,17 +882,10 @@ $% } \newcommand*\@HwM@enriched@arrowfill@[5]{% - % #1, #2, and #3 are the three characters - % #4 and #5 are the two additional macros (both with 2 arguments) - % its call must be followed by the argument for the minimal width \@HwM@extended@arrowfill@ {\HwM@arrowfill@cleaders{#1}{#2}{#3}{#4}{#5}}% } \newcommand*\HwM@arrowfill@cleaders[7]{% - % #1, #2, and #3 are the three characters - % #4 and #5 are the two additional macros (both with 2 arguments) - % #6 is style selector (e.g., "\displaystyle") - % #7 is font selector (e.g., "\textfont") #4#6#7% \relax #1\mkern-7mu% \cleaders\hbox{$#6\mkern-2mu#2\mkern-2mu$}\hskip\@HwM@arrowfill@skip @@ -466,7 +894,14 @@ } \newcommand*\@HwM@rightbroomfill@Wwac@{% \@HwM@set@right@dir - \@HwM@enriched@arrowfill@ \ni\relbar\relbar + \@HwM@enriched@arrowfill@ \@HwM@rightbroomtail\relbar\relbar + \@gobbletwo + \@HwM@right@add@witch@cat + \@ne +} +\newcommand*\@HwM@rightpitchfill@Wwac@{% + \@HwM@set@right@dir + \@HwM@enriched@arrowfill@ \@HwM@rightpforktail\relbar\relbar \@gobbletwo \@HwM@right@add@witch@cat \@ne @@ -481,10 +916,17 @@ \else \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ \relax \fi -}% +} \newcommand*\@HwM@leftbroomfill@Wwac@{% \@HwM@set@left@dir - \@HwM@enriched@arrowfill@ \relbar\relbar\in + \@HwM@enriched@arrowfill@ \relbar\relbar\@HwM@leftbroomtail + \@HwM@left@add@witch@cat + \@gobbletwo + \@ne +} +\newcommand*\@HwM@leftpitchfill@Wwac@{% + \@HwM@set@left@dir + \@HwM@enriched@arrowfill@ \relbar\relbar\@HwM@leftpforktail \@HwM@left@add@witch@cat \@gobbletwo \@ne @@ -500,9 +942,10 @@ \@HwM@Small@Witch@Wo@Broom #2% \hskip -\glueexpr \@HwM@arrowfill@skip/\tw@ \relax } + \newcommand*\@HwM@init@swish@dimens[1]{% \dimen4 \glueexpr \fontdimen 22 #1\tw@ *\tw@/\thr@@ - \dimen6 .25\@HwM@thickness@units@for #1% + \dimen6 .\@HwM@if@bold@math{333333}{25}\@HwM@thickness@units@for #1% \dimen@ \dimen4 \@HwM@calc@swish@thickness } @@ -513,8 +956,11 @@ \newcommand*\@HwM@swish@leaders{% \leaders \hrule \@height\dimen@ \@depth\dimen@ii \hskip } -\newcommand*\@HwM@right@ghost@swish[2]{% - \@HwM@init@swish@dimens #2% +\newcommand*\@HwM@right@swish[3]{% + % #1 := swishing subform. (e.g., "\mkern 1.5mu\relax \mathrightbat") + % #2 := style selector (e.g., "\displaystyle") + % #3 := font selector (e.g., "\textfont") + \@HwM@init@swish@dimens #3% \hskip \glueexpr \@HwM@arrowfill@skip/4\relax \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/4\relax \hskip \glueexpr \@HwM@arrowfill@skip/8\relax @@ -532,11 +978,14 @@ \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax \kern -\dimen4 - \mathrightghost -} -\newcommand*\@HwM@left@ghost@swish[2]{% - \mathleftghost - \@HwM@init@swish@dimens #2% + #1% +} +\newcommand*\@HwM@left@swish[3]{% + % #1 := swishing subformula (e.g., "\mathleftbat \mkern 1.5mu\relax") + % #2 := style selector (e.g., "\displaystyle") + % #3 := font selector (e.g., "\textfont") + #1% + \@HwM@init@swish@dimens #3% \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/8\relax \hskip \glueexpr \@HwM@arrowfill@skip/8\relax \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/4\relax @@ -555,10 +1004,31 @@ \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax } \newcommand*\@HwM@rightghostfill@{% - \@HwM@extended@arrowfill@ \@HwM@right@ghost@swish {.5}% + \@HwM@extended@arrowfill@ {\@HwM@right@swish \mathrightghost}{.5}% } \newcommand*\@HwM@leftghostfill@{% - \@HwM@extended@arrowfill@ \@HwM@left@ghost@swish {.5}% + \@HwM@extended@arrowfill@ {\@HwM@left@swish \mathleftghost}{.5}% +} +\newcommand*\@HwM@rightbatfill@{% + \@HwM@extended@arrowfill@ + {\@HwM@right@swish{\mkern 1.5mu\relax \mathrightbat}}{.5}% +} +\newcommand*\@HwM@leftbatfill@{% + \@HwM@extended@arrowfill@ + {\@HwM@left@swish{\mathleftbat \mkern 1.5mu\relax}}{.5}% +} + +\newcommand*\@HwM@rightbroomfill@{% + \arrowfill@ \@HwM@rightbroomtail\relbar\relbar +} +\newcommand*\@HwM@leftbroomfill@{% + \arrowfill@ \relbar\relbar\@HwM@leftbroomtail +} +\newcommand*\@HwM@rightpitchfill@{% + \arrowfill@ \@HwM@rightpforktail\relbar\relbar +} +\newcommand*\@HwM@leftpitchfill@{% + \arrowfill@ \relbar\relbar\@HwM@leftpforktail } \newcommand*\@HwM@dblstyle@mathpalette[2]{% @@ -623,12 +1093,14 @@ \@HwM@ifstar@cat{\@HwM@mathwitch rl}% } \newcommand*\@HwM@mathwitch[2]{% - \@HwM@general@large@operator {\@HwM@Large@Witch #1#2}\@HwM@Small@Witch + \@HwM@general@large@operator + {\@HwM@Large@Witch #1#2}% + \@HwM@Small@Witch } \newcommand*\pumpkin{% \DOTSB - \@HwM@general@binary@operation \@HwM@Oplus@Pumpkin + \@HwM@general@binary@operation \@HwM@Binop@Pumpkin } \newcommand*\bigpumpkin{% \DOTSB @@ -636,6 +1108,15 @@ } \@ifdefinable\greatpumpkin{\let\greatpumpkin=\bigpumpkin} +\newcommand*\skull{% + \DOTSB + \@HwM@general@binary@operation \@HwM@Binop@Skull +} +\newcommand*\bigskull{% + \DOTSB + \@HwM@general@large@operator \@HwM@Large@Skull \@HwM@Small@Skull +} + \newcommand*\mathcloud {\@HwM@set@right@dir \@HwM@mathcloud} \newcommand*\reversemathcloud{\@HwM@set@left@dir \@HwM@mathcloud} \newcommand*\@HwM@mathcloud{% @@ -650,6 +1131,16 @@ \newcommand*\@HwM@mathghost{% \@HwM@general@ordinary@symbol \@HwM@Asymmetric@Ghost } + +\newcommand*\mathbat{% + \@HwM@general@ordinary@symbol \@HwM@Symmetric@Bat +} +\newcommand*\mathrightbat{\@HwM@set@right@dir \@HwM@mathbat} +\newcommand*\mathleftbat {\@HwM@set@left@dir \@HwM@mathbat} +\newcommand*\@HwM@mathbat{% + \@HwM@general@ordinary@symbol \@HwM@Asymmetric@Bat +} + \newcommand*\@HwM@dblstyle@overarrow@[4]{% % #1 := stretchable covering arrow % #2 := base style @@ -683,6 +1174,14 @@ \@HwM@general@ou@w@cat {\@HwM@dblstyle@overarrow@ \@HwM@leftbroomfill@Wwac@}% } +\newcommand*\overrightwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@rightpitchfill@Wwac@}% +} +\newcommand*\overleftwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@leftpitchfill@Wwac@}% +} \newcommand*\overrightswishingghost{% \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@overarrow@ \@HwM@rightghostfill@}% @@ -691,6 +1190,14 @@ \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@overarrow@ \@HwM@leftghostfill@}% } +\newcommand*\overrightflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightbatfill@}% +} +\newcommand*\overleftflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftbatfill@}% +} \newcommand*\underrightwitchonbroom{% \@HwM@general@ou@w@cat {\@HwM@dblstyle@underarrow@ \@HwM@rightbroomfill@Wwac@}% @@ -699,6 +1206,14 @@ \@HwM@general@ou@w@cat {\@HwM@dblstyle@underarrow@ \@HwM@leftbroomfill@Wwac@}% } +\newcommand*\underrightwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@rightpitchfill@Wwac@}% +} +\newcommand*\underleftwitchonpitchfork{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@leftpitchfill@Wwac@}% +} \newcommand*\underrightswishingghost{% \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@underarrow@ \@HwM@rightghostfill@}% @@ -707,6 +1222,70 @@ \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@underarrow@ \@HwM@leftghostfill@}% } +\newcommand*\underrightflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightbatfill@}% +} +\newcommand*\underleftflutteringbat{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftbatfill@}% +} +\newcommand*\overrightbroom{% + \mathpalette{\overarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\overleftbroom{% + \mathpalette{\overarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\overrightpitchfork{% + \mathpalette{\overarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\overleftpitchfork{% + \mathpalette{\overarrow@ \@HwM@leftpitchfill@}% +} +\newcommand*\underrightbroom{% + \mathpalette{\underarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\underleftbroom{% + \mathpalette{\underarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\underrightpitchfork{% + \mathpalette{\underarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\underleftpitchfork{% + \mathpalette{\underarrow@ \@HwM@leftpitchfill@}% +} +\newcommand*\overscriptrightbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\overscriptleftbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\overscriptrightpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\overscriptleftpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftpitchfill@}% +} +\newcommand*\underscriptrightbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightbroomfill@}% +} +\newcommand*\underscriptleftbroom{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftbroomfill@}% +} +\newcommand*\underscriptrightpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightpitchfill@}% +} +\newcommand*\underscriptleftpitchfork{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftpitchfill@}% +} \newcommand*\overscriptrightarrow{% \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@overarrow@ \rightarrowfill@}% @@ -731,6 +1310,41 @@ \@HwM@dblstyle@mathpalette {\@HwM@dblstyle@underarrow@ \leftrightarrowfill@}% } + +\newcommand*\@HwM@make@arrowfill@like[3]{% + % #1 := base symbol, which expects as its own arguments + % - #1, a style selector (e.g., "\scriptstyle") + % - #2, a font selector (e.g., "\scriptfont") + % #2 := centering method, either "\hfil" or "\hidewidth" + % #3 := style selector (e.g., "\scriptstyle") + #2% + \@HwM@auto@font@selector{#1}#3% braces around #1 are for robustness + #2% +} +\newcommand*\@HwM@over@under@bat[2]{% + % #1 := "\@HwM@dblstyle@overarrow@" | "\@HwM@dblstyle@underarrow@" + % #2 := "\hfil" | "\hidewidth" + \@HwM@dblstyle@mathpalette{% + #1{% + \@HwM@make@arrowfill@like \@HwM@Symmetric@Bat #2% + }% + }% +} +\newcommand*\overbat{% + \@ifstar{% + \@HwM@over@under@bat \@HwM@dblstyle@overarrow@ \hfil + }{% + \@HwM@over@under@bat \@HwM@dblstyle@overarrow@ \hidewidth + }% +} +\newcommand*\underbat{% + \@ifstar{% + \@HwM@over@under@bat \@HwM@dblstyle@underarrow@ \hfil + }{% + \@HwM@over@under@bat \@HwM@dblstyle@underarrow@ \hidewidth + }% +} + \newcommand*\@HwM@ext@arrow@w@cat[5]{% \def\@HwM@tempa{\ext@arrow {#1}{#2}{#3}{#4}{#5}}% \@HwM@ifstar@cat{\@HwM@ext@arrow@w@cat@x}% @@ -739,10 +1353,16 @@ \@HwM@tempa {#1}{#2}% } \newcommand*\xrightwitchonbroom{% - \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@Wwac@% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@Wwac@ } \newcommand*\xleftwitchonbroom{% - \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@Wwac@% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@Wwac@ +} +\newcommand*\xrightwitchonpitchfork{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightpitchfill@Wwac@ +} +\newcommand*\xleftwitchonpitchfork{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftpitchfill@Wwac@ } \newcommand*\xrightswishingghost[2][]{% \ext@arrow 3{12}5{15}\@HwM@rightghostfill@{#1}{#2}% @@ -750,6 +1370,62 @@ \newcommand*\xleftswishingghost[2][]{% \ext@arrow {12}3{15}5\@HwM@leftghostfill@{#1}{#2}% } +\newcommand*\xrightflutteringbat[2][]{% + \ext@arrow 0055\@HwM@rightbatfill@{#1}{#2}% +} +\newcommand*\xleftflutteringbat[2][]{% + \ext@arrow 0055\@HwM@leftbatfill@{#1}{#2}% +} +\newcommand*\xrightbroom{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@ +} +\newcommand*\xleftbroom{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@ +} +\newcommand*\xrightpitchfork{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightpitchfill@ +} +\newcommand*\xleftpitchfork{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftpitchfill@ +} + +\newcommand*\@HwM@tighter@joinrel{% + \mathrel{\mkern-6.5mu}% +} +\newcommand*\rightbroom{% + \DOTSB + \protect\@HwM@rightbroomtail + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar +} +\newcommand*\leftbroom{% + \DOTSB + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\@HwM@leftbroomtail +} +\newcommand*\hmrightpitchfork{% + \DOTSB + \protect\@HwM@rightpforktail + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar +} +\newcommand*\hmleftpitchfork{% + \DOTSB + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\relbar + \protect\@HwM@tighter@joinrel + \protect\@HwM@leftpforktail +} + +\let \do = \noexpand \endinput %% %% End of file `halloweenmath.sty'. |