Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Funky and backward diagrams in TeX Live 2019/2020. #73

Open
diaza opened this issue Jul 13, 2021 · 5 comments
Open

Funky and backward diagrams in TeX Live 2019/2020. #73

diaza opened this issue Jul 13, 2021 · 5 comments

Comments

@diaza
Copy link

diaza commented Jul 13, 2021

Apologies if this is not the right area for this issue.

I'm using TikZ-Feynman for a document I'm writing on Overleaf, and when I would copy example code for some diagrams they would end up looking funky. For example, the following code
\feynmandiagram [large, vertical=e to f] { a -- [fermion] b -- [photon, momentum=\(k\)] c -- [fermion] d, b -- [fermion, momentum'=\(p_{1}\)] e -- [fermion, momentum'=\(p_{2}\)] c, e -- [gluon] f, h -- [fermion] f -- [fermion] i; };
should produce this:
image

but my document was outputting the following

image.

In addition to the funkiness in the middle, the arrows are pointing in opposite directions, which I was noticing in all the Feynman diagrams I was drawing.

I found that this issue was resolved when I changed the TeX Live version from 2020/2019 to 2018.

I don't know if this is a bug with TikZ-Feynman, with the TeX Live distributions, or with Overleaf.

@diaza
Copy link
Author

diaza commented Jul 13, 2021

Another, simpler example:
When I draw
\feynmandiagram [vertical=a to b] { i1 [particle=\(\nu_{\beta}\)] -- [fermion] a -- [fermion] f1 [particle=\(\beta\)], a -- [boson] b, };

I get the following with TeX Live 2019 & 2020:
image
And the following with TeX Live 2018:
image

The TeX Live 2018 drawing is my expectation.

@Scientificaa
Copy link

Hi, has it been solved now? I'm also facing this problem, and it seems that I cant find any solution

@JP-Ellis
Copy link
Owner

Unfortunately, I do not know the exact reason behind this. I suspect it is due to a different source of randomness and you might have to set the random seed manually to get it to work.

@turner-julian
Copy link

I also have run into the same issue trying to run the code used in the documentation of tikz-feynman:
Screen Shot 2023-03-29 at 3 33 39 PM

Has there been any progress made with this specific issue?

@JP-Ellis
Copy link
Owner

JP-Ellis commented Jun 20, 2023

I will be releasing a new version of TikZ-Feynman in the next few weeks, and hope to used a fixed seed to help ensure reproducibility across the different runtime environments; however, the underlying algorithm is stochastic and I don't know in enough details whether the underlying pseudo-random number generator in Lua is deterministic across different environments.

In any case, if you do get the 'wrong' layout, you can tweak the momentum to momentum' to switch the lines; or fermion to anti fermion for arrows. You can also specify a specific seed if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants