Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to have a state-node with a loop, where the arrow tip is customized (here with -triangle 60). How do change the arrow tip a loop uses?

Heres a short example. I expect the loop to have the same arrow tip as the edge from start to end.

\documentclass[a4paper,abstracton,11pt]{scrreprt}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\node (loop-node) at (0,0) {node};
\node (path-start) at (2,0) {start};
\node (path-end) at (2,2) {goal};
\path
(path-start) edge [-triangle 60] node {path} (path-end)
(loop-node) edge [loop above, -triangle 60] node {edge} ();
\end{tikzpicture}
\end{document}

Now I would like to understand why its not working as I expect, and how I can change the arrow tip for loops.

I also tried to change the style of the loop with loop/.append style{-triangle 60}, with and without \tikzset, but that seemed to be a dead end.

share|improve this question
    
Oh, and Welcome to TeX.SX! –  Torbjørn T. Sep 1 '11 at 15:03

1 Answer 1

up vote 3 down vote accepted

I have no idea why your example doesn't work, but specifying the arrow tip with ->, >=triangle 60 instead works for me.

\documentclass[a4paper,abstracton,11pt]{scrreprt}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\node (loop-node) at (0,0) {node};
\node (path-start) at (2,0) {start};
\node (path-end) at (2,2) {goal};
\path (path-start) edge [-triangle 60] node {path} (path-end)
(loop-node) edge [loop above,->, >=triangle 60] node {edge} ();
\end{tikzpicture}
\end{document}
share|improve this answer
    
The "correct" way would be to use every loop/.append style={-triangle 60}, as loop above is a shorthand for [above,out=105,in=75,loop], with loop introducing a to path that uses the every loop style. Your way is much more pragmatic, though, and works just as well in this case (some things, like shorten < do not). –  Jake Sep 1 '11 at 15:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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