2

I have a professor who often uses specific notation for set inclusion; it essentially looks like \hookrightarrow but without the arrowhead. Since we typically use the specific symbol \hookrightarrow for function notation (as in, specifically, defining an injective function), I thought it would help clarity to create such a symbol in my LaTeX code. The closest I've managed to get is the following MWE:

\documentclass[10pt,letterpaper]{article}
\usepackage{mathtools}
\DeclareMathOperator{\hookinclude}{\,\raisebox{0.02ex}{$\lhook$}\joinrel\hspace{-0.4ex}\mathrel{\raisebox{-0.048ex}{$\textbf{--}$}}}
\begin{document}
$A \hookinclude B$
$A \subseteq B$
\end{document}

However, this looks absolutely terrible, and I cannot get the en-dash to align properly with the \lhook, so I thought it would be best to use \hookrightarrow and somehow remove the arrowhead, but I've been unable to find a way to do this. Any advice would be appreciated.

2 Answers 2

1

How about

\newcommand\hookinclude{\mathrel{\lhook\joinrel\relbar}}
1
  • Thank you, this is exactly what I was looking for! I tried to find a command for a bar like you gave, but nothing came up when I looked. Thank you very much for your help. Commented Apr 1, 2020 at 16:15
0

You could actually remove the arrow head with a clipbox from the trimclip package. However it is quite hard to get exactly the right clipping, and the line at the end of the arrow would not look exactly the same. But the head can also be replaced with a part of a minus symbol, for instance.

Here's a comparison of both solutions.

\documentclass[10pt,letterpaper]{article}
\usepackage{amsmath}
\usepackage{trimclip}
\newlength{\hrawidth}
\newlength{\hraheight}
\settowidth{\hrawidth}{$\hookrightarrow$}
\settoheight{\hraheight}{$\hookrightarrow$}
\newcommand{\clippedhookrightarrow}{%
    \mathrel{%
        \clipbox{0 0 .5\hrawidth{} 0}{$\hookrightarrow$}%
        \raisebox{.498\hraheight}{%
            \clipbox{.5\hrawidth{} .498\hraheight{} 0 .419\hraheight{}}{$\hookrightarrow$}%
        }%
    }%
}
\newlength{\minuswidth}
\settowidth{\minuswidth}{$-$}
\addtolength{\minuswidth}{-.5\hrawidth}
\newcommand{\hookinclude}{%
    \mathrel{%
        \clipbox{0 0 .5\hrawidth{} 0}{$\hookrightarrow$}%
        \clipbox{\minuswidth{} 0 0 0}{$-$}%
    }
}
\begin{document}
\begin{tabular}{ll}
    Original \verb|\hookrightarrow|: & \(A \hookrightarrow B\) \\
    Removing the head:               & \(A \clippedhookrightarrow B\) \\
    Replacing the head by a \(-\):   & \(A \hookinclude B\)
\end{tabular}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .