0

I'd like to create a new latex command, called Surjrightarrow, i. e. a \longtwoheadrightarrow, but without using tikz/tikzcd and/or xypic.

Is it possible? Thank you so much

P.S.: I tried with these

\newcommand{\SpecialArrow}[2]{\joinrel{#1}{\!\!\!\!#2}}

%\newcommand{\Surjrightarrow}{\SpecialArrow{\longrightarrow}{\to}}

%\DeclareRobustCommand\Surjrightarrow{\relbar\joinrel\twoheadrightarrow}

\newcommand{\Bijrightarrow}{\SpecialArrow{\lhook}{::\Surjrightarrow}}

\newcommand{\Surjrightarrow}{\longrightarrow\mathrel{\mspace{-21mu}}\rightarrow}

but the effects are not much good. My goal is also create a Bijrightarrow like up. Thanx again

Puck
  • 1,208
  • 1
    Could you provide a small but complete minimum working example, rather than just code snippets? Does this answer help? https://tex.stackexchange.com/questions/324471/combination-of-arrows-with-and-without-label/327297#327297 – Steven B. Segletes May 12 '22 at 14:29

1 Answers1

1

Something like this?

\documentclass{article}
\usepackage{stix2}
\newcommand*{\Surjrightarrow}{%
    \mathrel{\ooalign{$\longrightarrow$\cr$\mkern 8.5mu\rightarrow$}}%
}
\newcommand*{\Bijrightarrow}{%
    \lhook\joinrel\Surjrightarrow%
}
\begin{document}
\(A \twoheadrightarrow B\)

(A \longrightarrow B)

(A \Surjrightarrow B)

(A \Bijrightarrow B) \end{document}

Vincent
  • 20,157
  • I forget to say that I use stix and the output is not much good (Actually the output of your arrows is the same of mine). How Could I improve? Thx again – Puck May 12 '22 at 15:44
  • @Puck that would have been a good information to include. Next time, you should add a complete example to your question. I updated my answer to use stix2, does it look better? I added a comparison with stix2's \twoheadrightarrow as well. – Vincent May 12 '22 at 15:56
  • Ok thank you, but I use stix non stix2. – Puck May 12 '22 at 16:11
  • @Puck the output is not so different with stix. However, stix is considered obsolete since 2018 (see the page on CTAN), so you should consider switching to stix2. – Vincent May 12 '22 at 16:37
  • But I prefer stix instead stix2 – Puck May 12 '22 at 18:55