JP-Ellis / tikz-feynman

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

Spacing after [ prevents recognition of keys #15

Closed martin-ueding closed 8 years ago

martin-ueding commented 8 years ago

I like to split the optional arguments over multiple lines, like in this minimal (non-)working example:

\documentclass{scrartcl}
\usepackage{tikz-feynman}
\begin{document}

\feynmandiagram[
    horizontal=a to b,
]
{
    a -- b;
};

\end{document}

That works with most packages, here I get the following error:

! Package pgfkeys Error: I do not know the key '/tikz/ horizontal', to which yo
u passed 'a to b', and I am going to ignore it. Perhaps you misspelled it.

It is fixed then I use a percent sign right after the opening square bracket, like so:

\feynmandiagram[%

I am not sure why it works with other packages and not with this one, but I find it slightly irritating.


Thank you again for this great package, I made so many Feynman diagrams with it so far and I will continue to point out that tikz-feynman does not destroy the gray value of your page like feynmp does to everybody who does not believe that tikz-feynman is the way to go!

JP-Ellis commented 8 years ago

I'm glad you're liking Ti_k_Z-Feynman!

Now regarding this bug, it is indeed unintended behaviour. Personally, I only like have arguments on a new line when the line would otherwise be unnecessarily long and since Ti_k_Z-Feynman doesn't usually need many arguments, I haven't encountered this so far.

I'll have a look at fixing this!

JP-Ellis commented 8 years ago

I have just pushed a commit to the develop branch which should fix this. Hopefully it works for you too, otherwise, let me know if it still doesn't work.