0

A comment on my last question pointed out that I should avoid using style names that are already declared in TikZ, and I read the manual but it was somewhat vague on the side-effects of not doing this.

I've been looking at using some patterns to decorate the odd shape here and there, but the built-in patterns library seems a bit lacking in features. Using ideas from this question, it seems possible to override the built-in patterns by simply declaring your own with the same names. In theory, it'd still work, provided I set sensible defaults, but I'm uncertain as to how much more difficult it would be to debug code when things go wrong.

I don't really have time to come up with a MWE (assignment procrastination…) but has anyone tried something similar?

Robbie
  • 2,893
  • 1
    I don't know what an MWA is, but please provide an MWE. The problem mentioned by Zarko is not that you are overwriting existing styles, but that you are using style names which TikZ uses for other things. In the case of patterns, I don't understand why you'd want to overwrite them. Why not just pick a different name? I don't think overwriting the patterns would hurt provided you don't need the pattern for anything, but I can't see any good reason to do it and it just seems to be borrowing trouble. Frankly, I get enough mysterious-and-hard-to-debug problems without needing to add to them. – cfr Sep 05 '16 at 01:14
  • Note that the answer to the question you linked does not suggest at any point overwriting default styles. Nor, for that matter, does the question. – cfr Sep 05 '16 at 02:37

0 Answers0