Re: [dk-tug] Tikz problem - pile ikke på linie

"[email protected]" <[email protected]>
Newsgroups gmane.comp.tex.danish
Message-ID <[email protected]>
Ahh, det var lige sådan en jeg ledte efter, takker.

/daleif
- via HTC

----- Reply message -----
Fra: "Martin Heller" <[email protected]>
Til: <[email protected]>
Emne: [dk-tug] Tikz problem - pile ikke på linie
Dato: tor., jan. 26, 2012 16:38


Lars Madsen wrote, on 26-01-2012 16:09:
>
> Ja, men det giver jo disse meget korte pile 'prikkerne'

Så må du søge for, at dine matrix nodes ligger på et gitter. Det kan 
gøres ved at specificere en afstand mellem node origins i stedet for 
node kanter:

\documentclass[a4paper]{memoir}
\usepackage{tikz,amsmath,bm}
\usetikzlibrary{matrix,arrows}
\newcommand\nonedot{\bm\cdot}
\newcommand\order[1]{_{\scriptscriptstyle #1}}
\begin{document}

\begin{tikzpicture}
   \matrix (M) [%
   matrix of math nodes,
   column sep={3em,between origins},
   row sep={3em,between origins},
   ]
   {
     \nonedot          & \nonedot          & \nonedot         & \nonedot 
         & \nonedot          & \nonedot \\
     \frac51\order{10} & \nonedot          & \nonedot         & \nonedot 
         & \nonedot          & \nonedot \\
     \frac41\order{9}  & \frac42\order{11} & \nonedot         & \nonedot 
         & \nonedot          & \nonedot \\
     \frac31\order{4}  & \frac32\order{8}  & \frac33          & \nonedot 
         & \nonedot          & \nonedot \\
     \frac21\order{3}  & \frac22           & \frac23\order{7} & \frac24 
          & \nonedot          & \nonedot \\
     \frac11\order{1}  & \frac12\order{2}  & \frac13\order{5} & 
\frac14\order{6} & \frac15\order{12} & \nonedot \\
   };
   % oenskede 'retninger'
   \draw[dashed,thin,pink] (M-1-1) -- (M-6-6);
   \draw[dashed,thin,pink] (M-2-1) -- (M-6-5);
   \draw[dashed,thin,pink] (M-3-1) -- (M-6-4);
   \draw[dashed,thin,pink] (M-4-1) -- (M-6-3);
   \draw[dashed,thin,pink] (M-5-1) -- (M-6-2);

   \draw[->] (M-6-1) -- (M-6-2);
   \draw[->] (M-6-2) -- (M-5-1);
   \draw[->] (M-5-1) -- (M-4-1);
   \draw[->] (M-4-1) -- (M-5-2);
   \draw[->] (M-5-2) -- (M-6-3);
   \draw[->] (M-6-3) -- (M-6-4);
   \draw[->] (M-6-4) -- (M-5-3);
   \draw[->] (M-5-3) -- (M-4-2);
   \draw[->] (M-4-2) -- (M-3-1);
   \draw[->] (M-3-1) -- (M-2-1);
   \draw[->] (M-2-1) -- (M-3-2);
   \draw[->] (M-3-2) -- (M-4-3);
   \draw[->] (M-4-3) -- (M-5-4);
   \draw[->] (M-5-4) -- (M-6-5);
   \draw[->] (M-6-5) -- (M-6-6);
   \draw[->] (M-6-6) -- (M-5-5);
   \draw[->] (M-5-5) -- (M-4-4);
   \draw[->] (M-4-4) -- (M-3-3);
   \draw[->] (M-3-3) -- (M-2-2);
   \draw[->] (M-2-2) -- (M-1-1);
\end{tikzpicture}

\end{document}

_______________________________________________
[email protected] mailing list
http://mailman.nfit.au.dk/mailman/listinfo/tug.dk-dk-tug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.