5

I'm looking for a way to reproduce this symbol in Latex (I think that the document was also written in latex (but only got the PDF version), so I mustn't be very complicated but I'm new to it so I've no idea of how to do it!):

The symbol I want to draw

I've no problem for the arrow between the symbols but for the reflexive one, I cannot find the symbol anywhere.

I saw that there is a thread on this website about something which is near but I'm not sure if I can use the given answer without using nodes (I'm referring to this thread: reflexive arrow)

3 Answers 3

3

Use of tikzcd

enter image description here

Code

\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzcd}[cells={nodes={minimum size=0.5cm}}]
x\arrow[thick,]{r}{}
 \arrow[out=180,in=90,loop,thick]{}
& y
\end{tikzcd}

% different arrows style

\begin{tikzcd}[cells={nodes={minimum size=0.5cm}}]
x\arrow[thick,-stealth]{r}{}
 \arrow[out=180,in=90,loop,thick,-stealth]{}
& y
\end{tikzcd}

% different style

\begin{tikzcd}[cells={nodes={minimum size=0.5cm}}]
x\arrow[thick,-stealth]{r}{}
 \arrow[out=110,in=70,loop,thick,-stealth]{}
& y
\end{tikzcd}
\end{document}

And you can also use it as a function as the others have proposed like that:

\newcommand{\customarrow}[1]{
\begin{tikzcd}[cells={nodes={minimum size=0.5cm}}]
#1
\arrow[out=180,in=90,loop,thick]{}
\end{tikzcd}
}

Then just call it like this:

\customarrow{x}
1
  • Cannot upvote but the solution is also great! Upvote asap. Commented Sep 28, 2014 at 12:59
3

You really need just the graphicx package and the mathb font from the mathabx package. As this package redefines most math symbols (and adds some to the standard ones), I will only define some math symbols from the font and derive from them two commands: \lreflexivearrow and \rreflexivearrow:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools, amssymb}
\usepackage{graphicx}
    \DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
    \DeclareFontShape{U}{mathb}{m}{n}{
  <-6> mathb5 <6-7> mathb6 <7-8> mathb7
  <8-9> mathb8 <9-10> mathb9
  <10-12> mathb10 <12-> mathb12
    }{}
    \DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
    \DeclareMathSymbol{\lefttorightarrow}{\mathrel}{mathb}{"FC}
    \DeclareMathSymbol{\righttoleftarrow}{\mathrel}{mathb}{"FD}
    \DeclareMathSymbol{\uptodownarrow}{\mathrel}{mathb}{"FE}
    \DeclareMathSymbol{\downtouparrow}{\mathrel}{mathb}{"FF}

\newcommand\lreflexivearrow{ \reflectbox{$\mkern3mu\righttoleftarrow$}}
\newcommand\rreflexivearrow{\mbox{$\mkern3mu \righttoleftarrow $}}

\begin{document}

\[ \lreflexivearrow x ―――→ y\rreflexivearrow \]%

\end{document} 

Here is the result!

2

A starting point with tikz:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,bending}
\usepackage{amsmath}
\newcommand{\arrowed}[1]{%
  \begin{tikzpicture}[baseline=(a.base)]
    \node[inner sep=1pt] (a) {$#1$};
    \draw[arrows = {-Latex[scale=0.5,bend]}] (a.west) .. controls ++(-1ex,0.5ex) and ++(-0.5ex,1ex) .. (a.north);
  \end{tikzpicture}
}
\begin{document}
  \[x\arrowed{x} \longrightarrow y\]
\end{document}

enter image description here

3
  • Whaouh, I absolutely need to learn LaTeX (it's very powerful), thanks for your answer! (I marked correct and asa I have 15 rep, I upvote you ;) ) Commented Sep 28, 2014 at 12:39
  • Sorry for disturbing you again but it creates an offset in my data table like this imgur.com/mzHO1pN. Is there a way to avoid that to have something like on the picture ? Commented Sep 28, 2014 at 12:51
  • @LaurentMeyer See the updated answer.
    – user11232
    Commented Sep 28, 2014 at 15:04

You must log in to answer this question.

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