But not successful. How could I draw this quiver in latex? Thank you very much.
Best Answer
Two solutions: one based on pstricks, the other on tikz-cd. For the pstricks solution, you can compile with pdflatex if you launch it with option --enable-write18 (MiKTeX) or -shell-escape (TeX Live, MacTeX). Alternatively, you can compile with xelatex:
Here is a simple prototype of what you need. Hopefully, you may apply your desired customizations to it.
\documentclass[border=1pt]{standalone}
\usepackage{tikz} %TikZ central library is called.
\usetikzlibrary{automata,positioning} % automata and positioning libraries are required to use nodes and coordinates in addition to placement propetries.
\begin{document}
\begin{tikzpicture}[shorten >=1pt,node distance=1.0cm,on grid,auto] % Some customizations related to the size and the discatnce between nodes and arrow heads
\node[state,rectangle, align=center] (q_r) [] {This is a \\ square}; % Here the nodes and coordinates are defined
\node[coordinate] (q_0) [right=of q_r, xshift=3cm] {};
\node[coordinate] (q_1) [left=of q_r, xshift=-3cm, yshift=1mm] {};
\node[coordinate] (q_2) [left=of q_r, xshift=-3cm, yshift=-1mm] {};
\path[->] % path and draw commands connect the nodes and coordinates to each other.
(q_r) edge [] node {This is an arrow} (q_0);
\draw[->] ([yshift=-3mm]q_1) -- ([yshift=-2mm]q_r.west) node[midway,swap] {This is an arrow};
\draw[->] ([yshift=3mm]q_2) -- ([yshift=2mm]q_r.west) node[midway] {This is an arrow};
\end{tikzpicture}
\end{document}
Best Answer
Two solutions: one based on
pstricks
, the other ontikz-cd
. For the pstricks solution, you can compile withpdflatex
if you launch it with option--enable-write18
(MiKTeX) or-shell-escape
(TeX Live, MacTeX). Alternatively, you can compile withxelatex
: