\twoheadleftarrow
and \twoheadrightarrow
can be combined to \twoheadleftrightarrow
:
\documentclass{article}
\usepackage{amssymb}
\newcommand*{\twoheadleftrightarrow}{%
\twoheadleftarrow
\mathrel{\mkern-15mu}%
\twoheadrightarrow
}
\begin{document}
\[
\twoheadleftrightarrow
\scriptstyle \twoheadleftrightarrow
\scriptscriptstyle \twoheadleftrightarrow
\]
\end{document}
The symbols can also be combined using \joinrel
, which is some negative space that should counteract the side bearings. However, I could see a small gap in \scriptscriptstyle
with class option 10pt
, thus I have removed another -0.5mu
. And the new \longtwoheadleftrightarrow
has an optional argument, which allows further adjustment if necessary.
\documentclass{article}
\usepackage{amssymb}
\newcommand*{\longtwoheadleftrightarrow}[1][.5]{%
\twoheadleftarrow
\joinrel
\mathrel{\mkern-#1mu}%
\twoheadrightarrow
}
\begin{document}
\[
\longtwoheadleftrightarrow
\scriptstyle \longtwoheadleftrightarrow
\scriptscriptstyle \longtwoheadleftrightarrow
\]
\end{document}
An even longer version can be composed with \relbar
in the middle.
Also an expandable version can be constructed similar to \xrightarrow
:
\documentclass{article}
\usepackage{amsmath,amssymb}
\makeatletter
\newcommand*{\xtwoheadleftrightarrow}[2][]{%
\ext@arrow 99{10}{10}\twoheadleftrightarrowfill@{#1}{#2}%
}
\newcommand*{\twoheadleftrightarrowfill@}{%
\arrowfill@\twoheadleftarrow\relbar\twoheadrightarrow
}
\makeatother
\begin{document}
\[
\xtwoheadleftrightarrow[\text{under}]{\text{over}}
\]
\end{document}