Updated lualatex vs. tikz-feynman












3














ORIGINAL QUESTION: I have major problems compiling Feynman diagrams produced with the tikz-feynman package with lualatex. To make it less likely that I am just sloppy, I copied the example from this nice answer.



documentclass[tikz, border=10pt]{standalone}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


Given that this the accepted answer, it is probably safe to assume that there was a time when this could be compiled. However, when I compile it on my updated TeXLive2018 distribution with lualatex, I get the error message



! Package pgf Error: Graph drawing library 'circular' not found.


EXTRA INFORMATION: This question was marked as a duplicate (by myself) of this question. Indeed, if one uses the accepted answer to fix it, one may arrive at



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

begin{luacode*}
function pgf_lookup_and_require(name)
local sep = package.config:sub(1,1)
local function lookup(name)
local sub = name:gsub('%.',sep)
if kpse.find_file(sub, 'lua') then
require(name)
elseif kpse.find_file(sub, 'clua') then
collectgarbage('stop')
require(name)
collectgarbage('restart')
else
return false
end
return true
end
return
lookup('pgf.gd.' .. name .. '.library') or
lookup('pgf.gd.' .. name) or
lookup(name .. '.library') or
lookup(name)
end
end{luacode*}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here



The good news is that the error is gone. However, the output looks really different from the output of the original answer



enter image description here



in that the photon vertex on the top right has move to the left. When I marked my answer as a duplicate, I did not carefully check that the output is OK. Now I did, and realized that the output produced using Henri's fix produces unexpected results. Therefore, I'd like to reopen the question.










share|improve this question
























  • Workaround only. Copy texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex into the current direcroty and try the following: change line 1093 if resolvers then to if false then
    – Akira Kakuto
    Oct 13 '18 at 5:57






  • 2




    There is already a question and also a pgf bug report about this.sourceforge.net/p/pgf/bugs/493
    – Ulrike Fischer
    Oct 13 '18 at 6:56








  • 2




    The obvious solution is to use picture mode instead of tikz-pgf
    – David Carlisle
    Oct 13 '18 at 8:31






  • 1




    @marmot: I'm only suggesting that the problem is caused by differences of versions of used lua. I don't know a solution.
    – Akira Kakuto
    Oct 15 '18 at 21:12






  • 1




    @JP-Ellis It is not the seed that changed but the whole RNG. Lua 5.2 used the C standard library rand() function, whereas Lua 5.3 uses the POSIX random() function. Therefore you get entirely different random numbers even with the same seed.
    – Henri Menke
    Jan 2 at 4:10


















3














ORIGINAL QUESTION: I have major problems compiling Feynman diagrams produced with the tikz-feynman package with lualatex. To make it less likely that I am just sloppy, I copied the example from this nice answer.



documentclass[tikz, border=10pt]{standalone}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


Given that this the accepted answer, it is probably safe to assume that there was a time when this could be compiled. However, when I compile it on my updated TeXLive2018 distribution with lualatex, I get the error message



! Package pgf Error: Graph drawing library 'circular' not found.


EXTRA INFORMATION: This question was marked as a duplicate (by myself) of this question. Indeed, if one uses the accepted answer to fix it, one may arrive at



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

begin{luacode*}
function pgf_lookup_and_require(name)
local sep = package.config:sub(1,1)
local function lookup(name)
local sub = name:gsub('%.',sep)
if kpse.find_file(sub, 'lua') then
require(name)
elseif kpse.find_file(sub, 'clua') then
collectgarbage('stop')
require(name)
collectgarbage('restart')
else
return false
end
return true
end
return
lookup('pgf.gd.' .. name .. '.library') or
lookup('pgf.gd.' .. name) or
lookup(name .. '.library') or
lookup(name)
end
end{luacode*}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here



The good news is that the error is gone. However, the output looks really different from the output of the original answer



enter image description here



in that the photon vertex on the top right has move to the left. When I marked my answer as a duplicate, I did not carefully check that the output is OK. Now I did, and realized that the output produced using Henri's fix produces unexpected results. Therefore, I'd like to reopen the question.










share|improve this question
























  • Workaround only. Copy texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex into the current direcroty and try the following: change line 1093 if resolvers then to if false then
    – Akira Kakuto
    Oct 13 '18 at 5:57






  • 2




    There is already a question and also a pgf bug report about this.sourceforge.net/p/pgf/bugs/493
    – Ulrike Fischer
    Oct 13 '18 at 6:56








  • 2




    The obvious solution is to use picture mode instead of tikz-pgf
    – David Carlisle
    Oct 13 '18 at 8:31






  • 1




    @marmot: I'm only suggesting that the problem is caused by differences of versions of used lua. I don't know a solution.
    – Akira Kakuto
    Oct 15 '18 at 21:12






  • 1




    @JP-Ellis It is not the seed that changed but the whole RNG. Lua 5.2 used the C standard library rand() function, whereas Lua 5.3 uses the POSIX random() function. Therefore you get entirely different random numbers even with the same seed.
    – Henri Menke
    Jan 2 at 4:10
















