Consider the following MWE:


    first/.style = {
        ultra thick,
    second/.style = {
        ultra thin,


  \anchor{inner east}{\pgfpoint{0.5cm - 0.4pt}{0}}

    \pgfkeys{/tikz/.cd, first}

    \pgfpathmoveto{\pgfpoint{-0.5cm + \pgfkeysvalueof{/pgf/outer xsep} }{0.5cm - (0.5 + sqrt(1.25))*\pgfkeysvalueof{/pgf/outer ysep} }}
    \pgfpathlineto{\pgfpoint{0.5cm - sqrt(5)*\pgfkeysvalueof{/pgf/outer xsep} }{0}}
    \pgfpathlineto{\pgfpoint{-0.5cm + \pgfkeysvalueof{/pgf/outer xsep} }{-0.5cm + (0.5 + sqrt(1.25))*\pgfkeysvalueof{/pgf/outer ysep} }}

    \pgfkeys{/tikz/.cd, second}


        \node (a) at (0,0) [symbol] {};

this is what is produced with the above code:

enter image description here

I expect to be able to configure the appearance of the triangle and the line individually with my two individual TikZ styles. So, I actually would expect the triangle to be ultra thick and red, and the single straight line should be ultra thin, blue and equipped with an arrow.

Why is this not the case, and what shall I change? I already tried \pgfusepath{stroke} with no effect.

  • How would that work? You'd need to fill these directives into \pgfsetlinewidth etc. If that was not the case, you'd mess up decorations by saying dashed before. – marmot Oct 24 '18 at 18:10
  • 1
    One more thing: you cannot change colors in a path. That is, you'd need to say something like \pgfusepath{stroke} before switching to a new color. There are, of course, good reasons, not to cut the path to pieces (e.g. if you want to fill the region in between). I really think you should have a look at pics and/or path picture, which allow you to do these things. – marmot Oct 24 '18 at 18:34
  • Obviously it works, but I don't understand all internal workings yet, that's true. Actually I wanted to use PGF shapes because these are exactly designed for what I am planning to do. I had previously some path pictures, but there it is also possible to mess things up with some styles. – T. Pluess Oct 24 '18 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.