PGF/TikZ: Difference between revisions

From miki
Jump to navigation Jump to search
(→‎Troubleshoot: Better use 0.999 it seems)
Line 13: Line 13:
== Troubleshoot ==
== Troubleshoot ==
;markings decoration not show in curved path
;markings decoration not show in curved path
Setting a decoration at position does not work 1 when using curved paths. An easy fix is to use <code>0.9999</code> instead (see also [http://tex.stackexchange.com/questions/50534/tikz-bug-with-multiple-decorations-at-position-1 bug], [http://tex.stackexchange.com/questions/89222/why-cant-i-apply-this-decoration-to-a-curve-produced-using-the-to-path-operat]).
Setting a decoration at position does not work 1 when using curved paths. An easy fix is to use <code>0.999</code> instead (see also [http://tex.stackexchange.com/questions/50534/tikz-bug-with-multiple-decorations-at-position-1 bug], [http://tex.stackexchange.com/questions/89222/why-cant-i-apply-this-decoration-to-a-curve-produced-using-the-to-path-operat]).


<source lang=latex>
<source lang=latex>
\begin{tikzpicture}[node distance=1cm,
\begin{tikzpicture}[node distance=1cm,
decoration={markings, mark=at position 0.9999 with {\arrow[scale=2]{stealth}}}]
decoration={markings, mark=at position 0.999 with {\arrow[scale=2]{stealth}}}]
\node (c) {C};
\node (c) {C};
\node [below=5pt of c] (d) {D};
\node [below=5pt of c] (d) {D};

Revision as of 14:19, 24 February 2014

PGF/TikZ is a powerful drawing package that can be used to produce professional-looking graphics. In particular PGF/TikZ interpreter can be used from LaTeX documents.

Links

Reference

To be completed.

Troubleshoot

markings decoration not show in curved path

Setting a decoration at position does not work 1 when using curved paths. An easy fix is to use 0.999 instead (see also bug, [1]).

\begin{tikzpicture}[node distance=1cm,
    decoration={markings, mark=at position 0.999 with {\arrow[scale=2]{stealth}}}]
  \node (c) {C};
  \node [below=5pt of c] (d) {D};
  \draw[postaction={decorate}] (c) to [out=0,in=0,looseness=3] (d);
\end{tikzpicture}