JP-Ellis / tikz-feynman

Feynman Diagrams with TikZ
http://www.jpellis.me/projects/tikz-feynman
Other
148 stars 20 forks source link

Absolute Paths are required in \tikzfeynmanset{} #9

Open JP-Ellis opened 8 years ago

JP-Ellis commented 8 years ago

I have been unable to fix it so far. Luckily, this bug results in only an inconvenience and the package is still completely usable. Suggestions to fix this bug are welcome!

Initial Issue

Currently, absolute paths (starting with /) are required when specifying style for keys. For example, this will work:

\tikzfeynmanset{
  my dot/.style={
    /tikzfeynman/dot,
    /tikz/minimum size=3pt,
  }
}

but

\tikzfeynmanset{
  my dot/.style={
    dot,
    minimum size=3pt,
  }
}

results in an the following error:

./test.tex:18: Package pgfkeys Error: I do not know the key '/minimum size', to
which you passed '3pt', and I am going to ignore it. Perhaps you misspelled it.

if my dot gets used.

Currently, Ti_k_Z-Feynman override the way unknown keys in /tikz are searched for by first looking in /tikzfeynman. I did this because I have been unable to find any way of changing the search path within the {feynman} environment such that keys are searched first /tikzfeynman before searching elsewhere. If this is achievable, please let me know.

From my attempts at debugging, I believe the issue to be due either one (or more) of the following:

After trying in vain to fix this, I posted the question on the TeX StackExchange, and user Symbol 1 provided a solution.

This has been implemented in the fix-search-paths branch and it nearly works. I still run into issues with the graph drawing libraries.

Some help would still be appreciated.