开发者

How to add special character in LaTeX?

开发者 https://www.devze.com 2023-03-19 01:51 出处:网络
In my current work I need to use arrow symbols, representing injection, surjection and b开发者_运维技巧ijection. First two can be given by commands \\rightarrowtail and \\twoheadrightarrow, but the bi

In my current work I need to use arrow symbols, representing injection, surjection and b开发者_运维技巧ijection. First two can be given by commands \rightarrowtail and \twoheadrightarrow, but the bijection arrow - Unicode 2916 character - is not present in the list of LaTeX arrow characters. How can I add the mentioned symbol in my text ? Maybe some additional packages should be used ?

I'm new to LaTeX, so any help will be appreciated. Thanks in advance.


I can emulate it like this :

\documentclass{minimal}

\usepackage{amssymb}

\begin{document}

$\rightarrowtail\!\!\!\!\!\rightarrow $

\end{document}

I would also advise looking at the Comprehensive LaTeX symbol List in general.


Using the great Detexify2 - LaTeX symbol classifier tool I found \twoheadrightarrow and \rightarrowtail which both combined build the wanted arrow. You can use TeX macro \kern to adjust the kerning between the symbols. However, I found that it doesn't produce the correct alignment in all size (e.g. \tiny uses different versions of the symbols), so be careful. The combination should be placed inside \mathrel{..} to get the correct surrounding spacing to the symbols before and after.

\documentclass{article}

\usepackage{amssymb}

\newcommand*{\twoheadrightarrowtail}{\mathrel{\rightarrowtail\kern-1.9ex\twoheadrightarrow}}
% Alternative which doesn't look as good using the normal size, but might work better with smaller sizes too:
%\newcommand*{\twoheadrightarrowtail}{\mathrel{\rlap{$\rightarrowtail$}\twoheadrightarrow}}

\begin{document}

$ A \twoheadrightarrowtail B $

\end{document}

How to add special character in LaTeX?

0

精彩评论

暂无评论...
验证码 换一张
取 消