[texhax] TikZ : factoring out recurring constants

Philip TAYLOR (Webmaster, Ret'd) P.Taylor at Rhul.Ac.Uk
Sun Jun 5 13:29:33 CEST 2011

Confession : I am a complete beginner w.r.t. TikZ.

Overview :  I wish to simplify the following, factoring out common 
elements --

    \draw [decorate, decoration={text along path,
    text={|\Decorationfont| www.thai-an.co.uk}, text align=center}]
             (xyz polar cs: angle=120, x radius=5, y radius=2) arc
    (180:0:5 and 2);

    \draw [decorate, decoration={text along path,
    text={|\Decorationfont| Authentic Oriental Cuisine}, text align=center}]
             (xyz polar cs: angle=240, x radius=5, y radius=2) arc
    (180:360:5 and 2);

Here is my best attempt --


    /pgf/decoration={text along path},

    /pgf/decoration/text align/align={center},

    /tikz/start angle=180,

    /tikz/x radius=5,

    /tikz/y radius=2,
    /tikz/cs/y radius=2


\draw [decorate, decoration={text={|\Decorationfont| www.thai-an.co.uk}}]

         (xyz polar cs: angle=120, y radius=2) arc [end angle=0];

\draw [decorate, decoration={text={|\Decorationfont| Authentic Oriental 
Cuisin{\kern 0,02 em e}}}]

         (xyz polar cs: angle=240, y radius=2) arc [end angle=360];

Problem --

    I have to explicitly include "y radius=2" in both "xyz polar cs:"
    The TikZ manual tells me there is a key "/tikz/cs/y radius", but
    this immediately after setting key "/tikz/y radius" has no
    perceivable effect

    (i.e., it is accepted but I still cannot remove the explicit ' "y
    radius=2" in the
    "xyz polar cs:" constructs ' without affecting the resulting geometry).

    What am I misunderstanding, and how can I factor out ' "y radius=2"
    in both
    "xyz polar cs:" constructs ' ?

Philip Taylor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110605/1dfc1ae9/attachment.html>

More information about the texhax mailing list