JP-Ellis / tikz-feynman

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

[Regression] In version 1.1.0 every <key> style is not applied #20

Closed giordano closed 8 years ago

giordano commented 8 years ago

This code

\documentclass[tikz]{standalone}
\usepackage{tikz-feynman}
\tikzfeynmanset{
  every fermion/.style={blue},
}
\begin{document}
\begin{tikzpicture}
  \begin{feynman}
    \diagram [vertical=a to b]{
      i1 [particle=\(\textup{e}^{-}\)] -- [fermion] a,
      i2 [particle=\(\textup{e}^{-}\)] -- [anti fermion] a,
      a  -- [photon,edge label'=\(\gamma\)] b,
      b  -- [anti fermion] f1 [particle=\(\textup{e}^{-}\)],
      b  -- [fermion] f2 [particle=\(\textup{e}^{-}\)],
    };
    \draw[red,thick] ($(a)!0.5!(b)$) circle (1.85);
  \end{feynman}
\end{tikzpicture}
\end{document}

used to give this output (see http://tex.stackexchange.com/a/290874/31416)

2

With version 1.0.0 I get

1

every fermion/.style={blue} doesn't seem to have effect and the \gamma label to the photon line probably changed position (I'm not 100% sure about the last point, it's possible that to produce the old picture I used edge label).

JP-Ellis commented 8 years ago

This is related to commit c7f3be531cf9ffe6584442f2f564487cfa4c078a, and is also described in the changelog.

I wanted to simplify the usage of every <key> so now, instead of every <key>/.style={...}, it is only necessary to have every <key>={...}. This is a miner change in the syntax and easy to fix, and it is still quite early on in the adoption of Ti_k_Z-Feynman, so hopefully it won't break too many existing diagrams.

giordano commented 8 years ago

This is related to commit c7f3be5, and is also described in the changelog.

Wow, there is a ChangeLog, I missed it, great!

I wanted to simplify the usage of every <key> so now, instead of every <key>/.style={...}, it is only necessary to have every <key>={...}. This is a miner change in the syntax and easy to fix, and it is still quite early on in the adoption of TikZ-Feynman, so hopefully it won't break too many existing diagrams.

Agreed, I'll just need to update some answers on TeX.se ;-).

I'm closing the ticket, thanks!

giordano commented 8 years ago

A minor comment: with version 1.0.0 every fermion applied to both fermion and anti fermion, now only to fermion, but probably it's better as it's now.