3












3








3







ORIGINAL QUESTION: I have major problems compiling Feynman diagrams produced with the tikz-feynman package with lualatex. To make it less likely that I am just sloppy, I copied the example from this nice answer.



documentclass[tikz, border=10pt]{standalone}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


Given that this the accepted answer, it is probably safe to assume that there was a time when this could be compiled. However, when I compile it on my updated TeXLive2018 distribution with lualatex, I get the error message



! Package pgf Error: Graph drawing library 'circular' not found.


EXTRA INFORMATION: This question was marked as a duplicate (by myself) of this question. Indeed, if one uses the accepted answer to fix it, one may arrive at



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

begin{luacode*}
function pgf_lookup_and_require(name)
local sep = package.config:sub(1,1)
local function lookup(name)
local sub = name:gsub('%.',sep)
if kpse.find_file(sub, 'lua') then
require(name)
elseif kpse.find_file(sub, 'clua') then
collectgarbage('stop')
require(name)
collectgarbage('restart')
else
return false
end
return true
end
return
lookup('pgf.gd.' .. name .. '.library') or
lookup('pgf.gd.' .. name) or
lookup(name .. '.library') or
lookup(name)
end
end{luacode*}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here



The good news is that the error is gone. However, the output looks really different from the output of the original answer



enter image description here



in that the photon vertex on the top right has move to the left. When I marked my answer as a duplicate, I did not carefully check that the output is OK. Now I did, and realized that the output produced using Henri's fix produces unexpected results. Therefore, I'd like to reopen the question.










share|improve this question















ORIGINAL QUESTION: I have major problems compiling Feynman diagrams produced with the tikz-feynman package with lualatex. To make it less likely that I am just sloppy, I copied the example from this nice answer.



documentclass[tikz, border=10pt]{standalone}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


Given that this the accepted answer, it is probably safe to assume that there was a time when this could be compiled. However, when I compile it on my updated TeXLive2018 distribution with lualatex, I get the error message



! Package pgf Error: Graph drawing library 'circular' not found.


EXTRA INFORMATION: This question was marked as a duplicate (by myself) of this question. Indeed, if one uses the accepted answer to fix it, one may arrive at



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

begin{luacode*}
function pgf_lookup_and_require(name)
local sep = package.config:sub(1,1)
local function lookup(name)
local sub = name:gsub('%.',sep)
if kpse.find_file(sub, 'lua') then
require(name)
elseif kpse.find_file(sub, 'clua') then
collectgarbage('stop')
require(name)
collectgarbage('restart')
else
return false
end
return true
end
return
lookup('pgf.gd.' .. name .. '.library') or
lookup('pgf.gd.' .. name) or
lookup(name .. '.library') or
lookup(name)
end
end{luacode*}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here



The good news is that the error is gone. However, the output looks really different from the output of the original answer



enter image description here



in that the photon vertex on the top right has move to the left. When I marked my answer as a duplicate, I did not carefully check that the output is OK. Now I did, and realized that the output produced using Henri's fix produces unexpected results. Therefore, I'd like to reopen the question.







luatex tikz-feynman






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 13 '18 at 23:35







marmot

















asked Oct 13 '18 at 3:23









marmotmarmot

89.9k4104195




