2

There are square hooks (e.g. \lsqhook), but that's not quite what I want. I'd like a version of \hookleftarrow without the arrow. Is it possible to modify the \hookleftarrow, or \hookrightarrow symbols to get what I want?

bzm3r
  • 3,196

2 Answers2

4

The definition of \hookleftarrow is

\leftarrow\joinrel\rhook

and \longleftarrow is \leftarrow\joinrel\relbar. Ehi! We can use \relbar!

\documentclass{article}
\usepackage{amsmath}% generally recommended

\newcommand{\hookleftline}{\DOTSB\relbar\joinrel\rhook}
\newcommand{\hookrightline}{\DOTSB\lhook\joinrel\relbar}

\begin{document}

$A\hookleftline B$

$A\hookrightline B$

\end{document}

enter image description here

The \DOTSB command is for amsmath.

egreg
  • 1,121,712
1

One possibility is to "build your own".

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\newcommand{\Hook}{%
\raisebox{1.5pt}{\rotatebox{90}{\reflectbox{\resizebox{3pt}{\height}{$\mathsf{J}$}}}}}
\newcommand{\PicHook}{%
\begin{picture}(9,6)
\put(0,3){\line(1,0){7}}
\put(8,6){\oval(2,2)[r]}
\end{picture}}
\begin{document}
$\hookleftarrow$~\Hook~$A\Hook B$ 

$\hookleftarrow$~\PicHook~$A\PicHook B$ 

\end{document}

enter image description here

This is a "minimal" version in the sense that it does not require extra fonts, but it certainly not the most beautiful symbol on this planet.