\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}