89.9k4104195












  • Workaround only. Copy texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex into the current direcroty and try the following: change line 1093 if resolvers then to if false then
    – Akira Kakuto
    Oct 13 '18 at 5:57






  • 2




    There is already a question and also a pgf bug report about this.sourceforge.net/p/pgf/bugs/493
    – Ulrike Fischer
    Oct 13 '18 at 6:56








  • 2




    The obvious solution is to use picture mode instead of tikz-pgf
    – David Carlisle
    Oct 13 '18 at 8:31






  • 1




    @marmot: I'm only suggesting that the problem is caused by differences of versions of used lua. I don't know a solution.
    – Akira Kakuto
    Oct 15 '18 at 21:12






  • 1




    @JP-Ellis It is not the seed that changed but the whole RNG. Lua 5.2 used the C standard library rand() function, whereas Lua 5.3 uses the POSIX random() function. Therefore you get entirely different random numbers even with the same seed.
    – Henri Menke
    Jan 2 at 4:10




















  • Workaround only. Copy texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex into the current direcroty and try the following: change line 1093 if resolvers then to if false then
    – Akira Kakuto
    Oct 13 '18 at 5:57






  • 2




    There is already a question and also a pgf bug report about this.sourceforge.net/p/pgf/bugs/493
    – Ulrike Fischer
    Oct 13 '18 at 6:56








  • 2




    The obvious solution is to use picture mode instead of tikz-pgf
    – David Carlisle
    Oct 13 '18 at 8:31






  • 1




    @marmot: I'm only suggesting that the problem is caused by differences of versions of used lua. I don't know a solution.
    – Akira Kakuto
    Oct 15 '18 at 21:12






  • 1




    @JP-Ellis It is not the seed that changed but the whole RNG. Lua 5.2 used the C standard library rand() function, whereas Lua 5.3 uses the POSIX random() function. Therefore you get entirely different random numbers even with the same seed.
    – Henri Menke
    Jan 2 at 4:10


















Workaround only. Copy texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex into the current direcroty and try the following: change line 1093 if resolvers then to if false then
– Akira Kakuto
Oct 13 '18 at 5:57




Workaround only. Copy texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex into the current direcroty and try the following: change line 1093 if resolvers then to if false then
– Akira Kakuto
Oct 13 '18 at 5:57




2




2




There is already a question and also a pgf bug report about this.sourceforge.net/p/pgf/bugs/493
– Ulrike Fischer
Oct 13 '18 at 6:56






There is already a question and also a pgf bug report about this.sourceforge.net/p/pgf/bugs/493
– Ulrike Fischer
Oct 13 '18 at 6:56






2




2




The obvious solution is to use picture mode instead of tikz-pgf
– David Carlisle
Oct 13 '18 at 8:31




The obvious solution is to use picture mode instead of tikz-pgf
– David Carlisle
Oct 13 '18 at 8:31




1




1




@marmot: I'm only suggesting that the problem is caused by differences of versions of used lua. I don't know a solution.
– Akira Kakuto
Oct 15 '18 at 21:12




@marmot: I'm only suggesting that the problem is caused by differences of versions of used lua. I don't know a solution.
– Akira Kakuto
Oct 15 '18 at 21:12




1




1




@JP-Ellis It is not the seed that changed but the whole RNG. Lua 5.2 used the C standard library rand() function, whereas Lua 5.3 uses the POSIX random() function. Therefore you get entirely different random numbers even with the same seed.
– Henri Menke
Jan 2 at 4:10






@JP-Ellis It is not the seed that changed but the whole RNG. Lua 5.2 used the C standard library rand() function, whereas Lua 5.3 uses the POSIX random() function. Therefore you get entirely different random numbers even with the same seed.
– Henri Menke
Jan 2 at 4:10












1 Answer
1






active

oldest

votes


















2














With the latest master branch of my TikZ/PGF development repository it compiles fine, but thanks to new features in Lua 5.3 some graphs might appear mirrored. There are workarounds for this but no backwards compatibility will be provided by TikZ.



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























  • The merge is pending sourceforge.net/p/pgf/git/merge-requests/14 Unfortunately I still don't have access to the upstream repo.
    – Henri Menke
    Jan 1 at 23:25












  • I just merged it ;)
    – Stefan Pinnow
    Jan 2 at 10:16










  • This also solves my question (now flagged duplicate). Thanks. As you say "some graphs might appear mirrored", I wonder if there is already an example demonstrating this?
    – Johannes Z
    Jan 3 at 12:26










  • @JohannesZ tex.stackexchange.com/questions/468466/…
    – Henri Menke
    Jan 6 at 3:43











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455001%2fupdated-lualatex-vs-tikz-feynman%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














With the latest master branch of my TikZ/PGF development repository it compiles fine, but thanks to new features in Lua 5.3 some graphs might appear mirrored. There are workarounds for this but no backwards compatibility will be provided by TikZ.



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























  • The merge is pending sourceforge.net/p/pgf/git/merge-requests/14 Unfortunately I still don't have access to the upstream repo.
    – Henri Menke
    Jan 1 at 23:25












  • I just merged it ;)
    – Stefan Pinnow
    Jan 2 at 10:16










  • This also solves my question (now flagged duplicate). Thanks. As you say "some graphs might appear mirrored", I wonder if there is already an example demonstrating this?
    – Johannes Z
    Jan 3 at 12:26










  • @JohannesZ tex.stackexchange.com/questions/468466/…
    – Henri Menke
    Jan 6 at 3:43
















2














