[Tex/LaTex] How to create up arrow with two heads

arrowsmath-mode

With \twoheadrightarrow we can get arrow with two heads. Is there any command for getting two heads with up arrow?

Best Answer

One can rotate one of the existing two-headed arrows (some adjustment might be required depending on the desired position for the arrow baseline):

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}

\newcommand\twoheaduparrow{\mathrel{\rotatebox{90}{$\twoheadrightarrow$}}}

\begin{document}

\[
A\twoheadrightarrow B\quad A\twoheaduparrow B
\]

\end{document}

enter image description here

Adding [origin=<origin>] as an option to \rotate, the center for rotation can be changed (possible values for <origin> are t (top),b (bottom),l (left),r (right),c (center), and B (baseline)):

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}

\newcommand\twoheaduparrow{\mathrel{\rotatebox[origin=c]{90}{$\twoheadrightarrow$}}}

\begin{document}

\[
A\twoheadrightarrow B\quad A\twoheaduparrow B
\]

\end{document}

enter image description here

In a comment it has been requested a definition without using additional packages; in this case, with a little more work, one can build the symbol using \ooalign and two shifted \uparrows:

\documentclass{article}

\makeatletter
\newcommand\twoheaduparrow{%
\mathrel{\mathchoice
  {\raise2pt\hbox{%
  \ooalign{\hss$\uparrow$\hss\cr\lower2pt\hbox{%
  $\uparrow$}}}}
  {\raise2pt\hbox{%
  \ooalign{\hss$\uparrow$\hss\cr\lower2pt\hbox{%
  $\uparrow$}}}}
  {\raise1.5pt\hbox{%
  \ooalign{\hss$\scriptstyle\uparrow$\hss\cr\lower1.5pt\hbox{%
  $\scriptstyle\uparrow$}}}}
  {\raise1.1pt\hbox{%
  \ooalign{\hss$\scriptscriptstyle\uparrow$\hss\cr\lower1.1pt\hbox{%
  $\scriptscriptstyle\uparrow$}}}}
}}

\begin{document}

\[
A\twoheaduparrow B\quad {\textstyle A\twoheaduparrow B}\quad A_{A\twoheaduparrow B}\quad L_{A_{A\twoheaduparrow B}}
\]

\[
A\uparrow B\quad {\textstyle A\uparrow B}\quad A_{A\uparrow B}\quad L_{A_{A\uparrow B}}
\]

\end{document}

enter image description here

Related Question