Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Can anyone tell me how to write \hookuparrow in Latex? I know that writing $\hookrightarrow$ gives us the arrow to the right but for up and down arrows it is not true, maybe I need some package ?

share|improve this question
3  
Welcome to TeX.sx! Surely this post could help you. –  Corentin Dec 16 '12 at 18:19

1 Answer 1

\documentclass{article}
\usepackage{graphicx}
\newcommand{\hookuparrow}{\mathrel{\rotatebox[origin=c]{90}{$\hookrightarrow$}}}
\newcommand{\hookdownarrow}{\mathrel{\rotatebox[origin=c]{-90}{$\hookrightarrow$}}}
\begin{document}
\noindent
$a\hookrightarrow b$

\noindent
$a\hookuparrow b$

\noindent
$a\hookdownarrow b$
\end{document}

enter image description here

You can adjust the center (origin) of rotation using either t or b in \rotatebox[origin=c] as per your needs.

If the hook is wanted on the other side, as noted by Barabara Beeton, You may either reflect the arrow:

\newcommand{\hookuparrow}{\mathrel{\rotatebox[origin=t]{-90}{\reflectbox{$\hookrightarrow$}}}}
\newcommand{\hookdownarrow}{\mathrel{\rotatebox[origin=t]{90}{\reflectbox{$\hookrightarrow$}}}}

or use \hookleftarrow:

\newcommand{\hookuparrow}{\mathrel{\rotatebox[origin=t]{270}{$\hookleftarrow$}}}
\newcommand{\hookdownarrow}{\mathrel{\rotatebox[origin=t]{90}{$\hookleftarrow$}}}
share|improve this answer
    
if the hook is wanted on the other side for some reason, the \hookleftarrow can be substituted with appropriate change in direction (270 instead of 90 should do it). i don't know what such a change might signify, and would be interested in finding out. –  barbara beeton Dec 16 '12 at 18:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.