With the latest master branch of my TikZ/PGF development repository it compiles fine, but thanks to new features in Lua 5.3 some graphs might appear mirrored. There are workarounds for this but no backwards compatibility will be provided by TikZ.



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























  • The merge is pending sourceforge.net/p/pgf/git/merge-requests/14 Unfortunately I still don't have access to the upstream repo.
    – Henri Menke
    Jan 1 at 23:25












  • I just merged it ;)
    – Stefan Pinnow
    Jan 2 at 10:16










  • This also solves my question (now flagged duplicate). Thanks. As you say "some graphs might appear mirrored", I wonder if there is already an example demonstrating this?
    – Johannes Z
    Jan 3 at 12:26










  • @JohannesZ tex.stackexchange.com/questions/468466/…
    – Henri Menke
    Jan 6 at 3:43














2












2








2






With the latest master branch of my TikZ/PGF development repository it compiles fine, but thanks to new features in Lua 5.3 some graphs might appear mirrored. There are workarounds for this but no backwards compatibility will be provided by TikZ.



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer














With the latest master branch of my TikZ/PGF development repository it compiles fine, but thanks to new features in Lua 5.3 some graphs might appear mirrored. There are workarounds for this but no backwards compatibility will be provided by TikZ.



documentclass[tikz, border=10pt]{standalone}
usepackage{luacode}
usepackage{tikz}
usetikzlibrary{graphdrawing}

usepackage[compat=1.1.0]{tikz-feynman}

begin{document}
begin{tikzpicture}
begin{feynman}
diagram [vertical'=a to b, edges={red}] {
i1 -- [fermion] a -- [fermion] f1,
a -- [photon] b,
i2 -- [fermion] b -- [fermion] f2,
};

vertex [above right=of f1] (k1);
vertex [below right=of f1] (p1);
vertex [below right=of f2] (k2);
vertex [above right=of f2] (p2);

diagram* {
(f1) -- [fermion] (k1),
(f1) -- [photon] (p1),
(f2) -- [fermion] (k2),
(f2) -- [photon] (p2),
};
end{feynman}
end{tikzpicture}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 6 at 4:06

























answered Jan 1 at 23:15









Henri MenkeHenri Menke

70.5k8156264




70.5k8156264












  • The merge is pending sourceforge.net/p/pgf/git/merge-requests/14 Unfortunately I still don't have access to the upstream repo.
    – Henri Menke
    Jan 1 at 23:25












  • I just merged it ;)
    – Stefan Pinnow
    Jan 2 at 10:16










  • This also solves my question (now flagged duplicate). Thanks. As you say "some graphs might appear mirrored", I wonder if there is already an example demonstrating this?
    – Johannes Z
    Jan 3 at 12:26










  • @JohannesZ tex.stackexchange.com/questions/468466/…
    – Henri Menke
    Jan 6 at 3:43


















  • The merge is pending sourceforge.net/p/pgf/git/merge-requests/14 Unfortunately I still don't have access to the upstream repo.
    – Henri Menke
    Jan 1 at 23:25












  • I just merged it ;)
    – Stefan Pinnow
    Jan 2 at 10:16










  • This also solves my question (now flagged duplicate). Thanks. As you say "some graphs might appear mirrored", I wonder if there is already an example demonstrating this?
    – Johannes Z
    Jan 3 at 12:26










  • @JohannesZ tex.stackexchange.com/questions/468466/…
    – Henri Menke
    Jan 6 at 3:43
















The merge is pending sourceforge.net/p/pgf/git/merge-requests/14 Unfortunately I still don't have access to the upstream repo.
– Henri Menke
Jan 1 at 23:25






The merge is pending sourceforge.net/p/pgf/git/merge-requests/14 Unfortunately I still don't have access to the upstream repo.
– Henri Menke
Jan 1 at 23:25














I just merged it ;)
– Stefan Pinnow
Jan 2 at 10:16




I just merged it ;)
– Stefan Pinnow
Jan 2 at 10:16












This also solves my question (now flagged duplicate). Thanks. As you say "some graphs might appear mirrored", I wonder if there is already an example demonstrating this?
– Johannes Z
Jan 3 at 12:26




This also solves my question (now flagged duplicate). Thanks. As you say "some graphs might appear mirrored", I wonder if there is already an example demonstrating this?
– Johannes Z
Jan 3 at 12:26












@JohannesZ tex.stackexchange.com/questions/468466/…
– Henri Menke
Jan 6 at 3:43




@JohannesZ tex.stackexchange.com/questions/468466/…
– Henri Menke
Jan 6 at 3:43


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455001%2fupdated-lualatex-vs-tikz-feynman%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents