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.

Question

How do you set all edges in an automaton to have the additional parameter double?

This should be easy, but I can't find the solution here or in the tikz/pgf manual or anywhere else.

double should not be overwritten by independent parameters: edge[bend left] with default double should thus be equivalent to edge[bend left, double].

Details

Currently, I'm using the parameter everywhere:

     \path[->] 
     (s0)+(-.5cm,.5cm) edge[bend right,double] (s0)
     (s0) edge[bend left,double] node[pos=0.3] {$a$} (s1)
     (s1) edge[bend left,double] node {$\epsilon,a$} (s0)
     (s0) edge[loop above,double] node {$\epsilon,a$} (s0)
     (s1) edge[loop below,double] node {$\epsilon,a$} (s1);

I tried \path[->,double] and various combinations of \pgfset and \tikzstyle, but I just don't know how to get to set double the edge's default parameter.

share|improve this question
2  
It needs every edge/.append style. But double will always come before unless you overwrite the default edge operation. See the manual Sec.16.12 (last part) –  percusse Jun 12 '13 at 12:00

1 Answer 1

up vote 4 down vote accepted

You can add different style keys by appending or prefixing. In this context we need to append the double key to each edge. Since this appending is local to the path it doesn't affect succesive edges.

\begin{tikzpicture}
\path[->,every edge/.append style={double}] (0,0) edge[bend left] (1,1) (1,3)edge[loop above] ();
\path[->] (0,3) edge[bend left] (1,2) edge[loop above] ();
\end{tikzpicture}

Note that loop only needs () you don't need to fill the brackets.

enter image description here

share|improve this answer

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.