3

How can I write in Tikz:

enter image description here

One difficulty I have is to write over and under the arrow. I've looked up several solutions but I'd prefer a basic solution that doesn't go into nodes and stuff. Is it possible to do it with this kind of syntax?:

 \arrow[rr, leftrightarrow, "*"]

I have no idea how to draw the oblique lines on the left and right side...

A further challenge that I have is to draw curved lines with the above simple syntax as in the following image:

enter image description here

Edit:

Curved case is solved thanks to @marmot with the following code:

\begin{tikzcd}
x \arrow[rr,leftrightarrow,"*"] \arrow[rr,bend right]  & & y 
\end{tikzcd}
1
  • 1
    The curved arrow can be achieved with bend, but I'd need an MWE to be more specific.
    – user121799
    Feb 16, 2018 at 12:14

2 Answers 2

3

Just for completeness: with tikz-cd only. (Of course, tikz-cd loads tikz.)

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
\arrow[ddr,dash,xshift=1cm,yshift=0.1cm]~&~ & & & &~& ~\arrow[ddl,dash,xshift=-1cm,yshift=0.1cm]\\[-0.3cm]
~ && \arrow[dll, dashrightarrow]
\arrow[ll, dashrightarrow]
\arrow[ull, dashrightarrow]
x \arrow[rr, leftrightarrow, "*","="'] && y  \arrow[drr, dashrightarrow]
\arrow[rr, dashrightarrow]
\arrow[urr, dashrightarrow] & & ~\\[-0.3cm]
~&~& & & & ~&~
\end{tikzcd}
\begin{tikzcd}
x \arrow[rr,leftrightarrow,"*"] \arrow[rr,bend right]  & & y 
\end{tikzcd}

\end{document}

enter image description here

4

With pure tikz instead of tikzcd:

\documentclass[tikz]{standalone}

\begin{document}

\begin{tikzpicture}[>=stealth]

\node (x) at (0,0) {$x$};
\node (y) at (2,0) {$y$};

\draw[<->] (x) -- node[above] {$\ast$} node[below] {$=$} (y);
\draw[->] (x) to[bend right=60] (y);

\draw[->,dashed] (x) -- +(160:1);
\draw[->,dashed] (x) -- +(180:1);
\draw[->,dashed] (x) -- +(200:1);

\draw[->,dashed] (y) -- +(20:1);
\draw[->,dashed] (y) -- +(0:1);
\draw[->,dashed] (y) -- +(-20:1);

\draw ([yshift=12,xshift=-6]x.west) -- ([yshift=-12,xshift=-10]x.west);
\draw ([yshift=12,xshift=6]y.east) -- ([yshift=-12,xshift=10]y.east);

\end{tikzpicture}

\end{document}

enter image description here

0

You must log in to answer this question.

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