5

I want to get a bent arrow from node A to node E, this is my code:

\usepackage{tikz-cd}
\usetikzlibrary{cd}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

\begin{center}
\begin{tikzpicture}

\node (E) at (0,0) {$T_V U$};
\node[right=of E] (F) {$U\times V$};
\node[below=of F] (A) {$U$};
\node [right=of F] (D) {};
\node [below=of D] (G) {$V$};


\draw[->] (E)--(F) node [midway,above] {$\simeq$};
\draw[->] (E)--(A) node [midway,below] {$f$};
\draw[->] (F)--(A) node [midway,right] {$\pi^2$};
\draw[->] (F)--(G) node [midway,right] {$\pi^1$};
\draw[->,bend] (A)--(E) node [midway,left] {$v$}


\end{tikzpicture}
\end{center}

\end{document}
4

I suggest using tikz-cd directly:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\[
\begin{tikzcd}
T_V U \arrow [dr,"f"] \arrow[r,"\simeq"] &
  U\times V \arrow[d,"\pi^2"] \arrow[dr,"\pi^1"] \\
& U \arrow[ul,bend left,"v"] & V
\end{tikzcd}
\]

\end{document}

enter image description here

  • This was simple and nice – Boltzee Nov 28 '15 at 11:24
2

For the sake of it, here is what went wrong with tikz version.

When you want to bend, you have to say bend left or bend right. and this operation needs either to or edge path, not --. The last point is that you have to use proper placements for nodes like abobe, above right etc as appropriate. When you use node soon after to, the default position will be midway hence you don't need to specify it. Altogether, this works:

\draw[->,bend left] (A) to node [left] {$v$} (E) ;

Full code:

\documentclass{article}
%\usepackage{tikz-cd}
%\usetikzlibrary{cd}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

\begin{center}
\begin{tikzpicture}

\node (E) at (0,0) {$T_V U$};
\node[right=of E] (F) {$U\times V$};
\node[below=of F] (A) {$U$};
\node [right=of F] (D) {};
\node [below=of D] (G) {$V$};


\draw[->] (E)--(F) node [midway,above] {$\simeq$};
\draw[->] (E)--(A) node [midway,above] {$f$};
\draw[->] (F)--(A) node [midway,right] {$\pi^2$};
\draw[->] (F)--(G) node [midway,above right] {$\pi^1$};
\draw[->,bend left] (A) to node [left] {$v$} (E) ;


\end{tikzpicture}
\end{center}

\end{document}

enter image description here

But for commutative diagrams, use tikz-cd and live happier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.