Third Addition (!)
Now that the nightmare depicted in my original answer has become real, let us try to lighten the spirits by considering @cfr’s comment about cats. I was forced to add another answer since the 30,000 character limit didn’t let me modify my previous one.
It is well-known that the effect of black magic on a formula can be quite warped by the presence of a cat; therefore, in this new version of the answer I supply starred forms of the \mathwitch
and \overrightbroom
commands, that add a cat on the broomstick. In this way you can use the appropriate symbol for either kind of magic. The syntax should be easy to remember, since the additional asterisk can be thought of as reminiscent of the cat.
Other changes include switching the test for the current math version to a LaTeX-style conditional and correcting some misleading comments.
Edit: Made the following changes:
slightly bigger cat (a little more visible at small sizes);
adjusted (widened) minimal size of the broom in the
\overrightbroom
command;
corrected an erroneous comment and wrong indentation of a line
in the code.
Here’s the amended code:
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{amsmath}
% \usepackage{amsfonts}
% \usepackage{amssymb}
% Old uncle Gustavo prefers to stick to the "picture" environment:
\usepackage{pict2e}
%--------------------------------------------------------------%
\makeatletter
\@ifdefinable\if@MWi@cat@{\newif\if@MWi@cat@}
% Drawing the larger witch:
\newcommand*\@MWi@Large@witch[4]{%
\setlength\unitlength{\fontdimen 22 #1\tw@}%
\vrule \@width\z@ \@height 5\unitlength \@depth\thr@@\unitlength
\begin{picture}(12,2)(-6,-1)%
\roundcap
\linethickness{#3\p@}%
\Line(-2,-2)(6,2)%
\linethickness{#2\p@}%
\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)%
\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)%
\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)% the witch's eye
\linethickness{#4\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@MWi@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{#3\p@}%
\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{picture}%
}
% Drawing the smaller witch:
\newcommand*\@MWi@Common@small@body{%
\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)%
\buttcap
\Line(.1,1.4)(.3,1.5)% the witch's eye
}
\newcommand*\@MWi@Small@witch[3]{%
\setlength\unitlength{\fontdimen 22 #1\tw@}%
\vrule \@width\z@ \@height\z@ \@depth\@ne\unitlength
\begin{picture}(6,3)(-3,-1)%
\roundcap
\linethickness{#3\p@}%
\Line(-1,-1)(3,1)%
\linethickness{#2\p@}%
\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)%
\polygon*(0,-.3)(.7,-.3)(.9,-.2)(1,0)(0,0)%
\@MWi@Common@small@body
\if@MWi@cat@
\@MWi@Common@small@cat{#3}%
\fi
\end{picture}%
}
% Drawing the smaller cat:
\newcommand*\@MWi@Common@small@cat[1]{%
\roundcap
\linethickness{#1\p@}%
\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)%
}
% Helper macros for "\overrightbroom":
\newcommand*\@MWi@mathpalette[8]{%
% A version of "\mathpalette" adapted to our needs, in which
% the macro passed in #1 must take six arguments, as follows:
% #1 := style selection for main style
% #2 := style selection for "relative-script" style
% #3 := font family selector (e.g., "\scriptfont")
% #4 := 1st user-defined parameter
% #5 := 2nd user-defined parameter
% #6 := main argument
% Below, we'll use the user-defined parameters to pass the line
% thicknesses for the face of the witch and the tail of the cat.
%
% The parameters for a call to _this_ macro are the following:
% #1 := target macro
% #2 := value of 1st user-defined parameter for text/display style
% #3 := value of 1st user-defined parameter for script style
% #4 := value of 1st user-defined parameter for scripscript style
% #5 := value of 2nd user-defined parameter for text/display style
% #6 := value of 2nd user-defined parameter for script style
% #7 := value of 2nd user-defined parameter for scripscript style
% #8 := main argument of target macro
\mathchoice
{#1\displaystyle \scriptstyle \scriptfont {#2}{#5}{#8}}%
{#1\textstyle \scriptstyle \scriptfont {#2}{#5}{#8}}%
{#1\scriptstyle \scriptscriptstyle \scriptscriptfont {#3}{#6}{#8}}%
{#1\scriptscriptstyle \scriptscriptstyle \scriptscriptfont {#4}{#7}{#8}}%
}
\newcommand*\@MWi@overarrow@with@witch[7]{%
% #1 := stretchable covering arrow
% #2 := base style
% #3 := style for covering arrow
% #4 := font family selector (e.g., "\scriptfont")
% #5 := line thickness for the witch
% #6 := line thickness for the cat
% #7 := base symbol
\vbox{\ialign{##\crcr
% the cat:
\if@MWi@cat@
\hskip \z@ \@plus \thr@@ fil
\@MWi@Small@cat@on@hori@broomstick#4{#6}%
\hfil\crcr
\noalign{\nointerlineskip}%
\fi
% the centered witch:
\hfil\@MWi@Small@witch@wo@broom #4{#5}\hfil\crcr
\noalign{\nointerlineskip}%
% the covering broom:
#1#3\crcr
\noalign{\nointerlineskip}%
% the covered subformula:
$\m@th\hfil #2#7\hfil$\crcr
}}%
}
% Drawing the small witch w/o the broom:
\newcommand*\@MWi@Small@witch@wo@broom[2]{%
\setlength\unitlength{\fontdimen 22 #1\tw@}%
\begin{picture}(8,4)(-4,-2)%
\linethickness{#2\p@}%
\polygon*(-.1,.4)(1,-.9)(1,-1.2)(.8,-1.2)(-.1,0)%
\@MWi@Common@small@body
\end{picture}%
}
% Drawing the cat on a horizontal broomstick:
\newcommand*\@MWi@Small@cat@on@hori@broomstick[2]{%
\setlength\unitlength{\fontdimen 22 #1\tw@}%
\begin{picture}(0,0)(2,3.4)%
\@MWi@Common@small@cat{#2}%
\Line(2.2,.8)(2.4,.4)%
\end{picture}%
}
% Extensible broom (stub):
% \DeclareMathSymbol{\@MWi@left@broom@tail} {\mathrel}{AMSa}{"4B}
% \DeclareMathSymbol{\@MWi@right@broom@tail}{\mathrel}{AMSa}{"4C}
\newcommand*\@MWi@rightbroomfill@{%
\arrowfill@{%
\smash[t]%
% \smash % another possibility
{\ni}%
% {\Rrightarrow}% another possibility
% {\@MWi@left@broom@tail}% yet another possibility
}\relbar\relbar
}
% Checking the math version:
\newcommand*\@MWi@if@bold@math{%
\def\@tempa{bold}%
\ifx\math@version\@tempa
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
}
% User-level commands:
\newcommand*\mathwitch{%
\@ifstar
{\@MWi@cat@true \@MWi@mathwitch}%
{\@MWi@cat@false \@MWi@mathwitch}%
}
\newcommand*\@MWi@mathwitch{%
\mathop{%
\@MWi@if@bold@math{%
\mathchoice{%
\@MWi@Large@witch \textfont {.6}{1.2}{.15}%
}{%
\@MWi@Small@witch \textfont {.4}{}%
}{%
\@MWi@Small@witch \scriptfont {.3}{.6}%
}{%
\@MWi@Small@witch \scriptscriptfont {.15}{.4}%
}%
}{%
\mathchoice{%
\@MWi@Large@witch \textfont {.3}{.8}{.1}%
}{%
\@MWi@Small@witch \textfont {.2}{.5}%
}{%
\@MWi@Small@witch \scriptfont {.15}{.3}%
}{%
\@MWi@Small@witch \scriptscriptfont {.1}{.2}%
}%
}%
}% \displaylimits % as per default
}
\newcommand*\overrightbroom{% RETHINK: not enough general!
\@ifstar
{\@MWi@cat@true \@MWi@overrightbroom}%
{\@MWi@cat@false \@MWi@overrightbroom}%
}
\newcommand*\@MWi@overrightbroom{%
\@MWi@if@bold@math{%
\@MWi@mathpalette
{\@MWi@overarrow@with@witch\@MWi@rightbroomfill@}%
{.3}{.15}{.15}% line thicknesses for the face
{.6}{.4}{.4}% line thicknesses for the tail
}{%
\@MWi@mathpalette
{\@MWi@overarrow@with@witch\@MWi@rightbroomfill@}%
{.15}{.1}{.1}% line thicknesses for the face
{.3}{.2}{.2}% line thicknesses for the tail
}%
}
\makeatother
%--------------------------------------------------------------%
\begin{document}
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}\).
Test for ``operator-like'' behavior: $\mathwitch x$ versus
$\mathwitch(x)$---does anybody note the difference?
Let us also check that our $\mathwitch$~symbol does not make the lines further
apart than usual. Here it is again:\nobreak\space $\mathwitch* b$.
A few more words to have enough plain lines in the paragraph to make it possible
to compare the leading. Was that enough? No, it wasn't: we'd like to get at
least one line further.
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} \).
Test for other math styles: subscript~$F_{\!\mathwitch\alpha}$,
in-line fraction \( \frac{\mathwitch m}{\mathwitch* n} \),
double superscript \( 2^{2^{\mathwitch* \aleph_{0}}} \)
(this one looks really awkward!).
\begingroup
\Huge
Look at the details of the display-style version:
\[
\mathwitch*
\genfrac{<}{>}{0pt}{}
{\text{something terribly}}{\text{complicated}}
= 0
\]
Please note the beard\ldots~:-)\par
\endgroup
Now we've also got the \texttt{bold} math version:\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)$.
The \verb|\overrightbroom| command, both in-line
\( \overrightbroom{x_{1}+\dots+x_{n}} \)
and displayed:
\begin{align*}
\overrightbroom{x_{1}+\dots+x_{n}} &= 0 &
\overrightbroom*{f(x+y)} &= \overrightbroom{h(z)}+\overrightbroom{g(z)}
\end{align*}
\begingroup
\bfseries \mathversion{bold}
Again in bold: in-line
\( \overrightbroom{x_{1}+\dots+x_{n}} \)
and displayed:
\begin{align*}
\overrightbroom{x_{1}+\dots+x_{n}} &= 0 &
\overrightbroom*{f(x+y)} &= \overrightbroom{h(z)}+\overrightbroom{g(z)}
\end{align*}
\endgroup
Text style \( \overrightbroom*{x_{1}+\dots+x_{n}}=0 \)
versus script style \( P_{\overrightbroom*{x_{1}+\dots+x_{n}}} \).
Minimal size:\nobreak\space $\overrightbroom*{}$.
\end{document}
And here’s the output it produces:
As one can expect, the cat is almost invisible…
Announcement
The halloweenmath
package is now available on CTAN! This makes it possible to re-write all previous answers by simply making them invoke this new package. Here's another example, which is actually the sample input file provided along with the package itself (note that this amounts to the fifth version of the answer!):
\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc} % not necessary, but recommended
\usepackage{halloweenmath}
\title{Sample Halloween Math}
\author{A.~U.~Thor}
\date{January~6, 2017}
\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}
This is the output it produces (4 pages):
If you find anything unsatisfactory in this package, blame it on its author; but if it has anything that you happen to like, please be grateful to @cfr for her challenge, without which, probably, this package would have never been written!
Best Answer
You did ask for a Christmas tree? (I updated the tree to straighten it out)