I have been using Tikz for some time, and have some macros that have been working well... so far. It seems they broke since pgf updated to 3.0.1.

In particular, I have some macros to put text in a specific point in a figure, and to position it in a specific place in that figure. For instance, the following macro used to put text in the right side of some specific place:

  \node[label distance=-10pt,inner sep=0pt,outer sep=0pt,
    minimum height=0pt,minimum width=0pt,
    outer xsep=0pt,outer ysep=0pt,inner xsep=0pt,inner ysep=0pt,
    label=right:#2] at (#1){};}

Now, the "right" argument to label is not considered a position argument anymore; it is now treated as part of the label (so all labels are of the form "right:...").

How should I do this, in a way that is more robust to pgf versions ?



  \node[inner sep=0pt,outer sep=0pt,
        minimum height=0pt,minimum width=0pt,
        label={[label distance=-10pt]right:#2}] at (#1) {};}

I suppose, that among options of your node to label belong only label distance and others to node. For it is enough to determine inner and outer separation only once ... so I omit their declaration for xsep and ysep.

I do not understand why you use an empty node for placing labels. This you can do this by node itself.

  • 2
    coordinates can also have labels as they are nodes. so you don't need any of that stuff – percusse Nov 15 '15 at 11:44

Your Answer

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

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