JP-Ellis / tikz-feynman

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

Disable warning for Lua #49

Open melsophos opened 6 years ago

melsophos commented 6 years ago

just started to use your package (and I find it extremely wonderful), but i am quite annoyed with all the warnings saying that key "X" is ignored because I am not using LuaTex. I don't have time now to move to LuaTex (or to make work the code you gave on your blog), so it would be nice to have an option to disable the warnings. I have placed manually all vertices and the result looks good.

JP-Ellis commented 6 years ago

There's an option to disable LuaTeX warnings:

\tikzfeynmanset{warn luatex=false}

but it doesn't seem to be working at the moment as it is still displaying errors even when set to false. If you really want to disable the warnings at the moment, then a temporary fix would be to change the lines

\def\tikzfeynman@luatex@required@path{
  \PackageWarning{tikz-feynman}{The key you tried to use '\pgfkeyscurrentpath/\pgfkeyscurrentname' requires LuaTeX.  It will be ignored.}
}
\def\tikzfeynman@luatex@required@key{
  \PackageWarning{tikz-feynman}{The key you tried to use '\pgfkeyscurrentpath' requires LuaTeX.  It will be ignored.}
}

to

\def\tikzfeynman@luatex@required@path{
  %\PackageWarning{tikz-feynman}{The key you tried to use '\pgfkeyscurrentpath/\pgfkeyscurrentname' requires LuaTeX.  It will be ignored.}
}
\def\tikzfeynman@luatex@required@key{
  %\PackageWarning{tikz-feynman}{The key you tried to use '\pgfkeyscurrentpath' requires LuaTeX.  It will be ignored.}
}

in tikzfeynmankeys.code.tex.

melsophos commented 6 years ago

It works perfectly, thanks! Once the option works maybe you could mention it in the documentation? I was expecting such a possibility but did not find it in the doc (PDF version).