Menu

#61 Alterable pin edge

Future
open-accepted
nobody
None
1
2018-12-31
2011-04-28
No

I have encountered the need to draw pin edge on some condition. I used .is if handler and redefined every pin edge which draws the pin edge when corresponding TeX-if is set to true. I expected that putting .is if key to pin edge option will alter the every pin edge code, but that did not do. Browsing tikz.code.tex, I figured out that option are set after execution of every pin edge style. Having placed every pin edge after options, did the trick.

So, I suggest editing 508th line of tikz.code.tex:

edge[every pin edge,tikz@pre@pin@edge,tikz@pin@options]

to

edge[tikz@pre@pin@edge,tikz@pin@options,every pin edge]

Discussion

  • Till Tantau

    Till Tantau - 2013-08-29
    • status: open --> open-accepted
    • Group: --> Next Release (example)
    • Priority: 5 --> 1
     
  • Till Tantau

    Till Tantau - 2013-08-29

    Hi,

    hmm, yeah, this would solve your problem here. However, the "every xxx" are (should) usually be executed before the local options of the edge/pic/picture/whatever since these options are "more local" than the every options.

    I bet it would be possible to tweak the code of your conditions to achieve the desired effect. However, admittedly, it would be even better to have a clear policy on the "every xxx" and to have something like "every xxx" and "every xxx after local options". That might make it into some future version.

     
  • Till Tantau

    Till Tantau - 2013-09-30
    • Group: Next Release --> Future