diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-06 22:29:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-06 22:29:25 +0000 |
commit | 665ec9eb9d87958da1695fe8ddb2b0c41b4f1903 (patch) | |
tree | 1aad5bf5a4ab276f18127b59ee0186ad6f54f39e /Master | |
parent | fe2fda0f24dd3e0225ebda67b04463f79f6f09bb (diff) |
halloweenmath (6jan17)
git-svn-id: svn://tug.org/texlive/trunk@42887 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/00readme.txt | 252 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/Makefile | 132 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/README | 30 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf | bin | 0 -> 258960 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 | 0 -> 310944 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/halloweenmath/manifest.txt | 100 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx | 2078 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins | 172 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty | 755 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/halloweenmath.tlpsrc | 0 |
14 files changed, 3728 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/halloweenmath/00readme.txt b/Master/texmf-dist/doc/latex/halloweenmath/00readme.txt new file mode 100644 index 00000000000..bbc4103480e --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/00readme.txt @@ -0,0 +1,252 @@ + +This is file `00readme.txt'. +(Start your first tour of the halloweenmath package by reading this file.) + +This file is part of a work named "halloweenmath package". + +Copyright (C) 2017 by Gustavo MEZZETTI. + +The halloweenmath package may be distributed and/or modified under +the conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +The halloweenmath package has the LPPL maintenance status + "author-maintained". + +The file `manifest.txt' that comes along with this file specifies +what the halloweenmath package consists of; more 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. + +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) + + + +CONTENTS +======== + +- A dozen lines description of the software +- Installation in a snapshot +- Checking the contents of the distribution +- How to install the halloweenmath package +- How to generate the documentation +- The makefile + + + +A DOZEN LINES DESCRIPTION OF THE SOFTWARE +========================================= + +The halloweenmath package originated from a question asked for enjoyment +on TeX-LaTeX Stack Exchange <http://tex.stackexchange.com> by the user +cfr (see <http://tex.stackexchange.com/q/336768/69818>); it defines a +handful of commands for typesetting mathematical symbols of various +kinds, ranging from "large" operators to extensible arrow-like relations +and growing arrow-like math accents, that all draw from the classic +Halloween-related iconography (pumpkins, witches, ghosts, cats, and so +on) while being, at the same time, seamlessly integrated within the rest +of the mathematics produced by (AmS-)LaTeX. + + + +INSTALLATION IN A SNAPSHOT +========================== + +The halloweenmath package is distributed in the usual .dtx + .ins +format. The main file is `halloweenmath.dtx', with installation script +`halloweenmath.ins'. Do the usual things to install it and to generate +the documentation. If you don't know what the usual things are, read +below. Note that in order to generate the documentation you should do +the following: + +latex; latex; makeindex (.idx); makeindex (.glo); latex; latex. + + + +CHECKING THE CONTENTS OF THE DISTRIBUTION +========================================= + +Before installing the halloweenmath package and generating its +documentation, it is a good idea to read the file `manifest.txt', which +lists all the files that make up the distribution, to check that you +don't lack any of them (in particular, that you have the file +`manifest.txt' itself!). If you do find that some files are missing, +don't hesitate to complain to the distributor from whom you obtained the +others: this person, company, or institution is infringing the copyright +(actually, the copyleft) of the halloweenmath package. Please remember, +however, that in order to comply with the copyright a distributor is +only requested to supply the files listed in `manifest.txt' under the +title "MEANING OF THE TERM `Work'", but not those listed under "MEANING +OF THE TERM `Compiled Work'". + + + +HOW TO INSTALL THE HALLOWEENMATH PACKAGE +======================================== + +Note that in many pre-packaged TeX distributions, like MikTeX and TeX +Live, the halloweenmath package could be already installed, in which +case you can use it straight away. + +If you need to install the halloweenmath package yourself, follow these +steps (but also see the section titled "The makefile", below): + +1) Make sure that the files `halloweenmath.dtx' and `halloweenmath.ins' +are placed in the same directory; below, we shall indicate this +directory as "the current directory". + +2) Run LaTeX (or plain TeX) once on the file `halloweenmath.ins'. This +will generate, in the current directory, the following LaTeX input file: + + halloweenmath.sty + +3) Move the file listed in 2) from the current directory to a LaTeX +input directory--see b) and c) below. + +4) If you wish, delete the file `halloweenmath.log' to save disk space. + +Installation is now finished! The following comments may be useful: + +a) The above listing of the files you need to move is also displayed on +the terminal at the end of the run of the file `halloweenmath.ins'. + +b) 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 hold your private classes and +packages. + +c) If you are not able to find the LaTeX input directories, or you are +not allowed to modify them and cannot create your personal LaTeX input +directories, do this: place all the files listed under 2) above in any +directory of your choice (a newly created, empty directory would be the +best choice, however); then put all the LaTeX source files that you want +to typeset using the halloweenmath package in that same directory. Of +course, this solution becomes impractical if the number of such source +files exceeds a dozen or so; but for a few files you can do this way, at +least until you decide to finally learn how to create your private LaTeX +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 +halloweenmath package, that is, the directory inside which you should +put all the files listed in 2), is + + $TEXMF/tex/latex/halloweenmath/ + +The documentation, on the other hand, should be stored inside + + $TEXMF/doc/latex/halloweenmath/ + +Of course, in order to do so you must have appropriate access +priviledges to the texmf tree of your site. + + + +HOW TO GENERATE THE DOCUMENTATION +================================= + +A shortened form of the documentation, already typeset and packaged in +PDF, is provided in the file `halloweenmath-doc.pdf' that you might have +found on some sites (e.g., the CTAN sites). This file, however, is not +part of the halloweenmath package and distributors are not requested to +include it among the distributed files. Moreover, it does not contain +any implementation notes (in which most users, though, are not at all +interested). + +If the distributor from whom you obtained the halloweenmath package did +not provide the file `halloweenmath-doc.pdf', or if you want the full +documentation, complete with all the available implementation notes +(but, alas, still unfinished for many respects), you can generate it +following these steps (but also see the section titled "The makefile", +below): + +1) Run LaTeX (_not_ plain TeX) _twice_ on the file `halloweenmath.dtx'. +This, among other things, will generate the files `halloweenmath.idx' +and `halloweenmath.glo' in the same directory as the file +`halloweenmath.dtx'. + +2) Run MakeIndex on the file `halloweenmath.idx' obtained in 1), using +the style file `gind.ist', which is part of the standard LaTeX +distribution. + +3) Run MakeIndex on the file `halloweenmath.glo' obtained in 1), using +the style file `gglo.ist', which is part of the standard LaTeX +distribution, and specifying the file `halloweenmath.gls' as the output +file. + +4) Run LaTeX _two_ more times on the file `halloweenmath.dtx'. + +5) If you wish, you can now delete the following files, to save disk +space: + + halloweenmath.aux + halloweenmath.glg + halloweenmath.glo + halloweenmath.gls + halloweenmath.hd + halloweenmath.idx + halloweenmath.ilg + halloweenmath.ind + halloweenmath.lof + halloweenmath.log + halloweenmath.out + halloweenmath.toc + +After step 4), you should get the documentation in DVI format in the +file `halloweenmath.dvi', located in the same directory as +`halloweenmath.dtx', with all indexes, table of contents, etc. +correctly set. + +However, if you are neurotic (as I am) and have a fast computer, you +could run LaTeX three or four times, instead of two, in step 1)... :-) + +Other LaTeX typesetting engines should work in the same way, perhaps +producing the output in a different format; for example, you may use +pdflatex in place of LaTeX to obtain the documentation in PDF. + + + +THE MAKEFILE +============ + +A (quite trivial!) makefile that "knows" how to produce the +documentation is offered along with the halloweenmath 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 +`halloweenmath.dtx', the shell command + + make doc + +will take all the necessary actions to produce the full documentation +(in PDF; the modifications you need to introduce into the makefile in +order to obtain DVI output should be quite obvious, however). + +The same makefile can also be used to extract the "executable" package +file: simply issue the command + + make code + +at the shell prompt; whereas + + make + +will _both_ extract the code _and_ typeset the documentation. Type + + make help + +for more information. + + +Have fun with the halloweenmath package! + diff --git a/Master/texmf-dist/doc/latex/halloweenmath/Makefile b/Master/texmf-dist/doc/latex/halloweenmath/Makefile new file mode 100644 index 00000000000..8292e7c8602 --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/Makefile @@ -0,0 +1,132 @@ +# makefile +# +# 2017 Jan 06 +# +# Macro definitions +ROOT_NAME = halloweenmath +DTX_NAME = $(ROOT_NAME).dtx +INS_NAME = $(ROOT_NAME).ins +DOC_AUX_FIL = $(ROOT_NAME).aux $(ROOT_NAME).log \ + $(ROOT_NAME).glo $(ROOT_NAME).gls \ + $(ROOT_NAME).idx $(ROOT_NAME).ind \ + $(ROOT_NAME).ilg $(ROOT_NAME).glg \ + $(ROOT_NAME).toc $(ROOT_NAME).lof \ + $(ROOT_NAME).hd $(ROOT_NAME).out +DOCUM_FILE = $(ROOT_NAME).pdf +CODE_FILES = $(ROOT_NAME).sty +# +LATEX = pdflatex +MAKEINDEX = makeindex + +# +define GEN_FAKE_INDEX + @echo '\\begin{theindex}' > $(ROOT_NAME).ind + @echo '\\end{theindex}' >> $(ROOT_NAME).ind + @echo "Generating fake .ind file." +endef +# +define GEN_FAKE_GLOSSARY + @echo '\\begin{theglossary}' > $(ROOT_NAME).gls + @echo '\\end{theglossary}' >> $(ROOT_NAME).gls + @echo "Generating fake .gls file." +endef + + + +.PHONY: default +.PHONY: code doc +.PHONY: clean cleandoc cleanaux cleancode cleanall +.PHONY: help + +# Default target +default: doc code + +# Generating the code +################################################################ +# # +# PLEASE NOTE THAT THE INSTALLER SCRIPT IS EXECUTED WITH # +# openout_any=r # +# # +################################################################ +code: + openout_any=r tex $(INS_NAME) + +# Generating the documentation +doc: $(DOCUM_FILE) + +$(DOCUM_FILE): $(DTX_NAME) +# Hack for getting index and glossary in the toc since first run: + $(GEN_FAKE_INDEX) + $(GEN_FAKE_GLOSSARY) +# We know how many runs are needed: + $(LATEX) $(DTX_NAME) + $(LATEX) $(DTX_NAME) + $(MAKEINDEX) -s gind.ist -t $(ROOT_NAME).ilg -o $(ROOT_NAME).ind \ + $(ROOT_NAME).idx + $(MAKEINDEX) -s gglo.ist -t $(ROOT_NAME).glg -o $(ROOT_NAME).gls \ + $(ROOT_NAME).glo + $(LATEX) $(DTX_NAME) + $(LATEX) $(DTX_NAME) +# Hyperlinks in the indexes seem not to work properly without the +# following additional run: + $(MAKEINDEX) -s gind.ist -t $(ROOT_NAME).ilg -o $(ROOT_NAME).ind \ + $(ROOT_NAME).idx + $(MAKEINDEX) -s gglo.ist -t $(ROOT_NAME).glg -o $(ROOT_NAME).gls \ + $(ROOT_NAME).glo + $(LATEX) $(DTX_NAME) + +# Cleaning up: command "make clean" defaults to "make cleanall" +clean: cleanall + +# Cleaning the code files +cleancode: + -rm $(CODE_FILES) + +# Cleaning the documentation files +cleandoc: cleanaux + -rm $(DOCUM_FILE) + +# Cleanng just the auxiliary files used in producing the documentation +cleanaux: + -rm $(DOC_AUX_FIL) + +# Cleaning up all the generated files +cleanall: cleancode cleandoc + +# Giving help +help: + @echo "Here is a list of the available commands:" + @echo + @echo " make" + @echo " Generate both the code and the documentation (see below)." + @echo + @echo " make code" + @echo " Generate the LaTeX sources for all the classes, packages," + @echo " definition files, etc. of the C.D.P. Bundle; these files go" + @echo " into the LaTeX input directories." + @echo + @echo " make doc" + @echo " Generate the documentation (in PDF); the resulting PDF file" + @echo " goes into the LaTeX documentation directories (the auxiliary" + @echo " files may be discarded)." + @echo + @echo " make clean" + @echo " make cleanall" + @echo " These two commands are synonyms; they remove all of the" + @echo " generated files (both code and documentation)." + @echo + @echo " make cleancode" + @echo " Remove the LaTeX source files (the \"code files\")." + @echo + @echo " make cleandoc" + @echo " Remove the documentation, together with all the auxiliary" + @echo " files used to generate it." + @echo + @echo " make cleanaux" + @echo " Remove only the auxiliary files used to generate the" + @echo " documentation." + @echo + @echo " make help" + @echo " Print this help message." + @echo + diff --git a/Master/texmf-dist/doc/latex/halloweenmath/README b/Master/texmf-dist/doc/latex/halloweenmath/README new file mode 100644 index 00000000000..26277efd6a5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/README @@ -0,0 +1,30 @@ +(Version indicator: 2017 Jan 06) + +The halloweenmath package originated from a question asked for enjoyment +on TeX-LaTeX Stack Exchange <http://tex.stackexchange.com> by the user +cfr (see <http://tex.stackexchange.com/q/336768/69818>); it defines a +handful of commands for typesetting mathematical symbols of various +kinds, ranging from "large" operators to extensible arrow-like relations +and growing arrow-like math accents, that all draw from the classic +Halloween-related iconography (pumpkins, witches, ghosts, cats, and so +on) while being, at the same time, seamlessly integrated within the rest +of the mathematics produced by (AmS-)LaTeX. + +The halloweenmath package may be distributed and/or modified under +the conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. + +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) + +Other files that make up the distribution are: + +manifest.txt -- legal stuff +halloweenmath.dtx -- main source file +halloweenmath.ins -- installation script + +See the file `manifest.txt' for a more precise specification of what +files constitutes a LPPL-compliant distribution. diff --git a/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf b/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf Binary files differnew file mode 100644 index 00000000000..91e55fad8b4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.pdf diff --git a/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.tex b/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.tex new file mode 100644 index 00000000000..d6e30050822 --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/halloweenexample.tex @@ -0,0 +1,206 @@ +\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 differnew file mode 100644 index 00000000000..8bc4d0a6fa3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/halloweenmath-doc.pdf diff --git a/Master/texmf-dist/doc/latex/halloweenmath/manifest.txt b/Master/texmf-dist/doc/latex/halloweenmath/manifest.txt new file mode 100644 index 00000000000..74ae5fc5634 --- /dev/null +++ b/Master/texmf-dist/doc/latex/halloweenmath/manifest.txt @@ -0,0 +1,100 @@ + +This is file `manifest.txt'. + +This file is part of a work named "halloweenmath package". + +Copyright (C) 2017 by Gustavo MEZZETTI. + +The halloweenmath package may be distributed and/or modified under +the conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +The halloweenmath package has the LPPL maintenance status + "author-maintained". + +This file specifies what the halloweenmath package consists of; more +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) + + + +MEANING OF THE TERM "Work" +========================== + +In the case of the halloweenmath package, the "Work" is the collection +of the following 4 files: + +00readme.txt -- start by reading this file +manifest.txt -- the file you are reading now +halloweenmath.dtx -- main source file +halloweenmath.ins -- installation script + +If you have received the 4 files listed above, you possess an integral +copy of the halloweenmath package. + + + +MEANING OF THE TERM "Compiled Work" +=================================== + +In the case of the halloweenmath package, a "Compiled Work" is the +collection of: + +a) the following 2 files that are also part of the "Work" (see above): + +00readme.txt +manifest.txt + +AND +b) the following 2 files: + +halloweenmath.sty -- the halloweenmath LaTeX package +halloweenmath.dvi -- full documentation in DVI format + +You may, at your option, substitute the file `halloweenmath.dvi' with +either one (or both) of the following two files: + +halloweenmath.pdf -- full documentation in PDF +halloweenmath-doc.pdf -- overview of the halloweenmath package (PDF) + +but at least one among the files `halloweenmath.dvi', +`halloweenmath.pdf', and `halloweenmath-doc.pdf' must be included in a +"Compiled Work" that you intend to distribute. The file +`halloweenmath.pdf' is obtained by submitting to the program pdflatex +the file `halloweenmath.dtx', following the same steps as those +explained in `00readme.txt' under the title "How to generate the +documentation". + + + +ANCILLARY FILES +=============== + +The package of files distributed through the Comprehensive TeX Archive +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) +Makefile -- Makefile to generate code or documentation + +These five files are included only for convenience's sake and are _not_ +a required part of the halloweenmath package (of course you may, if you +wish, include them in your distribution too). + + + +COMMENT +======= + +Please remember that, in order to distribute a LPPL-compliant copy of +the halloweenmath package, it suffices to distribute only the 4 files +that constitute the "Work". diff --git a/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx new file mode 100644 index 00000000000..5b36bece28b --- /dev/null +++ b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.dtx @@ -0,0 +1,2078 @@ +% \iffalse +% (This is a META-COMMENT.) +% +% This is file `halloweenmath.dtx'. +% +% This file is part of a work named "halloweenmath package". +% +% Copyright (C) 2017 by Gustavo MEZZETTI. +% +% This file may be distributed and/or modified under the conditions +% of the LaTeX Project Public License, either version 1.3 of this +% license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% The halloweenmath package has the LPPL maintenance status +% "author-maintained". +% +% The file `manifest.txt' that comes along with this file specifies what the +% halloweenmath package consists of; more 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. +% +% 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 (see the LaTeX Project Public +% Licence for details). +% +% (End of the META-COMMENT.) +% \fi +% +% \def\filename{halloweenmath.dtx} +% \def\fileversion{0.01} +% \def\filedate{2017/01/06} +% \def\docdate {2017/01/06} +% \def\doclongdate{January~6, 2017} +% +% ^^A \CheckSum{13} +% +% \changes{0.01}{2017 Jan 06}{First writing of the code} +% +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +% \MakeShortVerb{\"} +% \DeleteShortVerb{\|} +% +% \DoNotIndex{\begin,\end,\def,\let,\else,\fi,\@ifdefinable,\@empty} +% \DoNotIndex{\newcommand,\renewcommand} +% \DoNotIndex{\newenvironment,\renewenvironment} +% \DoNotIndex{\z@,\z@skip,\p@,\@ne,\tw@,\thr@@,\@m,\@M,\m@ne} +% \DoNotIndex{\setlength,\setcounter,\addtolength} +% \DoNotIndex{\expandafter,\do,\relax,\advance,\multiply,\divide} +% \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions} +% \DoNotIndex{\",\.,\@} +% +% \IndexPrologue{ +% \section{\indexname} +% Numbers in italics refer to the page where the corresponding entry +% is described, the ones underlined to the code line of the +% definition, the rest to the code lines where the entry is used. +% } +% \setcounter{IndexColumns}{2} +% +% \GlossaryPrologue{\section{Change History}} +% +% \setcounter{StandardModuleDepth}{1} +% +% \setlength{\unitlength}{1cm} +% \definecolor{guidelines}{rgb}{0,.5,1} +% \definecolor{coverwitch}{rgb}{.1,.4,.5} +% +% \newcommand*{\DS}{\textsf{DocStrip}} +% \newcommand*{\TikZ}{Ti\emph{k}Z} +% \renewcommand*{\partname}{Part} +% \newcommand*{\halloweenmath}{halloweenmath} +% \newcommand*{\amsmath}{amsmath} +% \newcommand*{\picttwoe}{pict2e} +% \newcommand*{\textoken}[1]{\(\langle\mbox{\normalfont #1}\rangle\)} +% \makeatletter +% \newcommand*{\myspecialindex}[2] +% {\special@index{#1\actualchar#2\encapchar main}} +% \newcommand*{\param}[1]{\(\mbox{\##1}\leftarrow{}\)\>} +% \newenvironment*{paramlist}{^^A +% \@beginparpenalty \@M \relax +% \setlength\topsep{\z@}^^A +% \tabbing +% \(\mbox{\#0}\leftarrow {\,}\)\=\kill +% }{^^A +% \endtabbing +% } +% \makeatother +% \newcommand*{\counterindex}[1]{\myspecialindex{#1}{{\string\ttfamily +% \space #1} (counter)}\index{counters:\levelchar{\protect\ttfamily +% #1}\encapchar usage}} +% \newcommand*{\optuseindex}[1]{\SortIndex{#1}{\protect\opt{#1} +% (option)\encapchar usage}\index{options:\levelchar +% \protect\opt{#1}\encapchar usage}} +% \DeclareRobustCommand*{\packlass}[1]{{\normalfont\sffamily #1}} +% \DeclareRobustCommand*{\filedir}[1]{{\normalfont\ttfamily #1}} +% \DeclareRobustCommand*{\env}[1]{{\normalfont\ttfamily #1}} +% \DeclareRobustCommand*{\ctr}[1]{{\normalfont\ttfamily #1}} +% \DeclareRobustCommand*{\opt}[1]{{\normalfont\ttfamily #1}} +% \newcommand*{\sopt}[1]{\mbox{\opt{#1}}\optuseindex{#1}} +% \DeclareRobustCommand*{\TeXSXuser}[1]{{\normalfont\sffamily #1}} +% \newcommand*{\cfr}{\TeXSXuser{cfr}} +% +% \providecommand*{\href}[3][]{#3} +% \providecommand*{\pdfbookmark}[3][]{} +% \providecommand*{\hypersetup}{} +% +% \newcommand*{\magicstar}[1]{^^A +% \begingroup +% \setlength\unitlength{#1\unitlength}^^A +% \begin{picture}(0,0)^^A +% \polygon*(0,1)(-.225,.309)(-.951,.309)(-.363,-.118)(-.588,-.809)^^A +% (0,-.382)(.588,-.809)(.363,-.118)(.951,.309)(.225,.309)^^A +% \end{picture}^^A +% \endgroup +% } +% +% +% +% \title{ +% The \packlass{\halloweenmath} package:\\ +% scary and creepy math symbols\\ +% with \texorpdfstring{\hologo{AmSLaTeX}}{AMS-LaTeX}\ +% integration\thanks{This file has +% version~\fileversion, release date \filedate; +% last documentation update: \docdate. +% Copyright \copyright~2017 by G.~Mezzetti +% (see page~\pageref{S:Copy}).} +% } +% \author{G. Mezzetti} +% \date{\doclongdate} +% +% \hypersetup{ +% pdftitle = {The halloweenmath package: +% scary and creepy math symbols +% with AMS-LaTeX integration}, +% pdfauthor = {G. Mezzetti}, +% pdfsubject = {Documentation of the halloweenmath package}, +% pdfkeywords = {Halloween, math, scary mathematical symbols}, +% pdfcreationdate = {D:20170106000000}, +% pdfmoddate = {D:20170106000000}, +% bookmarksopen, +% bookmarksopenlevel = 1 +% } +% +% \pdfbookmark[0]{Front Matter}{FrontMatter} +% \maketitle +% +% \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 +% 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 +% classic Halloween-related iconography (pumpkins, witches, ghosts, cats, and +% so on) while being, at the same time, seamlessly integrated within the rest +% of the mathematics produced by \hologo{LaTeX}\slash\hologo{AmSLaTeX}. +% \end{abstract} +% +% \vfil +% +% \begin{center} +% \color{coverwitch} +% \begin{picture}(0,8)(0,-4) +% \roundcap +% \linethickness{4pt} +% \Line(-2,-2)(6,2) +% \linethickness{2pt} +% \Line(-2,-2)(-5,-2.5) +% \Line(-2,-2)(-4.85,-2.95) +% \Line(-2,-2)(-4.6,-3.3) +% \Line(-2,-2)(-4.35,-3.65) +% \Line(-2,-2)(-4,-4) +% \put(-3,-1.2){\magicstar{.4}} +% \put(-4.1,-.8){\magicstar{.8}} +% \put(-5.4,-1.8){\magicstar{.6}} +% \Line(0,1.8)(-.2,1.4) +% \polyline(.6,3.2)(.8,3)(1.5,3) +% \put(1.6,3){\oval(.2,.2)[tl]} +% \put(1.6,3){\oval(.2,.2)[r]} +% \polyline(1.6,2.9)(1.8,2.4)(1.2,2.4)(1,2.5)(1,2.3) +% (1.2,2)(1.6,1.8)(1.7,1.8)(1.7,1.6)(1.4,1.5) +% (0,1.8)(-.2,2) +% \Line(.2,2.8)(.6,3) +% \polygon*(-1,2)(-2,0)(-2,-1)(-1.5,-2)(1,-2) +% (0,-3.6)(.4,-3.8)(.6,-3.4)(.8,-4)(2,-4) +% (1,-3.6)(1,-3)(1.6,-3.2)(2,-1.5)(0,-1) +% (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) +% \linethickness{.4pt} +% \Line(1.7,1.6)(2,1.6) +% \Line(1.7,1.6)(1.9,1.4) +% \Line(1.7,1.6)(1.7,1.3) +% ^^A +% ^^A The cat: +% \put(3.6,1){\circle*{1.2}} +% \put(4.2,1.4){\circle*{1}} +% \put(4.5,2){\circle*{.8}} +% \polygon*(4.1,2)(4.1,2.5)(4.5,2.2)(4.9,2.5)(4.9,2) +% \linethickness{4pt} +% \cbezier(3.2,.6)(2,0)(4.2,-.4)(3,-1) +% \buttcap +% \linethickness{.4pt} +% \Line(3.8,2.1)(5.2,1.9) +% \Line(3.8,2)(5.2,2) +% \Line(3.8,1.9)(5.2,2.1) +% \end{picture} +% \end{center} +% +% \newpage +% \tableofcontents +% \listoffigures +% +% \newpage +% \begingroup +% +% \setlength{\parskip}{\medskipamount} +% \setlength{\parindent}{0pt} +% +% \section*{Copyright notice} +% \label{S:Copy} +% \vspace{-\parskip} +% +% Copyright \copyright~2017 by Gustavo \textsc{Mezzetti}. +% All rights are reserved, except as noted below. +% +% This document has been produced by feeding to a \LaTeX\ typesetting engine +% the file \filedir{\filename} version \fileversion\ (\docdate). This file +% is part of a work named ``\packlass{\halloweenmath} package'', and may be +% distributed and/or modified only as a part thereof. +% Subsection~\ref{sS:License} on page~\pageref{sS:License} explains the +% conditions under which the \packlass{\halloweenmath} package may be +% distributed and/or modified. +% +% The \packlass{\halloweenmath} package has the following LPPL maintenance +% status:\\ +% ``author-maintained''. +% +% Permission is granted to make new printed copies of this document, by any +% means (\emph{e.g.}, photocopying, direct printing from the electronic +% version, and so on). +% +% Note, though, that distribution of this document alone is ``distribution of +% only part of the Work'' in the sense of the \LaTeX\ Project Public License, +% and should therefore be avoided: please distribute, in addition, the source +% file \filedir{\halloweenmath.dtx} together with all other files listed in +% \filedir{manifest.txt}, as explained as well in Subsection~\ref{sS:License} +% and in the file \filedir{manifest.txt} itself. +% +% \section*{Author's addresses} +% \label{S:MyAddresses} +% \vspace{-\parskip} +% +% The recommended way to contact the author is by e-mail; his address is: +% +% \begin{list}{\setlength{\topsep}{0pt}}\item\relax +% gustavo dot mezzetti at istruzione dot it +% \end{list} +% +% Please include the \emph{exact} phrase \verb*|halloweenmath package| in the +% \emph{subject} of your message; otherwise, your message could be +% thrown away by a mail filter. In this regard, the weakness of the +% laws concerning the protection of privacy forces me to explicitly +% forbid the use of the above address for any kind of advertising, +% marketing, polling, or similar commercial or statistical contact. +% +% If you have no e-mail access, write to: +% +% \begin{list}{\setlength{\topsep}{0pt}}\item\relax +% Gustavo \textsc{Mezzetti}\\ +% L.~S.~U. ``A.~di Savoia Duca degli Abruzzi''\\ +% Via del Santo, 57\\ +% I--35123\quad PADOVA\quad PD\\ +% Italy +% \end{list} +% +% \endgroup +% +% +% +% \setcounter{secnumdepth}{0} +% +% +% +% \clearpage +% \section{Introduction} +% +% On October~31, 2016, around 3 in the morning (GMT\@), user +% \href{http://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' +% 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 +% feature of being seen by \LaTeX\ as a mathematical ``large'' operator like +% "\sum", "\prod", "\int", or "\bigcup"; this first command was named +% "\mathwitch" and was ``intended for denoting the operation of applying +% black magic to the ensuing subformula''. +% +% I~subsequently added an extensible math accent similar to +% "\overrightarrow", but with the arrow replaced by a broom carrying the same +% 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. +% +% In the writing of the package, more features, and creatures, have been +% added. Also available now are: +% \begin{itemize} +% \item +% ghosts, both still and hovering (or, if you prefer, acting both as ordinary +% symbols and as math accents similar to "\overrightarrow"); +% \item +% a "\pumpkin" binary operator, with an associated ``large'' operator named +% "\bigpumpkin"\footnote{\cs{greatpumpkin} is available as a synonym, in +% homage to Linus van Pelt.} (cf.~"\cup" vs.\ "\bigcup", "\cap" vs.\ +% "\bigcap", "\vee" vs.\ "\bigvee", "\oplus" vs.\ "\bigoplus",\,\ldots); +% \item +% extensible ``arrow-like'' brooms that act as relation symbols; +% \item +% clouds, for denoting unscrutable subformulas (this one is even sensible!); +% \item +% and still more. +% \end{itemize} +% All the above are available for the \texttt{bold} math version as well as +% for the \texttt{normal} one. +% The symbols provided should prove sufficient for preparing lecture notes, +% slides, tests, or even exams to amuse~(?\@) your students with during the +% Halloween period. Of course, any suggestion for additions and/or +% improvements are most welcome: you can find my addresses on +% 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} +% \packlass{mathwitch} (from the name of the main command); +% \href{http://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} +% \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 +% for which it was written, and (2)~it is 13~characters long. +% +% This work is dedicated to \cfr, without whom it would have never seen the +% 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 +% +% \subsection{Disclaimer} +% +% Although a \LaTeX\ package is a piece of software that executes in a +% rather protected environment and should therefore be relatively +% incapable of doing serious damages, no warranty is given, as usual with +% computer software, that this code will work properly, or even that it +% will work at all. To be on the safe side, be aware that using this +% code can even result in loss of data and/or damages to your disks and +% your storage media. If you use this code, you do so exclusively at +% your own risk! +% +% See Subsection~\ref{sS:License} and the \LaTeX\ Project Public +% Licence for more information. +% +% \subsection{About this document} +% +% This document, like many documentation files distributed for \LaTeX, is +% divided into two parts. +% +% The first part, \emph{User's Manual}, contains all the documentation you +% need to be able to \emph{use} the \packlass{\halloweenmath} package. Every +% user of this package will probably want to read this part. +% +% The second part, \emph{Implementation}, can be omitted if you +% want (explanations on how to omit it are given at the beginning +% of the part itself), and contains information that concerns only +% ``hackers'' who want to learn how the package that this document +% presents is \emph{implemented}. Actually, this part contains the +% complete listing of the \LaTeX\ code that implements the macros, +% 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. +% +% +% +% \setcounter{secnumdepth}{3} +% +% +% +% \clearpage +% \part{User's Manual} +% +% \section{About this part} +% +% This part tells you how to use the \packlass{\halloweenmath} package. It +% also contains detailed instructions on how to install it and how to +% generate this same documentation, but normally you need not bother reading +% this information, either because your \TeX\ distribution already includes +% both the package code and its documentation, or because package +% installation is implicitly dealt with by the automatic update mechanism +% provided by the distribution itself. +% +% \section{How to use the \packlass{\halloweenmath} package} +% \label{S:Usage} +% +% 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}. +% +% \subsection{Package loading} +% +% The usual "\usepackage" declaration is used, as in +% \begin{verbatim}\usepackage{halloweenmath}\end{verbatim} It should be +% noted, however, that the \packlass{\halloweenmath} package requires the +% \packlass{\amsmath} package, and loads it (without specifying any option) +% if it is not already loaded. If you want to pass options to +% \packlass{\amsmath}, load it before \packlass{\halloweenmath}. +% +% The \packlass{\halloweenmath} package defines no options by itself; +% nevertheless, it does honor the [\opt{no}]\opt{sumlimits} options from the +% \packlass{\amsmath} package (see below). +% +% \subsection{Scary symbols} +% +% This package defines some commands \emph{for use in mathematical mode}, +% which provide a handful of symbols, all of which honor the \texttt{bold} +% math version, when in force. They can be loosely grouped as follows. +% +% \subsubsection{Pumpkins} +% +% \DescribeMacro{\pumpkin} +% \DescribeMacro{\bigpumpkin} +% \DescribeMacro{\greatpumpkin} +% It is even too obvious to begin with pumpinks. In this regard, the package +% provides two interrelated commands: +% \begin{itemize} +% \item +% "\pumpkin" yields a binary operator symbol in the shape of a (little) +% pumpkin; +% \item +% "\bigpumpkin" is the ``large'' operator that is to "\pumpkin" as +% "\bigoplus" is to "\oplus"; it typesets a somewhat bigger pumpkin in +% in-line formulas, which becomes significantly larger in displayed formulas. +% \end{itemize} +% The [\opt{no}]\opt{sumlimits} options from the \packlass{\amsmath} package +% also affect the "\bigpumpkin" command. As a homage to Linus van Pelt, +% "\greatpumpkin" is available as a perfect synonym for "\bigpumpkin". +% +% \subsubsection{Witches, brooms, and black cats} +% +% All this arose from a witch. +% +% \DescribeMacro{\mathwitch} \DescribeMacro{\reversemathwich} +% The "\mathwitch" command yields a ``large'' operator symbol, similar to +% "\sum", representing a witch astride of a broom (in my answers +% to~\cite{bib:cfr}, I~claimed that this symbol denotes the operation of +% applying black magic to the ensuing subformula, a fundamental operation in +% so many mathematical proofs\ldots). There is also a "\reversemathwich" +% command, which produces an operator that looks like a mirror image of the +% above, for denoting the inverse operation of undoing the black magic. Both +% commands honor the [\opt{no}]\opt{sumlimits} options from the +% \packlass{\amsmath} package. +% +% \DescribeMacro{\xrightwitchonbroom} +% \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 +% \begin{flushleft} +% \cmd{\xrightwitchonbroom}\oarg{under text}\marg{over text} +% \end{flushleft} +% and "\xleftwitchonbroom" is similar. +% +% \DescribeMacro{\overrightwitchonbroom} +% \DescribeMacro{\overleftwitchonbroom} +% \DescribeMacro{\underrightwitchonbroom} +% \DescribeMacro{\underleftwitchonbroom} +% Finally, the four commands +% \begin{flushleft} +% "\overrightwitchonbroom "\marg{subformula} \\ +% "\overleftwitchonbroom "\marg{subformula} \\ +% "\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 +% 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}.} +% +% \paragraph*{Important note:} +% All the commands described in this subsection have a \mbox{$*$-form} that +% adds a black cat on the broomstick. The syntax should be easy to remember, +% since the additional asterisk can be thought of as reminiscent of the cat. +% +% \subsubsection{Ghosts} +% +% Of course, on Hallowen, ghosts cannot be missing either. +% +% \DescribeMacro{\mathghost} +% \DescribeMacro{\mathrightghost} +% \DescribeMacro{\mathleftghost} +% There are three similar commands (without arguments) that produce ordinary +% symbols, that is, symbols that are treated like letters: the "\mathghost" +% command yield a symbol resembling a ghost standing upfront; the +% "\mathrightghost" (resp., "\mathleftghost") command gives a symbol that +% looks like a ghost moving toward the right (resp., the left). +% +% \DescribeMacro{\xrightswishingghost} +% \DescribeMacro{\xleftswishingghost} +% Once again, ghosts too haunt the region of extensible ``arrow-like'' +% symbols: +% \begin{flushleft} +% "\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. +% +% \DescribeMacro{\overrightswishingghost} +% \DescribeMacro{\overleftswishingghost} +% \DescribeMacro{\underrightswishingghost} +% \DescribeMacro{\underleftswishingghost} +% It is now easy to guess what the following four commands do: +% \begin{flushleft} +% "\overrightswishingghost "\marg{subformula} \\ +% "\overleftswishingghost "\marg{subformula} \\ +% "\underrightswishingghost"\marg{subformula} \\ +% "\underleftswishingghost "\marg{subformula} +% \end{flushleft} +% +% \subsubsection{Other symbols} +% +% The \packlass{\halloweenmath} package implements one more symbol that could +% loosely be connected with the world of witches. +% +% \DescribeMacro{\mathcloud} \DescribeMacro{\reversemathcloud} +% Mathemagicians often deal with unscrutable formulas. To represent them, +% the "\mathcloud" command (without arguments) is available, which produces a +% symbol, with the form of a cloud, that behaves to a certain extent like a +% fraction, in that it is typeset in a significantly larger size in displayed +% 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 +% arrows} +% +% 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} +% package. These extensions can be applied to produce variants of the +% standard over\slash under arrows too. +% +% \DescribeMacro{\overscriptrightarrow} +% \DescribeMacro{\overscriptleftarrow} +% \DescribeMacro{\overscriptleftrightarrow} +% \DescribeMacro{\underscriptrightarrow} +% \DescribeMacro{\underscriptleftarrow} +% \DescribeMacro{\underscriptleftrightarrow} +% The following six commands are analogous to their standard counterparts +% whose names do not contain the "script" substring, but the arrows they put +% above or below the given subformulas are typeset in their relative script +% style, instead of in the same style as the subformulas themselves (as the +% standard commands do): +% \begin{flushleft} +% "\overscriptrightarrow "\marg{subformula} \\ +% "\overscriptleftarrow "\marg{subformula} \\ +% "\overscriptleftrightarrow "\marg{subformula} \\ +% "\underscriptrightarrow "\marg{subformula} \\ +% "\underscriptleftarrow "\marg{subformula} \\ +% "\underscriptleftrightarrow"\marg{subformula} +% \end{flushleft} +% +% \section{Installing the \packlass{\halloweenmath} package and generating this manual} +% +% As usual for \LaTeX\ distributions, the \packlass{\halloweenmath} +% package is distributed in the form of a \filedir{.dtx} file, +% namely \filedir{\halloweenmath.dtx}, and an accompanying +% \filedir{.ins} file, namely \filedir{\halloweenmath.ins}. +% +% \subsection{Installation} +% +% To extract the code, run \LaTeX\ (or plain \TeX) once on the +% file \filedir{\halloweenmath.ins}. This will generate the following +% \LaTeX\ input file: +% \begin{quote} +% \ttfamily +% \halloweenmath.sty +% \end{quote} +% To finish the installation, move it to a \LaTeX\ input directory. The +% above listing of the files you need to move is also displayed on the +% 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 +% \begin{quote} +% \texttt{\$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. +% +% \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 +% \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. +% +% 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{License} +% \label{sS:License} +% +% The \packlass{\halloweenmath} package is \emph{not} in the public +% domain: its author, Gustavo \textsc{Mezzetti}, owns the +% copyright, and in general retains all the rights therein; but as +% a special exception, the author grants you the permissions +% indicated below. +% +% \subsubsection{Distribution and/or modification} +% +% The \packlass{\halloweenmath} package may be distributed and/or +% modified under the conditions of the \LaTeX\ Project Public +% License, either version~1.3 of this license or (at your option) +% any later version. The latest version of this license is in +% \begin{quote} +% \ttfamily +% http://www.latex-project.org/lppl.txt +% \end{quote} +% and version~1.3 or later is part of all distributions of \LaTeX\ +% version 2005/12/01 or later. +% +% The \packlass{\halloweenmath} package has the LPPL maintenance status +% ``author-maintained''. +% +% The file \filedir{manifest.txt} included along with this file +% specifies what the \packlass{\halloweenmath} package consists of; more +% 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. +% +% \subsubsection{Use} +% +% The use of the \packlass{\halloweenmath} package is unrestricted, +% provided that you accept the terms and conditions of the \LaTeX\ +% Project Public License and of the following subsection for what +% concerns the absence of any warranty. +% +% \subsubsection{No warranty} +% +% There is absolutely no warranty for the \packlass{\halloweenmath} +% package. The Copyright Holder provides the \packlass{\halloweenmath} +% package ``as is'', without warranty of any kind, either expressed +% or implied, including, but not limited to, the implied warranties +% of merchantability and fitness for a particular purpose. The +% entire risk as to the quality and performance of the +% \packlass{\halloweenmath} package is with you. Should the +% \packlass{\halloweenmath} package prove defective, you assume the cost +% of all necessary servicing, repair, or correction. +% +% In no event will The Copyright Holder, or any other party who may +% distribute and/or modify the \packlass{\halloweenmath} package as +% permitted by the \LaTeX\ Project Public License, be liable to you +% for damages, including any general, special, incidental or +% consequential damages arising out of any use of the +% \packlass{\halloweenmath} package or out of inability to use it +% (including, but not limited to, loss of data, data being rendered +% inaccurate, or losses sustained by anyone as a result of any +% failure of the \packlass{\halloweenmath} package to operate with any +% other programs), even if The Copyright Holder or said other party +% has been advised of the possibility of such damages. +% +% \StopEventually{ +% \setcounter{secnumdepth}{0} +% \providecommand*\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace} +% +% \clearpage +% \pdfbookmark[0]{Back Matter}{BackMatter} +% \begin{thebibliography}{9} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem{bib:cfr} +% \emph{Seasonal Challenge (Contributions from \TeX ing Dead +% Welcome)},\\ +% \url{http://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. +% +% \end{thebibliography} +% } +% +% +% +% \clearpage +% \part{Implementation} +% +% \section{About this part} +% +% This part is of interest only to \LaTeX\ hackers; to avoid +% having this part printed, look in the file \filedir{\filename} +% for a line that looks \emph{exactly} like this +% \begin{verbatim}%% \OnlyDescription % uncomment to discard Implementation part\end{verbatim} +% and remove the two leading percent signs ("%%"). +% +% \section{A driver for this document} +% +% This part of the file is \emph{not} included in any generated file: +% it is simply the driver. +% \begin{macrocode} +%<*driver> +% \end{macrocode} +% +% To begin with, we load the \packlass{ltxdoc} class +% and the packages we require. +% \begin{macrocode} +\documentclass{ltxdoc} +\usepackage{color,pict2e,hologo} +\usepackage{hypdoc} +% \end{macrocode} +% We now set a few typesetting options. +% First of all, we want a history listing and a full index, the latter +% organized by line numbers. +% \begin{macrocode} +\RecordChanges +\EnableCrossrefs +\CodelineIndex +% \end{macrocode} +% If you don't want to include the second part of this document, +% \emph{Implementation}, uncomment the line containing the command +% "\OnlyDescription". +% \begin{macrocode} +%% \OnlyDescription % uncomment to discard Implementation part +% \end{macrocode} +% Finally, setting "\hfuzz" and "\vfuzz" to 0~points is only one +% of the many neurotic symptoms of the author! +% \begin{macrocode} +\hfuzz = 0pt +\vfuzz = 0pt +% \end{macrocode} +% Now input this same file, using \DS\ conventions. +% \begin{macrocode} +\begin{document} + \DocInput{halloweenmath.dtx} +% \end{macrocode} +% Then print the change list and the index. We put these commands in +% the driver, rather than in the comments of this file, because +% producing the change list and the index is somewhat cumbersome, and some +% users could prefer to omit them: such users should simply use a +% different driver. +% \begin{macrocode} + % \clearpage % attach Change history below References + \PrintChanges + \clearpage \PrintIndex +% \end{macrocode} +% When this file is read directly by \LaTeX\ without the intervention +% of \DS, the following line will make \TeX\ stop +% reading. +% \begin{macrocode} +\end{document} +% \end{macrocode} +% End of driver module. +% \begin{macrocode} +%</driver> +% \end{macrocode} +% +% \section{The code for the \packlass{\halloweenmath} package} +% +% This part of the file goes into \filedir{\halloweenmath.sty}. +% \begin{macrocode} +%<*halloweenmath> +% \end{macrocode} +% +% \subsection{Identification} +% +% No particular reason for asking for a particular release of \LaTeXe; but at +% least, let us specify a date on which the \packlass{\picttwoe} package was +% likely to exist. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[2004/06/01] % LaTeX2e is required! +% \end{macrocode} +% The usual identification: +% \begin{macrocode} +\ProvidesPackage{halloweenmath} + [2017/01/06 v0.01 (development)] +% \end{macrocode} +% +% \subsection{Initial code} +% +% This segment is empty in the \packlass{\halloweenmath} package. +% +% \subsection{Declaration of options} +% +% This segment is empty in the \packlass{\halloweenmath} package. +% +% \subsection{Option processing} +% +% This segment is empty in the \packlass{\halloweenmath} package. +% +% \subsection{Package loading} +% +% Besides the \packlass{\picttwoe} package, that we need to draw the +% pictures, we also require the \packlass{\amsmath} package. +% \begin{macrocode} +\RequirePackage{amsmath,pict2e} +% \end{macrocode} +% +% \subsection{Main code} +% +% Let's begin with an important remark. It would be pretty easy to fulfill +% the purpose of this package using \TikZ; this has been deliberately +% avoided. This package has been written for fun, and part of this fun lay +% in the constraint of using only the means provided by the \env{picture} +% environment, albeit with the \packlass{\picttwoe} extensions. Please +% accept this fact without arguing about it. +% +% The names of all the macros defined in this package start with the prefix +% "\@HwM@" (``namespace'' prefix). +% +% \subsubsection{Preliminary macros} +% +% We begin with defining some macros that provide basic functionality. +% +% \begin{macro}{\@HwM@tempa} +% Temporary scratch macro reserved for this package. Here we just check +% that the name can be used, while, at the same time, reserving it. +% \begin{macrocode} +\@ifdefinable\@HwM@tempa{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@thickness@units@for} +% The unit of measure we are going to use for line thicknesses; since it is +% defined in term of the ``default-rule-thickness'' "\fontdimen", it will +% automatically scale with the font size. The suffix "for" at the end of the +% names reminds that a font selector like "\textfont" must follow and will be +% absorbed as argument~\#1. +% \begin{macrocode} +\newcommand*\@HwM@thickness@units@for[1]{\fontdimen 8 #1\thr@@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@right@or@left} +% Used to pass information about the orientation of left\slash right +% symmetric figures. Here we just check that the name can be used, at the +% same time reserving it. +% \begin{macrocode} +\@ifdefinable\@HwM@right@or@left{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@set@right@dir} +% Causes that the following left\slash right symmetric figure to face to the +% right. +% \begin{macrocode} +\newcommand*\@HwM@set@right@dir{% + \let \@HwM@right@or@left \@firstoftwo +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@set@left@dir} +% Causes that the following left\slash right symmetric figure to face to the +% left. +% \begin{macrocode} +\newcommand*\@HwM@set@left@dir{% + \let \@HwM@right@or@left \@secondoftwo +} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{@HwM@math@picture} +% Customized \env{picture} environment for our ``math pictures'', makes some +% initializations that are always needed (local to its group). Arguments: +% \begin{paramlist} +% \param{1} +% bounding box height, in coordinate units;\\ +% \param{2} +% $y$-coordinate of lower left corner of bounding box;\\ +% \param{3} +% additional code to be executed during initialization;\\ +% \param{4} +% font selector (\emph{e.g.}, "\textfont");\\ +% \param{5} +% bounding box width, in coordinate units;\\ +% \param{6} +% $x$-coordinate of lower left corner of bounding box. +% \end{paramlist} +% \begin{macrocode} +\newenvironment*{@HwM@math@picture}[6]{% + \setlength\unitlength{\fontdimen 22 #4\tw@}% + #3% + \@HwM@right@or@left{% + \def\+{+}% + \def\-{-}% + }{% + \def\+{-}% + \def\-{+}% + }% + \picture(#5,#1)(#6,#2)% +}{\endpicture} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\@HwM@short@circuited@vphant} +% ``Short-circuited'' version of "\vphantom". +% \begin{macrocode} +\newcommand*\@HwM@short@circuited@vphant{\v@true\h@false\mathph@nt} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@oplus@strut} +% Vertical phantom the size of "\oplus". Arguments: +% \begin{paramlist} +% \param{1} +% style selector (\emph{e.g.}, "\displaystyle"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@oplus@strut[1]{% + \@HwM@short@circuited@vphant #1\bigoplus@ +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@d@pict@strut} +% Inserts a ``depth-only half-strut'' (the~"d" in the name is for ``depth''), +% \#1~is its size in picture units. +% \begin{macrocode} +\newcommand*\@HwM@d@pict@strut[1]{% + \vrule \@width\z@ \@height\z@ \@depth #1\unitlength +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@large@picture} +% \begin{macro}{\end@HwM@large@picture} +% This is actually a definition of an environment. The environment beign +% defined, namely \env{@HwM@large@picture}, is simply syntactic sugar for a +% typical invocation of the \env{@HwM@math@picture} environment, for a +% picture of ``large'' size (\( \mbox{height}=5 \), \( \mbox{depth}=3 \), +% with the baseline running at \( y=-1 \)), suitable for the display-style +% version of a large operator. Supplies arguments \#1--\#4 of +% \env{@HwM@math@picture}, with \#4 being "\textfont"; the caller must supply +% the remaining ones. +% \begin{macrocode} +\newcommand*\@HwM@large@picture{% + \@HwM@math@picture{5}{-1}{\@HwM@d@pict@strut\thr@@}\textfont +} +\let\end@HwM@large@picture = \end@HwM@math@picture +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@HwM@small@picture} +% \begin{macro}{\end@HwM@small@picture} +% This is actually a definition of an environment. The environment beign +% defined, namely \env{@HwM@small@picture}, is simply syntactic sugar for a +% typical invocation of the \env{@HwM@math@picture} environment, for a +% picture of ``small'' size (\( \mbox{height}=3 \), \( \mbox{depth}=1 \), +% with the baseline running at \( y=-1 \)), suitable for the +% non-display-style version of a large operator. Supplies arguments \#1--\#3 +% of \env{@HwM@math@picture}; the caller must supply the remaining ones, +% \emph{including} argument~\#4. +% \begin{macrocode} +\newcommand*\@HwM@small@picture{% + \@HwM@math@picture{3}{-1}{\@HwM@d@pict@strut\@ne}% +} +\let\end@HwM@small@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 +% defined, namely \env{@HwM@oplus@picture}, is simply syntactic sugar for a +% 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. +% \begin{macrocode} +\newcommand*\@HwM@oplus@picture[1]{% + \@HwM@math@picture{0}{-1}{\@HwM@oplus@strut #1}% +} +\let\end@HwM@oplus@picture = \end@HwM@math@picture +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \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. +% \begin{macrocode} +\@ifdefinable\if@HwM@cat@{\newif\if@HwM@cat@} +% \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@if@bold@math} +% \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. +% \begin{macrocode} +\newcommand*\@HwM@if@bold@math{% + \def\@tempa{bold}% + \ifx\math@version\@tempa + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@choose@thicknesses} +% Shuffles arguments according to the current math version. +% \begin{macrocode} +\newcommand*\@HwM@choose@thicknesses[3]{% + \@HwM@if@bold@math{#1#3}{#1#2} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@magic@star} +% Draws a star; argument~\#1 is a scale factor. +% \begin{macrocode} +\newcommand*{\@HwM@magic@star}[1]{% + \begingroup + \setlength\unitlength{#1\unitlength}% + \picture(0,0)% + \polygon*(0,1)(-.225,.309)(-.951,.309)(-.363,-.118)(-.588,-.809)% + (0,-.382)(.588,-.809)(.363,-.118)(.951,.309)(.225,.309)% + \endpicture + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \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 +% 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 +% 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 +% specify thickness arguments. This means that some drawing macros must +% exist in two variants: +% \begin{itemize} +% \item +% a ``private'' variant that requires the caller to specify thickness +% parameters; +% \item +% a ``public'' variant that doesn't require such parameters, but uses, +% instead, the "\@HwM@choose@thicknesses" macro to find out the +% appropriate thickness values by itself. +% \end{itemize} +% To make it clear when two macros are actually two such variants of the same +% conceptual function, we shall consistently adhere to the following naming +% convention: +% \begin{itemize} +% \item +% the name of the``private'' private variant will be made up of words +% separated by "@"~characters, and each of those word will \emph{not} be +% capitalized (for example, "\@HwM@large@witch"); +% \item +% the name of the ``public'' variant will be composed by exactly the same +% words, again separated by "@"~characters, \emph{but} with each word +% being also capitalized (for example, "\@HwM@Large@Witch"). +% \end{itemize} +% Note, though, that the ``public'' variant of a macro will typically (but +% not always) require the caller to specify a font selector like "\textfont"; +% we'll see that, from the point of view of the other parts of the code, this +% is an acceptable requirement for the interface. +% +% \subsubsection{Drawing the witch (and the cat)} +% +% The following macros are responsible for the bulk of the task of drawing +% the witch (with an optional cat). Figure~\ref{fig:witch} shows a sketch of +% this drawing. +% +% \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{3pt} +% \roundcap +% \Line(-1,-1)(3,1) +% \linethickness{1.5pt} +% \Line(-1,-1)(-2.5,-1.25) +% \Line(-1,-1)(-2.4,-1.5) +% \Line(-1,-1)(-2.25,-1.75) +% \Line(-1,-1)(-2,-2) +% \put(-1.7,-.4){\magicstar{.4}} +% \put(-2.7,-.8){\magicstar{.25}} +% \Line(0,.9)(-.1,.7) +% \polyline(.3,1.6)(.4,1.5)(.75,1.5)(.9,1.2)(.5,1.2) +% (.6,1)(.8,.9)(.7,.75)(0,.9)(-.1,1) +% \Line(.1,1.4)(.3,1.5) +% \polygon*(-.5,1)(-1,0)(-1,-.5)(-.75,-1)(.5,-1) +% (0,-1.8)(.2,-1.9)(.3,-1.7)(.4,-2)(1,-2) +% (.5,-1.8)(.5,-1.5)(.8,-1.6)(1,-.75)(0,-.5) +% (0,-.3)(.7,-.3)(.9,-.2)(1,0)(0,0) +% (0,.7) +% \polygon*(-1.5,1)(-1.4,1.5)(-1,2)(-.5,2)(0,1.75) +% (.5,1.9)(1.25,1.75)(0,1.5)(-.5,1)(-1,.8) +% (-1.2,1)(-1,1)(-.5,1.5)(-1,1.75)(-1.3,1.5) +% ^^A +% ^^A The cat: +% \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) +% \linethickness{3pt} +% \cbezier(1.6,.3)(1,0)(2.1,-.2)(1.5,-.5) +% \end{picture} +% +% \bigskip\bigskip\bigskip +% +% 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{4pt} +% \Line(-2,-2)(6,2) +% \linethickness{2pt} +% \Line(-2,-2)(-5,-2.5) +% \Line(-2,-2)(-4.85,-2.95) +% \Line(-2,-2)(-4.6,-3.3) +% \Line(-2,-2)(-4.35,-3.65) +% \Line(-2,-2)(-4,-4) +% \put(-3,-1.2){\magicstar{.4}} +% \put(-4.1,-.8){\magicstar{.8}} +% \put(-5.4,-1.8){\magicstar{.6}} +% \Line(0,1.8)(-.2,1.4) +% \polyline(.6,3.2)(.8,3)(1.5,3) +% \put(1.6,3){\oval(.2,.2)[tl]} +% \put(1.6,3){\oval(.2,.2)[r]} +% \polyline(1.6,2.9)(1.8,2.4)(1.2,2.4)(1,2.5)(1,2.3) +% (1.2,2)(1.6,1.8)(1.7,1.8)(1.7,1.6)(1.4,1.5) +% (0,1.8)(-.2,2) +% \Line(.2,2.8)(.6,3) +% \polygon*(-1,2)(-2,0)(-2,-1)(-1.5,-2)(1,-2) +% (0,-3.6)(.4,-3.8)(.6,-3.4)(.8,-4)(2,-4) +% (1,-3.6)(1,-3)(1.6,-3.2)(2,-1.5)(0,-1) +% (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) +% \linethickness{.4pt} +% \Line(1.7,1.6)(2,1.6) +% \Line(1.7,1.6)(1.9,1.4) +% \Line(1.7,1.6)(1.7,1.3) +% ^^A +% ^^A The cat: +% \put(3.6,1){\circle*{1.2}} +% \put(4.2,1.4){\circle*{1}} +% \put(4.5,2){\circle*{.8}} +% \polygon*(4.1,2)(4.1,2.5)(4.5,2.2)(4.9,2.5)(4.9,2) +% \linethickness{4pt} +% \cbezier(3.2,.6)(2,0)(4.2,-.4)(3,-1) +% \buttcap +% \linethickness{.4pt} +% \Line(3.8,2.1)(5.2,1.9) +% \Line(3.8,2)(5.2,2) +% \Line(3.8,1.9)(5.2,2.1) +% \end{picture} +% +% \caption{Sketches of the witch} +% \label{fig:witch} +% \end{figure} +% +% \begin{macro}{\@HwM@large@witch} +% This is the macro that draws the ``large'' version of the witch (for +% "\displaystyle"). This is the ``private'' variant, with the following +% parameters: +% \begin{paramlist} +% \param{1} +% "l"~for a right-facing witch, "r"~for a left-facing one;\\ +% \param{2} +% "r"~for a right-facing witch, "l"~for a left-facing one;\\ +% \param{3} +% main drawing thickness, in units of the default-rule-thickness +% "\fontdimen";\\ +% \param{4} +% 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. +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@large@witch[5]{% + \begin{@HwM@large@picture}{12}{-6}% + \roundcap + \linethickness{#4\@HwM@thickness@units@for \textfont}% + \Line(\-2,-2)(\+6,2)% + \linethickness{#3\@HwM@thickness@units@for \textfont}% + \Line(\-2,-2)(\-5,-2.5)% + \Line(\-2,-2)(\-4.85,-2.95)% + \Line(\-2,-2)(\-4.6,-3.3)% + \Line(\-2,-2)(\-4.35,-3.65)% + \Line(\-2,-2)(\-4,-4)% + \put(\-3,-1.2){\@HwM@magic@star{.4}}% + \put(\-4.1,-.8){\@HwM@magic@star{.8}}% + \put(\-5.4,-1.8){\@HwM@magic@star{.6}}% + \Line(0,1.8)(\-.2,1.4)% + \polyline(\+.6,3.2)(\+.8,3)(\+1.5,3)% + \put(\+1.6,3){\oval(.2,.2)[t#1]}% + \put(\+1.6,3){\oval(.2,.2)[#2]}% + \polyline(\+1.6,2.9)(\+1.8,2.4)(\+1.2,2.4)(\+1,2.5)(\+1,2.3)% + (\+1.2,2)(\+1.6,1.8)(\+1.7,1.8)(\+1.7,1.6)(\+1.4,1.5)% + (0,1.8)(\-.2,2)% + \polygon*(\-1,2)(\-2,0)(\-2,-1)(\-1.5,-2)(\+1,-2)% + (0,-3.6)(\+.4,-3.8)(\+.6,-3.4)(\+.8,-4)(\+2,-4)% + (\+1,-3.6)(\+1,-3)(\+1.6,-3.2)(\+2,-1.5)(0,-1)% + (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)% + \buttcap +% \end{macrocode} +% The witch's eye: +% \begin{macrocode} + \Line(\+.2,2.8)(\+.6,3)% +% \end{macrocode} +% Rest of the code: +% \begin{macrocode} + \linethickness{#5\p@}% + \Line(\+1.7,1.6)(\+2,1.6)% + \Line(\+1.7,1.6)(\+1.9,1.4)% + \Line(\+1.7,1.6)(\+1.7,1.3)% + \if@HwM@cat@ + \Line(\+3.8,2.1)(\+5.2,1.9)% + \Line(\+3.8,2)(\+5.2,2)% + \Line(\+3.8,1.9)(\+5.2,2.1)% + \roundcap + \linethickness{#4\@HwM@thickness@units@for \textfont}% + \put(\+3.6,1){\circle*{1.2}}% + \put(\+4.2,1.4){\circle*{1}}% + \put(\+4.5,2){\circle*{.8}}% + \polygon*(\+4.1,2)(\+4.1,2.5)(\+4.5,2.2)(\+4.9,2.5)(\+4.9,2)% + \cbezier(\+3.2,.6)(\+2,0)(\+4.2,-.4)(\+3,-1)% + \fi + \end{@HwM@large@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Large@Witch} +% The ``public'' variant of the above, with the following parameters: +% \begin{paramlist} +% \param{1} +% "l"~for a right-facing witch, "r"~for a left-facing one;\\ +% \param{2} +% "r"~for a right-facing witch, "l"~for a left-facing one. +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@Large@Witch[2]{% + \@HwM@choose@thicknesses{\@HwM@large@witch #1#2}% + {{.4}{1.8}{.1}}% + {{.8}{2.7}{.15}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@common@small@body} +% The macros that draw the ``small'' version of the witch (for styles others +% than "\displaystyle") are more complex, because some parts of the drawing +% are shared also by the extensible brooms ("\xrightwicthonbroom", +% "\overrightwitchonbroom", and the like). The following macro draws the +% 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} +% line thickness for the witch's face, in relative units. +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@common@small@body[2]{% + \linethickness{#2\@HwM@thickness@units@for #1}% + \buttcap +% \end{macrocode} +% The witch's eye: +% \begin{macrocode} + \Line(\+.1,1.4)(\+.3,1.5)% +% \end{macrocode} +% Rest of the code: +% \begin{macrocode} + \roundcap + \Line(0,.9)(\-.1,.7)% + \polyline(\+.3,1.6)(\+.4,1.5)(\+.75,1.5)(\+.9,1.2)(\+.5,1.2)% + (\+.6,1)(\+.8,.9)(\+.7,.75)(0,.9)(\-.1,1)% + \polygon*(\-.5,1)(\-1,0)(\-1,-.5)(\-.75,-1)(\+.5,-1)% + (0,-1.8)(\+.2,-1.9)(\+.3,-1.7)(\+.4,-2)(\+1,-2)% + (\+.5,-1.8)(\+.5,-1.5)(\+.8,-1.6)(\+1,-.75)(0,-.5)% + (0,.7)% + \polygon*(\-1.5,1)(\-1.4,1.5)(\-1,2)(\-.5,2)(0,1.75)% + (\+.5,1.9)(\+1.25,1.75)(0,1.5)(\-.5,1)(\-1,.8)% + (\-1.2,1)(\-1,1)(\-.5,1.5)(\-1,1.75)(\-1.3,1.5)% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Common@Small@Body} +% The ``public'' variant of the above; parameters: +% \begin{paramlist} +% \param{1} +% font selector (\emph{e.g.}, "\textfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@Common@Small@Body[1]{% + \@HwM@choose@thicknesses {\@HwM@common@small@body #1}{{.35}}{{.7}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@common@small@cat} +% Draw 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} +% line thickness for the cat's tail, in relative units. +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@common@small@cat[2]{% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \if@HwM@cat@ + \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)% + \cbezier(\+1.8,.4)(\+1.2,.1)(\+2,-.1)(\+1.4,-.4)% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Common@Small@Cat} +% The ``public'' variant of the above; parameters: +% \begin{paramlist} +% \param{1} +% font selector (\emph{e.g.}, "\textfont"). +% \end{paramlist} +% \begin{macrocode} +\newcommand*\@HwM@Common@Small@Cat[1]{% + \@HwM@choose@thicknesses {\@HwM@common@small@cat #1}{{}}{{2}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@HwM@Small@Witch} +% This is the macro that draws the complete ``small'' variant of the witch +% (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"). +% \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@Witch[2]{% + \begin{@HwM@small@picture}#2{6}{-3}% + \@HwM@Common@Small@Cat #2% + \Line(\-1,-1)(\+3,1)% + \@HwM@Common@Small@Body #2% + \Line(\-1,-1)(\-2.5,-1.25)% + \Line(\-1,-1)(\-2.4,-1.5)% + \Line(\-1,-1)(\-2.25,-1.75)% + \Line(\-1,-1)(\-2,-2)% + \put(\-1.7,-.4){\@HwM@magic@star{.4}}% + \put(\-2.7,-.8){\@HwM@magic@star{.25}}% + \polygon*(0,-.3)(\+.7,-.3)(\+.9,-.2)(\+1,0)(0,0)% + \end{@HwM@small@picture}% +} +% \end{macrocode} +% \end{macro} +% +% \textbf{Uncommented code} starts here. +% \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}% +} +% +% Drawing the cat on a horizontal broomstick: +\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}% +} +% +% Pumpkins. +\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}}% +} +\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}% + \roundcap + \linethickness{#1\@HwM@thickness@units@for \textfont}% + \Line(-.15,2.25)(-.3,3)(.3,3)(.15,2.25)% + \Line(-.15,-2.7)(.15,-2.7)% + \@HwM@large@pumpkin@profile-% + \@HwM@large@pumpkin@profile+% + \polygon*(0,.35)(-.35,-.35)(.35,-.35)% + \@HwM@large@pumpkin@mouth{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{@HwM@oplus@picture}% +} +\newcommand*\@HwM@Large@Pumpkin{% + \@HwM@choose@thicknesses \@HwM@large@pumpkin + {{1.8}}% + {{2.2}}% +} +\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}}% +} +\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}% + \roundcap + \linethickness{#3\@HwM@thickness@units@for #2}% + \Line(-.1,1.5)(-.15,2)(.15,2)(.1,1.5)% + \Line(-.1,-1.8)(.1,-1.8)% + \@HwM@small@pumpkin@profile-% + \@HwM@small@pumpkin@profile+% + \polygon*(0,.2)(-.2,-.2)(.2,-.2)% + \@HwM@small@pumpkin@mouth{1.3,-.3}{.8,-.8}{.5,-.7}% + {-1}% + {.7,-.6}{.4,-.5}% + {-.7}% + \end{@HwM@oplus@picture}% +} +\newcommand*\@HwM@Small@Pumpkin[2]{% + \@HwM@choose@thicknesses{\@HwM@small@pumpkin #1#2}% + {{}}% + {{1.5}}% +} +\newcommand*\@HwM@oplus@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]{% + \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@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}% + {{.6}}% + {{1.2}}% +} +% +% Clouds. +\newcommand*\@HwM@large@cloud[1]{% + \begin{@HwM@large@picture}{12}{-6}% + \roundcap + \linethickness{#1\@HwM@thickness@units@for \textfont}% + \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{@HwM@large@picture}% +} +\newcommand*\@HwM@Large@Cloud{% + \@HwM@choose@thicknesses \@HwM@large@cloud + {{.8}}% + {{1.6}}% +} +\newcommand*\@HwM@small@cloud[2]{% + \begin{@HwM@small@picture}#1{6}{-3}% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \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{@HwM@small@picture}% +} +\newcommand*\@HwM@Small@Cloud[2]{% + \@HwM@choose@thicknesses{\@HwM@small@cloud #2}% + {{.5}}% + {{1.2}}% +} +% +% Ghosts. +\newcommand*\@HwM@symm@ghost@contour[8]{% + \cbezier(-#1,#2)(-#3,#4)(-#3,#5)(-#3,#6)% + \Line(-#3,#6)(-#3,#7)% + \cbezier(#1,#2)(#3,#4)(#3,#5)(#3,#6)% + \Line(#3,#6)(#3,#7)% + \cbezier(-#3,#7)(-#3,#8)(#3,#8)(#3,#7)% +} +\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)% +} +\newcommand*\@HwM@symm@ghost@eyes[3]{% + \put(-#1,#2){\circle*{#3}}% + \put(#1,#2){\circle*{#3}}% +} +\newcommand*\@HwM@symmetric@ghost[3]{% + \begin{@HwM@math@picture}{2.6}{-1}% + {\@HwM@d@pict@strut{.6}}#1{3.2}{-1.6}% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \@HwM@symm@ghost@contour{1.5}{-1.5}{1}{-1}{-.5}{0}{.5}{2}% + \linethickness{#3\@HwM@thickness@units@for #1}% + \@HwM@symm@ghost@border{1.5}{-1.5}{1.1}{-1.1}{.7}{-1.9}{.3}{-1.2}% + \@HwM@symm@ghost@eyes{.4}{.7}{.4}% + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@Symmetric@Ghost[2]{% + \@HwM@choose@thicknesses{\@HwM@symmetric@ghost #2}% + {{.9}{.6}}% + {{1.8}{1.2}}% +} +\newcommand*\@HwM@asymmetric@ghost[3]{% + \begin{@HwM@math@picture}{2.6}{-1}% + {\@HwM@d@pict@strut{.6}}#1{3.8}% + {-\@HwM@right@or@left{1.6}{2.2}}% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \cbezier(\-1.75,-1.5)(\-1,-1)(\-.7,-.5)(\-.5,0)% + \cbezier(\-.5,0)(\-.3,.5)(0,1.6)(\+1,1.6)% + \cbezier(\+1,1.6)(\+1.8,1.6)(\+1.8,.9)(\+1.8,.6)% + \cbezier(\+1.8,.6)(\+1.8,-.3)(\+.9,-.7)(\+1.25,-1.5)% + \linethickness{#3\@HwM@thickness@units@for #1}% + \cbezier(\-1.75,-1.5)(\-1.4,-1.2)(\-1.1,-1.8)(\-.75,-1.5)% + \cbezier(\-.75,-1.5)(\-.4,-1.2)(\-.1,-1.8)(\+.25,-1.5)% + \cbezier(\+.25,-1.5)(\+.6,-1.2)(\+.9,-1.8)(\+1.25,-1.5)% + \put(\+1.2,.7){\circle*{.4}}% + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@Asymmetric@Ghost[2]{% + \@HwM@choose@thicknesses{\@HwM@asymmetric@ghost #2}% + {{.9}{.6}}% + {{1.8}{1.2}}% +} + +% Extensible arrow-like symbols. +\newlength\@HwM@arrowfill@skip +% \end{macrocode} +% +% \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 +% \meta{style selctor} is a single token like "\displaystyle" or +% "\scriptscriptstyle", and \meta{font selector} is a single token like +% "\textfont" or "\scriptfont"; then +% \begin{flushleft} +% "\@HwM@auto@font@selector{"\meta{something}"}"\meta{style selector} +% \end{flushleft} +% is transformed into +% \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 +% 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, +% \begin{flushleft} +% "\@HwM@auto@font@selector{"\meta{something}"}\scriptstyle" +% \end{flushleft} +% is transformed into +% \begin{flushleft} +% \meta{something}"\scriptstyle\scriptfont" +% \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 +% 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 + \else \ifx\scriptstyle #2% + \scriptfont + \else \ifx\scriptscriptstyle #2% + \scriptscriptfont + \fi\fi\fi\fi + }% + \expandafter \@tempa \expandafter #2\@tempb +} +% \end{macrocode} +% \end{macro} +% +% \textbf{Uncommented code} again. +% \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}}% +} +\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 + \thinmuskip \thickmuskip + \setlength\@HwM@arrowfill@skip + {#2\fontdimen 6 #4\tw@ \@plus \@ne fill}% + #3% + #1#3#4% + $% +} +\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 + \mkern-7mu#3\relax + #5#6#7% +} +\newcommand*\@HwM@rightbroomfill@Wwac@{% + \@HwM@set@right@dir + \@HwM@enriched@arrowfill@ \ni\relbar\relbar + \@gobbletwo + \@HwM@right@add@witch@cat + \@ne +} +\newcommand*\@HwM@right@add@witch@cat[2]{% + \hskip -\glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \@HwM@Small@Witch@Wo@Broom #2% + \if@HwM@cat@ + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \@HwM@Small@Cat@On@Hori@Broom #2% + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \else + \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \fi +}% +\newcommand*\@HwM@leftbroomfill@Wwac@{% + \@HwM@set@left@dir + \@HwM@enriched@arrowfill@ \relbar\relbar\in + \@HwM@left@add@witch@cat + \@gobbletwo + \@ne +} +\newcommand*\@HwM@left@add@witch@cat[2]{% + \if@HwM@cat@ + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \@HwM@Small@Cat@On@Hori@Broom #2% + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \else + \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \fi + \@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% + \dimen@ \dimen4 + \@HwM@calc@swish@thickness +} +\newcommand*\@HwM@calc@swish@thickness{% + \dimen@ii -\dimen@ + \advance \dimen@ii \dimen6 +} +\newcommand*\@HwM@swish@leaders{% + \leaders \hrule \@height\dimen@ \@depth\dimen@ii \hskip +} +\newcommand*\@HwM@right@ghost@swish[2]{% + \@HwM@init@swish@dimens #2% + \hskip \glueexpr \@HwM@arrowfill@skip/4\relax + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/4\relax + \hskip \glueexpr \@HwM@arrowfill@skip/8\relax + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/8\relax + \hskip -\@HwM@arrowfill@skip + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/4 \relax + \hskip \glueexpr \@HwM@arrowfill@skip/8\relax + \@HwM@swish@leaders + \glueexpr \@HwM@arrowfill@skip/8+\dimen4 /\tw@ \relax + \hskip -\glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@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% + \@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 + \hskip -\glueexpr \@HwM@arrowfill@skip*\thr@@/4+\dimen4 /\tw@ \relax + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@HwM@swish@leaders + \glueexpr \@HwM@arrowfill@skip/8+\dimen4 /\tw@\relax + \hskip \glueexpr \@HwM@arrowfill@skip/8\relax + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/4\relax + \hskip -\glueexpr \@HwM@arrowfill@skip +\dimen4 \relax + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@HwM@swish@leaders + \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax + \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax +} +\newcommand*\@HwM@rightghostfill@{% + \@HwM@extended@arrowfill@ \@HwM@right@ghost@swish {.5}% +} +\newcommand*\@HwM@leftghostfill@{% + \@HwM@extended@arrowfill@ \@HwM@left@ghost@swish {.5}% +} + +% 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 + % style selections. + \mathchoice + {#1\displaystyle \scriptstyle {#2}}% + {#1\textstyle \scriptstyle {#2}}% + {#1\scriptstyle \scriptscriptstyle {#2}}% + {#1\scriptscriptstyle \scriptscriptstyle {#2}}% +} +\newcommand*\@HwM@variable@mathpalette[2]{% + \mathchoice + {#1}% + {#2\textstyle \textfont }% + {#2\scriptstyle \scriptfont }% + {#2\scriptscriptstyle \scriptscriptfont}% +} +\newcommand*\@HwM@constant@mathpalette[1]{% + \mathchoice + {#1\displaystyle \textfont }% + {#1\textstyle \textfont }% + {#1\scriptstyle \scriptfont }% + {#1\scriptscriptstyle \scriptscriptfont}% +} + +% General calls: +\newcommand*\@HwM@general@large@operator[2]{% + \mathop{% + \@HwM@variable@mathpalette{#1}{#2}% + }\slimits@ +} +\newcommand*\@HwM@general@inner@symbol[2]{% + \mathinner{% + \@HwM@variable@mathpalette{#1}{#2}% + }% +} +\newcommand*\@HwM@general@binary@operation[1]{% + \mathbin{% + \@HwM@constant@mathpalette{#1}% + }% +} +\newcommand*\@HwM@general@ordinary@symbol[1]{% + \mathord{% + \@HwM@constant@mathpalette{#1}% + }% +} +\newcommand*\@HwM@ifstar@cat[1]{% + \@ifstar + {\@HwM@cat@true #1}% + {\@HwM@cat@false #1}% +} + +% +% User-level commands: +\newcommand*\mathwitch{% + \DOTSB + \@HwM@set@right@dir + \@HwM@ifstar@cat{\@HwM@mathwitch lr}% +} +\newcommand*\reversemathwitch{% + \DOTSB + \@HwM@set@left@dir + \@HwM@ifstar@cat{\@HwM@mathwitch rl}% +} +\newcommand*\@HwM@mathwitch[2]{% + \@HwM@general@large@operator {\@HwM@Large@Witch #1#2}\@HwM@Small@Witch +} + +\newcommand*\pumpkin{% + \DOTSB + \@HwM@general@binary@operation \@HwM@Oplus@Pumpkin +} +\newcommand*\bigpumpkin{% + \DOTSB + \@HwM@general@large@operator \@HwM@Large@Pumpkin \@HwM@Small@Pumpkin +} +\@ifdefinable\greatpumpkin{\let\greatpumpkin=\bigpumpkin} + +\newcommand*\mathcloud {\@HwM@set@right@dir \@HwM@mathcloud} +\newcommand*\reversemathcloud{\@HwM@set@left@dir \@HwM@mathcloud} +\newcommand*\@HwM@mathcloud{% + \@HwM@general@inner@symbol \@HwM@Large@Cloud \@HwM@Small@Cloud +} + +\newcommand*\mathghost{% + \@HwM@general@ordinary@symbol \@HwM@Symmetric@Ghost +} +\newcommand*\mathrightghost{\@HwM@set@right@dir \@HwM@mathghost} +\newcommand*\mathleftghost {\@HwM@set@left@dir \@HwM@mathghost} +\newcommand*\@HwM@mathghost{% + \@HwM@general@ordinary@symbol \@HwM@Asymmetric@Ghost +} +% +% Accents. +\newcommand*\@HwM@dblstyle@overarrow@[4]{% + % #1 := stretchable covering arrow + % #2 := base style + % #3 := style for covering arrow + % #4 := base symbol + \vbox{\ialign{##\crcr + #1#3\crcr + \noalign{\nointerlineskip}% + $\m@th\hfil #2#4\hfil$\crcr + }}% +} +\newcommand*\@HwM@dblstyle@underarrow@[4]{% + % #1 := stretchable underlying arrow + % #2 := base style + % #3 := style for underlying arrow + % #4 := base symbol + \vtop{\ialign{##\crcr + $\m@th\hfil #2#4\hfil$\crcr + \noalign{\nointerlineskip \kern\ex@}% + #1#3\crcr + }}% +} +\newcommand*\@HwM@general@ou@w@cat[1]{% + \@HwM@ifstar@cat{\@HwM@dblstyle@mathpalette{#1}}% +} +\newcommand*\overrightwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@rightbroomfill@Wwac@}% +} +\newcommand*\overleftwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@leftbroomfill@Wwac@}% +} +\newcommand*\overrightswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightghostfill@}% +} +\newcommand*\overleftswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftghostfill@}% +} +\newcommand*\underrightwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@rightbroomfill@Wwac@}% +} +\newcommand*\underleftwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@leftbroomfill@Wwac@}% +} +\newcommand*\underrightswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightghostfill@}% +} +\newcommand*\underleftswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftghostfill@}% +} +% +% The script version of standard over/under arrows. +\newcommand*\overscriptrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \rightarrowfill@}% +} +\newcommand*\overscriptleftarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \leftarrowfill@}% +} +\newcommand*\overscriptleftrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \leftrightarrowfill@}% +} +\newcommand*\underscriptrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \rightarrowfill@}% +} +\newcommand*\underscriptleftarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \leftarrowfill@}% +} +\newcommand*\underscriptleftrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \leftrightarrowfill@}% +} +% +% Extensible "arrow-like" symbols. +\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}% +} +\newcommand*\@HwM@ext@arrow@w@cat@x[2][]{% + \@HwM@tempa {#1}{#2}% +} +\newcommand*\xrightwitchonbroom{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@Wwac@% +} +\newcommand*\xleftwitchonbroom{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@Wwac@% +} +\newcommand*\xrightswishingghost[2][]{% + \ext@arrow 3{12}5{15}\@HwM@rightghostfill@{#1}{#2}% +} +\newcommand*\xleftswishingghost[2][]{% + \ext@arrow {12}3{15}5\@HwM@leftghostfill@{#1}{#2}% +} +% \end{macrocode} +% +% End of the module for the \packlass{\halloweenmath} package. +% \begin{macrocode} +%</halloweenmath> +% \end{macrocode} +% +% \section{End of input} +% +% The usual "\endinput" which prevents the \DS\ program from putting +% garbage into the generated files. +% \begin{macrocode} +\endinput +% \end{macrocode} +% +% \Finale +% diff --git a/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins new file mode 100644 index 00000000000..98ed0480772 --- /dev/null +++ b/Master/texmf-dist/source/latex/halloweenmath/halloweenmath.ins @@ -0,0 +1,172 @@ +% +% This is file `halloweenmath.ins'. +% +% This file is part of a work named "halloweenmath package". +% +% Copyright (C) 2017 by Gustavo MEZZETTI. +% +% The halloweenmath package may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% The halloweenmath package has the LPPL maintenance status +% "author-maintained". +% +% The file `manifest.txt' that comes along with this file specifies +% what the halloweenmath package consists of; more 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. +% +% 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) +% +\input docstrip + +\def\filename{halloweenmath.dtx} + +\newif\ifWritingToDirectoryOfTDS +\WritingToDirectoryOfTDSfalse + +\edef\WriteToDir{\WriteToDir} +\def\TryToUseMyDir{% + \usedir{tex/latex/halloweenmath} + \ifx \destdir\WriteToDir \else + \WritingToDirectoryOfTDStrue + \fi +} +\def\Y{Y} + + + +\Msg{----------------------------------------------------------------} +\Msg{} +\Msg{Unpacking the halloweenmath package.} +\Msg{} +\Msg{Please note: \space I will now try to install the generated files into} +\Msg{their own TeX directory, using the \string\usedir\space facility of DocStrip;} +\Msg{if that fails, they will be just saved in the current directory.} +\Msg{In this case, in order to finish the installation, you will have} +\Msg{to move them into a directory where LaTeX can find them: see the} +\Msg{documentation specific to your TeX implementation to learn where} +\Msg{such directories are located on your system.} +\Msg{} + +\catcode`\@ = 11 + +\ifx \usedir\alt@usedir + +\Msg{On your system, the name of the installation directory should be} +\Msg{} +\Msg{\space\space\space\space\showdirectory{tex/latex/halloweenmath}} +\Msg{} +\Msg{Please make sure that the above directory exists on your system,} +\Msg{and that you have permission to create or overwrite files in it;} +\Msg{if so, you may choose to put the generated files directly there.} +\Msg{} +\Msg{----------------------------------------------------------------} +\Msg{} +\Msg{Put files directly in suggested directory} +\Msg{\space\space\space\space\showdirectory{tex/latex/halloweenmath}} +\Ask\answer{or not? [y/n]} + +\ifx \answer\yes + \TryToUseMyDir +\else \ifx \answer\y + \TryToUseMyDir +\else \ifx \answer\Y + \TryToUseMyDir +\fi \fi \fi + +\else % of \ifx \usedir\alt@usedir + +\Msg{It seems that the configuration of your system does not allow us} +\Msg{to use the \string\usedir\space facility: writing files to current directory.} + +\fi % of \ifx \usedir\alt@usedir + +\Msg{} + +\ifWritingToDirectoryOfTDS + +\Msg{Trying to install files directly in the proposed directory.} +\Msg{} + +\else + +\Msg{Either you chose NOT to install files in the proposed directory,} +\Msg{or, despite your choice, your system is not configured to permit} +\Msg{you to do so. \space Therefore all files will be placed in the current} +\Msg{directory and you will have to move them to a suitable directory} +\Msg{by hand. \space At the end of this run, you will be presented with the} +\Msg{complete list of the files you need to move.} +\Msg{} +\Ask\answer{Press \space <return> \space to continue + (your \string\answer\space will be ignored).} + +\fi + +\preamble + +This is a generated file. +It is part of a work named "halloweenmath package". + +Copyright (C) 2017 by Gustavo MEZZETTI. + +The halloweenmath package may be distributed and/or modified under +the conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +The halloweenmath package has the LPPL maintenance status + "author-maintained". + +The file `manifest.txt' that comes along with this file specifies +what the halloweenmath package consists of; more 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. + +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) + +\endpreamble + +\askonceonly + +\generate{ + \file{halloweenmath.sty}{\from{\filename}{halloweenmath}} +} + +\Msg{} + +\ifWritingToDirectoryOfTDS + +\Msg{Installation finished. \space Check that the proposed directory} +\Msg{\space\space\space\space\showdirectory{tex/latex/halloweenmath}} +\Msg{has been correctly updated.} + +\else + +\Msg{To finish the installation, please move the following files into} +\Msg{a directory where LaTeX looks for inputs files:} +\Msg{} +\Msg{\space\space\space\space halloweenmath.sty} + +\fi + +\Msg{} +\Msg{Happy TeXing!} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty b/Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty new file mode 100644 index 00000000000..b54bf49c475 --- /dev/null +++ b/Master/texmf-dist/tex/latex/halloweenmath/halloweenmath.sty @@ -0,0 +1,755 @@ +%% +%% This is file `halloweenmath.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% halloweenmath.dtx (with options: `halloweenmath') +%% +%% This is a generated file. +%% It is part of a work named "halloweenmath package". +%% +%% Copyright (C) 2017 by Gustavo MEZZETTI. +%% +%% The halloweenmath package may be distributed and/or modified under +%% the conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% The halloweenmath package has the LPPL maintenance status +%% "author-maintained". +%% +%% The file `manifest.txt' that comes along with this file specifies +%% what the halloweenmath package consists of; more 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. +%% +%% 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) +%% +%% \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 +%% Lower-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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e}[2004/06/01] % LaTeX2e is required! +\ProvidesPackage{halloweenmath} + [2017/01/06 v0.01 (development)] +\RequirePackage{amsmath,pict2e} +\@ifdefinable\@HwM@tempa{} +\newcommand*\@HwM@thickness@units@for[1]{\fontdimen 8 #1\thr@@} +\@ifdefinable\@HwM@right@or@left{} +\newcommand*\@HwM@set@right@dir{% + \let \@HwM@right@or@left \@firstoftwo +} +\newcommand*\@HwM@set@left@dir{% + \let \@HwM@right@or@left \@secondoftwo +} +\newenvironment*{@HwM@math@picture}[6]{% + \setlength\unitlength{\fontdimen 22 #4\tw@}% + #3% + \@HwM@right@or@left{% + \def\+{+}% + \def\-{-}% + }{% + \def\+{-}% + \def\-{+}% + }% + \picture(#5,#1)(#6,#2)% +}{\endpicture} +\newcommand*\@HwM@short@circuited@vphant{\v@true\h@false\mathph@nt} +\newcommand*\@HwM@oplus@strut[1]{% + \@HwM@short@circuited@vphant #1\bigoplus@ +} +\newcommand*\@HwM@d@pict@strut[1]{% + \vrule \@width\z@ \@height\z@ \@depth #1\unitlength +} +\newcommand*\@HwM@large@picture{% + \@HwM@math@picture{5}{-1}{\@HwM@d@pict@strut\thr@@}\textfont +} +\let\end@HwM@large@picture = \end@HwM@math@picture +\newcommand*\@HwM@small@picture{% + \@HwM@math@picture{3}{-1}{\@HwM@d@pict@strut\@ne}% +} +\let\end@HwM@small@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@if@bold@math{% + \def\@tempa{bold}% + \ifx\math@version\@tempa + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*\@HwM@choose@thicknesses[3]{% + \@HwM@if@bold@math{#1#3}{#1#2} +} +\newcommand*{\@HwM@magic@star}[1]{% + \begingroup + \setlength\unitlength{#1\unitlength}% + \picture(0,0)% + \polygon*(0,1)(-.225,.309)(-.951,.309)(-.363,-.118)(-.588,-.809)% + (0,-.382)(.588,-.809)(.363,-.118)(.951,.309)(.225,.309)% + \endpicture + \endgroup +} +\newcommand*\@HwM@large@witch[5]{% + \begin{@HwM@large@picture}{12}{-6}% + \roundcap + \linethickness{#4\@HwM@thickness@units@for \textfont}% + \Line(\-2,-2)(\+6,2)% + \linethickness{#3\@HwM@thickness@units@for \textfont}% + \Line(\-2,-2)(\-5,-2.5)% + \Line(\-2,-2)(\-4.85,-2.95)% + \Line(\-2,-2)(\-4.6,-3.3)% + \Line(\-2,-2)(\-4.35,-3.65)% + \Line(\-2,-2)(\-4,-4)% + \put(\-3,-1.2){\@HwM@magic@star{.4}}% + \put(\-4.1,-.8){\@HwM@magic@star{.8}}% + \put(\-5.4,-1.8){\@HwM@magic@star{.6}}% + \Line(0,1.8)(\-.2,1.4)% + \polyline(\+.6,3.2)(\+.8,3)(\+1.5,3)% + \put(\+1.6,3){\oval(.2,.2)[t#1]}% + \put(\+1.6,3){\oval(.2,.2)[#2]}% + \polyline(\+1.6,2.9)(\+1.8,2.4)(\+1.2,2.4)(\+1,2.5)(\+1,2.3)% + (\+1.2,2)(\+1.6,1.8)(\+1.7,1.8)(\+1.7,1.6)(\+1.4,1.5)% + (0,1.8)(\-.2,2)% + \polygon*(\-1,2)(\-2,0)(\-2,-1)(\-1.5,-2)(\+1,-2)% + (0,-3.6)(\+.4,-3.8)(\+.6,-3.4)(\+.8,-4)(\+2,-4)% + (\+1,-3.6)(\+1,-3)(\+1.6,-3.2)(\+2,-1.5)(0,-1)% + (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)% + \buttcap + \Line(\+.2,2.8)(\+.6,3)% + \linethickness{#5\p@}% + \Line(\+1.7,1.6)(\+2,1.6)% + \Line(\+1.7,1.6)(\+1.9,1.4)% + \Line(\+1.7,1.6)(\+1.7,1.3)% + \if@HwM@cat@ + \Line(\+3.8,2.1)(\+5.2,1.9)% + \Line(\+3.8,2)(\+5.2,2)% + \Line(\+3.8,1.9)(\+5.2,2.1)% + \roundcap + \linethickness{#4\@HwM@thickness@units@for \textfont}% + \put(\+3.6,1){\circle*{1.2}}% + \put(\+4.2,1.4){\circle*{1}}% + \put(\+4.5,2){\circle*{.8}}% + \polygon*(\+4.1,2)(\+4.1,2.5)(\+4.5,2.2)(\+4.9,2.5)(\+4.9,2)% + \cbezier(\+3.2,.6)(\+2,0)(\+4.2,-.4)(\+3,-1)% + \fi + \end{@HwM@large@picture}% +} +\newcommand*\@HwM@Large@Witch[2]{% + \@HwM@choose@thicknesses{\@HwM@large@witch #1#2}% + {{.4}{1.8}{.1}}% + {{.8}{2.7}{.15}}% +} +\newcommand*\@HwM@common@small@body[2]{% + \linethickness{#2\@HwM@thickness@units@for #1}% + \buttcap + \Line(\+.1,1.4)(\+.3,1.5)% + \roundcap + \Line(0,.9)(\-.1,.7)% + \polyline(\+.3,1.6)(\+.4,1.5)(\+.75,1.5)(\+.9,1.2)(\+.5,1.2)% + (\+.6,1)(\+.8,.9)(\+.7,.75)(0,.9)(\-.1,1)% + \polygon*(\-.5,1)(\-1,0)(\-1,-.5)(\-.75,-1)(\+.5,-1)% + (0,-1.8)(\+.2,-1.9)(\+.3,-1.7)(\+.4,-2)(\+1,-2)% + (\+.5,-1.8)(\+.5,-1.5)(\+.8,-1.6)(\+1,-.75)(0,-.5)% + (0,.7)% + \polygon*(\-1.5,1)(\-1.4,1.5)(\-1,2)(\-.5,2)(0,1.75)% + (\+.5,1.9)(\+1.25,1.75)(0,1.5)(\-.5,1)(\-1,.8)% + (\-1.2,1)(\-1,1)(\-.5,1.5)(\-1,1.75)(\-1.3,1.5)% +} +\newcommand*\@HwM@Common@Small@Body[1]{% + \@HwM@choose@thicknesses {\@HwM@common@small@body #1}{{.35}}{{.7}}% +} +\newcommand*\@HwM@common@small@cat[2]{% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \if@HwM@cat@ + \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)% + \cbezier(\+1.8,.4)(\+1.2,.1)(\+2,-.1)(\+1.4,-.4)% + \fi +} +\newcommand*\@HwM@Common@Small@Cat[1]{% + \@HwM@choose@thicknesses {\@HwM@common@small@cat #1}{{}}{{2}}% +} +\newcommand*\@HwM@Small@Witch[2]{% + \begin{@HwM@small@picture}#2{6}{-3}% + \@HwM@Common@Small@Cat #2% + \Line(\-1,-1)(\+3,1)% + \@HwM@Common@Small@Body #2% + \Line(\-1,-1)(\-2.5,-1.25)% + \Line(\-1,-1)(\-2.4,-1.5)% + \Line(\-1,-1)(\-2.25,-1.75)% + \Line(\-1,-1)(\-2,-2)% + \put(\-1.7,-.4){\@HwM@magic@star{.4}}% + \put(\-2.7,-.8){\@HwM@magic@star{.25}}% + \polygon*(0,-.3)(\+.7,-.3)(\+.9,-.2)(\+1,0)(0,0)% + \end{@HwM@small@picture}% +} +\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}% +} +\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}% +} +\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}}% +} +\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}% + \roundcap + \linethickness{#1\@HwM@thickness@units@for \textfont}% + \Line(-.15,2.25)(-.3,3)(.3,3)(.15,2.25)% + \Line(-.15,-2.7)(.15,-2.7)% + \@HwM@large@pumpkin@profile-% + \@HwM@large@pumpkin@profile+% + \polygon*(0,.35)(-.35,-.35)(.35,-.35)% + \@HwM@large@pumpkin@mouth{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{@HwM@oplus@picture}% +} +\newcommand*\@HwM@Large@Pumpkin{% + \@HwM@choose@thicknesses \@HwM@large@pumpkin + {{1.8}}% + {{2.2}}% +} +\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}}% +} +\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}% + \roundcap + \linethickness{#3\@HwM@thickness@units@for #2}% + \Line(-.1,1.5)(-.15,2)(.15,2)(.1,1.5)% + \Line(-.1,-1.8)(.1,-1.8)% + \@HwM@small@pumpkin@profile-% + \@HwM@small@pumpkin@profile+% + \polygon*(0,.2)(-.2,-.2)(.2,-.2)% + \@HwM@small@pumpkin@mouth{1.3,-.3}{.8,-.8}{.5,-.7}% + {-1}% + {.7,-.6}{.4,-.5}% + {-.7}% + \end{@HwM@oplus@picture}% +} +\newcommand*\@HwM@Small@Pumpkin[2]{% + \@HwM@choose@thicknesses{\@HwM@small@pumpkin #1#2}% + {{}}% + {{1.5}}% +} +\newcommand*\@HwM@oplus@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]{% + \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@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}% + {{.6}}% + {{1.2}}% +} +\newcommand*\@HwM@large@cloud[1]{% + \begin{@HwM@large@picture}{12}{-6}% + \roundcap + \linethickness{#1\@HwM@thickness@units@for \textfont}% + \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{@HwM@large@picture}% +} +\newcommand*\@HwM@Large@Cloud{% + \@HwM@choose@thicknesses \@HwM@large@cloud + {{.8}}% + {{1.6}}% +} +\newcommand*\@HwM@small@cloud[2]{% + \begin{@HwM@small@picture}#1{6}{-3}% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \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{@HwM@small@picture}% +} +\newcommand*\@HwM@Small@Cloud[2]{% + \@HwM@choose@thicknesses{\@HwM@small@cloud #2}% + {{.5}}% + {{1.2}}% +} +\newcommand*\@HwM@symm@ghost@contour[8]{% + \cbezier(-#1,#2)(-#3,#4)(-#3,#5)(-#3,#6)% + \Line(-#3,#6)(-#3,#7)% + \cbezier(#1,#2)(#3,#4)(#3,#5)(#3,#6)% + \Line(#3,#6)(#3,#7)% + \cbezier(-#3,#7)(-#3,#8)(#3,#8)(#3,#7)% +} +\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)% +} +\newcommand*\@HwM@symm@ghost@eyes[3]{% + \put(-#1,#2){\circle*{#3}}% + \put(#1,#2){\circle*{#3}}% +} +\newcommand*\@HwM@symmetric@ghost[3]{% + \begin{@HwM@math@picture}{2.6}{-1}% + {\@HwM@d@pict@strut{.6}}#1{3.2}{-1.6}% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \@HwM@symm@ghost@contour{1.5}{-1.5}{1}{-1}{-.5}{0}{.5}{2}% + \linethickness{#3\@HwM@thickness@units@for #1}% + \@HwM@symm@ghost@border{1.5}{-1.5}{1.1}{-1.1}{.7}{-1.9}{.3}{-1.2}% + \@HwM@symm@ghost@eyes{.4}{.7}{.4}% + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@Symmetric@Ghost[2]{% + \@HwM@choose@thicknesses{\@HwM@symmetric@ghost #2}% + {{.9}{.6}}% + {{1.8}{1.2}}% +} +\newcommand*\@HwM@asymmetric@ghost[3]{% + \begin{@HwM@math@picture}{2.6}{-1}% + {\@HwM@d@pict@strut{.6}}#1{3.8}% + {-\@HwM@right@or@left{1.6}{2.2}}% + \roundcap + \linethickness{#2\@HwM@thickness@units@for #1}% + \cbezier(\-1.75,-1.5)(\-1,-1)(\-.7,-.5)(\-.5,0)% + \cbezier(\-.5,0)(\-.3,.5)(0,1.6)(\+1,1.6)% + \cbezier(\+1,1.6)(\+1.8,1.6)(\+1.8,.9)(\+1.8,.6)% + \cbezier(\+1.8,.6)(\+1.8,-.3)(\+.9,-.7)(\+1.25,-1.5)% + \linethickness{#3\@HwM@thickness@units@for #1}% + \cbezier(\-1.75,-1.5)(\-1.4,-1.2)(\-1.1,-1.8)(\-.75,-1.5)% + \cbezier(\-.75,-1.5)(\-.4,-1.2)(\-.1,-1.8)(\+.25,-1.5)% + \cbezier(\+.25,-1.5)(\+.6,-1.2)(\+.9,-1.8)(\+1.25,-1.5)% + \put(\+1.2,.7){\circle*{.4}}% + \end{@HwM@math@picture}% +} +\newcommand*\@HwM@Asymmetric@Ghost[2]{% + \@HwM@choose@thicknesses{\@HwM@asymmetric@ghost #2}% + {{.9}{.6}}% + {{1.8}{1.2}}% +} + +\newlength\@HwM@arrowfill@skip +\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 +} +\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 + \thinmuskip \thickmuskip + \setlength\@HwM@arrowfill@skip + {#2\fontdimen 6 #4\tw@ \@plus \@ne fill}% + #3% + #1#3#4% + $% +} +\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 + \mkern-7mu#3\relax + #5#6#7% +} +\newcommand*\@HwM@rightbroomfill@Wwac@{% + \@HwM@set@right@dir + \@HwM@enriched@arrowfill@ \ni\relbar\relbar + \@gobbletwo + \@HwM@right@add@witch@cat + \@ne +} +\newcommand*\@HwM@right@add@witch@cat[2]{% + \hskip -\glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \@HwM@Small@Witch@Wo@Broom #2% + \if@HwM@cat@ + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \@HwM@Small@Cat@On@Hori@Broom #2% + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \else + \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \fi +}% +\newcommand*\@HwM@leftbroomfill@Wwac@{% + \@HwM@set@left@dir + \@HwM@enriched@arrowfill@ \relbar\relbar\in + \@HwM@left@add@witch@cat + \@gobbletwo + \@ne +} +\newcommand*\@HwM@left@add@witch@cat[2]{% + \if@HwM@cat@ + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \@HwM@Small@Cat@On@Hori@Broom #2% + \hskip \glueexpr \@HwM@arrowfill@skip/4 \relax + \else + \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \fi + \@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% + \dimen@ \dimen4 + \@HwM@calc@swish@thickness +} +\newcommand*\@HwM@calc@swish@thickness{% + \dimen@ii -\dimen@ + \advance \dimen@ii \dimen6 +} +\newcommand*\@HwM@swish@leaders{% + \leaders \hrule \@height\dimen@ \@depth\dimen@ii \hskip +} +\newcommand*\@HwM@right@ghost@swish[2]{% + \@HwM@init@swish@dimens #2% + \hskip \glueexpr \@HwM@arrowfill@skip/4\relax + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip/4\relax + \hskip \glueexpr \@HwM@arrowfill@skip/8\relax + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/8\relax + \hskip -\@HwM@arrowfill@skip + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/4 \relax + \hskip \glueexpr \@HwM@arrowfill@skip/8\relax + \@HwM@swish@leaders + \glueexpr \@HwM@arrowfill@skip/8+\dimen4 /\tw@ \relax + \hskip -\glueexpr \@HwM@arrowfill@skip/\tw@ \relax + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@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% + \@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 + \hskip -\glueexpr \@HwM@arrowfill@skip*\thr@@/4+\dimen4 /\tw@ \relax + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@HwM@swish@leaders + \glueexpr \@HwM@arrowfill@skip/8+\dimen4 /\tw@\relax + \hskip \glueexpr \@HwM@arrowfill@skip/8\relax + \@HwM@swish@leaders \glueexpr \@HwM@arrowfill@skip*\thr@@/4\relax + \hskip -\glueexpr \@HwM@arrowfill@skip +\dimen4 \relax + \advance \dimen@ \dimen4 + \@HwM@calc@swish@thickness + \@HwM@swish@leaders + \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax + \hskip \glueexpr \@HwM@arrowfill@skip/\tw@ +\dimen4 /\tw@ \relax +} +\newcommand*\@HwM@rightghostfill@{% + \@HwM@extended@arrowfill@ \@HwM@right@ghost@swish {.5}% +} +\newcommand*\@HwM@leftghostfill@{% + \@HwM@extended@arrowfill@ \@HwM@left@ghost@swish {.5}% +} + +\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 + % style selections. + \mathchoice + {#1\displaystyle \scriptstyle {#2}}% + {#1\textstyle \scriptstyle {#2}}% + {#1\scriptstyle \scriptscriptstyle {#2}}% + {#1\scriptscriptstyle \scriptscriptstyle {#2}}% +} +\newcommand*\@HwM@variable@mathpalette[2]{% + \mathchoice + {#1}% + {#2\textstyle \textfont }% + {#2\scriptstyle \scriptfont }% + {#2\scriptscriptstyle \scriptscriptfont}% +} +\newcommand*\@HwM@constant@mathpalette[1]{% + \mathchoice + {#1\displaystyle \textfont }% + {#1\textstyle \textfont }% + {#1\scriptstyle \scriptfont }% + {#1\scriptscriptstyle \scriptscriptfont}% +} + +\newcommand*\@HwM@general@large@operator[2]{% + \mathop{% + \@HwM@variable@mathpalette{#1}{#2}% + }\slimits@ +} +\newcommand*\@HwM@general@inner@symbol[2]{% + \mathinner{% + \@HwM@variable@mathpalette{#1}{#2}% + }% +} +\newcommand*\@HwM@general@binary@operation[1]{% + \mathbin{% + \@HwM@constant@mathpalette{#1}% + }% +} +\newcommand*\@HwM@general@ordinary@symbol[1]{% + \mathord{% + \@HwM@constant@mathpalette{#1}% + }% +} +\newcommand*\@HwM@ifstar@cat[1]{% + \@ifstar + {\@HwM@cat@true #1}% + {\@HwM@cat@false #1}% +} + +\newcommand*\mathwitch{% + \DOTSB + \@HwM@set@right@dir + \@HwM@ifstar@cat{\@HwM@mathwitch lr}% +} +\newcommand*\reversemathwitch{% + \DOTSB + \@HwM@set@left@dir + \@HwM@ifstar@cat{\@HwM@mathwitch rl}% +} +\newcommand*\@HwM@mathwitch[2]{% + \@HwM@general@large@operator {\@HwM@Large@Witch #1#2}\@HwM@Small@Witch +} + +\newcommand*\pumpkin{% + \DOTSB + \@HwM@general@binary@operation \@HwM@Oplus@Pumpkin +} +\newcommand*\bigpumpkin{% + \DOTSB + \@HwM@general@large@operator \@HwM@Large@Pumpkin \@HwM@Small@Pumpkin +} +\@ifdefinable\greatpumpkin{\let\greatpumpkin=\bigpumpkin} + +\newcommand*\mathcloud {\@HwM@set@right@dir \@HwM@mathcloud} +\newcommand*\reversemathcloud{\@HwM@set@left@dir \@HwM@mathcloud} +\newcommand*\@HwM@mathcloud{% + \@HwM@general@inner@symbol \@HwM@Large@Cloud \@HwM@Small@Cloud +} + +\newcommand*\mathghost{% + \@HwM@general@ordinary@symbol \@HwM@Symmetric@Ghost +} +\newcommand*\mathrightghost{\@HwM@set@right@dir \@HwM@mathghost} +\newcommand*\mathleftghost {\@HwM@set@left@dir \@HwM@mathghost} +\newcommand*\@HwM@mathghost{% + \@HwM@general@ordinary@symbol \@HwM@Asymmetric@Ghost +} +\newcommand*\@HwM@dblstyle@overarrow@[4]{% + % #1 := stretchable covering arrow + % #2 := base style + % #3 := style for covering arrow + % #4 := base symbol + \vbox{\ialign{##\crcr + #1#3\crcr + \noalign{\nointerlineskip}% + $\m@th\hfil #2#4\hfil$\crcr + }}% +} +\newcommand*\@HwM@dblstyle@underarrow@[4]{% + % #1 := stretchable underlying arrow + % #2 := base style + % #3 := style for underlying arrow + % #4 := base symbol + \vtop{\ialign{##\crcr + $\m@th\hfil #2#4\hfil$\crcr + \noalign{\nointerlineskip \kern\ex@}% + #1#3\crcr + }}% +} +\newcommand*\@HwM@general@ou@w@cat[1]{% + \@HwM@ifstar@cat{\@HwM@dblstyle@mathpalette{#1}}% +} +\newcommand*\overrightwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@rightbroomfill@Wwac@}% +} +\newcommand*\overleftwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@overarrow@ \@HwM@leftbroomfill@Wwac@}% +} +\newcommand*\overrightswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@rightghostfill@}% +} +\newcommand*\overleftswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \@HwM@leftghostfill@}% +} +\newcommand*\underrightwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@rightbroomfill@Wwac@}% +} +\newcommand*\underleftwitchonbroom{% + \@HwM@general@ou@w@cat + {\@HwM@dblstyle@underarrow@ \@HwM@leftbroomfill@Wwac@}% +} +\newcommand*\underrightswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@rightghostfill@}% +} +\newcommand*\underleftswishingghost{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \@HwM@leftghostfill@}% +} +\newcommand*\overscriptrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \rightarrowfill@}% +} +\newcommand*\overscriptleftarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \leftarrowfill@}% +} +\newcommand*\overscriptleftrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@overarrow@ \leftrightarrowfill@}% +} +\newcommand*\underscriptrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \rightarrowfill@}% +} +\newcommand*\underscriptleftarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \leftarrowfill@}% +} +\newcommand*\underscriptleftrightarrow{% + \@HwM@dblstyle@mathpalette + {\@HwM@dblstyle@underarrow@ \leftrightarrowfill@}% +} +\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}% +} +\newcommand*\@HwM@ext@arrow@w@cat@x[2][]{% + \@HwM@tempa {#1}{#2}% +} +\newcommand*\xrightwitchonbroom{% + \@HwM@ext@arrow@w@cat 9395\@HwM@rightbroomfill@Wwac@% +} +\newcommand*\xleftwitchonbroom{% + \@HwM@ext@arrow@w@cat 3959\@HwM@leftbroomfill@Wwac@% +} +\newcommand*\xrightswishingghost[2][]{% + \ext@arrow 3{12}5{15}\@HwM@rightghostfill@{#1}{#2}% +} +\newcommand*\xleftswishingghost[2][]{% + \ext@arrow {12}3{15}5\@HwM@leftghostfill@{#1}{#2}% +} +\endinput +%% +%% End of file `halloweenmath.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index aca5aaba919..e09712df97e 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -303,7 +303,7 @@ my @TLP_working = qw( greekdates greektex greektonoi greenpoint gregoriotex grfpaste grid grid-system gridset grotesq grundgesetze gsemthesis gtl gtrcrd gu guitar guitarchordschemes guitlogo gzt - h2020proposal hacm handout hands hang hanging hanoi + h2020proposal hacm halloweenmath handout hands hang hanging hanoi happy4th har2nat hardwrap harmony harnon-cv harpoon harvard harveyballs harvmac hatching hausarbeit-jura havannah hc he-she hep hepnames diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 335c7128dfd..b004bf30285 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2407,6 +2407,7 @@ my $core_latex = "$Master/texmf-dist/tex/latex"; 'german' => 'tex', 'gost' => 'latex', # requires interaction 'graphics-pln' => "env TEXINPUTS=$Master/texmf-dist/source/latex/base: latex", + 'halloweenmath' => 'latex', # requires interaction 'hf-tikz' => 'tex', 'hrlatex' => 'latex', # requires interaction 'isodoc' => 'luatex', diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index a70f5ce878e..b0a5ed62302 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -485,6 +485,7 @@ depend grid depend grid-system depend gridset depend guitlogo +depend halloweenmath depend handout depend hang depend hanging diff --git a/Master/tlpkg/tlpsrc/halloweenmath.tlpsrc b/Master/tlpkg/tlpsrc/halloweenmath.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/halloweenmath.tlpsrc |