tikz-feynman: edge labels Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraEgg-shaped Feynman diagramvertex style in tikz-feynmanInstalling Tikz-FeynmanFeynman diagrams in tikz-feynman: labelling of an edgeFeynman diagram - shorten legs in tikz-packageProblems with tikz-feynmantadpole diagram using tikz-feynmanVacuum bubbles in tikz-FeynmanSpecific Feynman Diagram TikZ-Feynman DrawingModifying an edge in a Feynman diagram generated by tikz-feynmanUpdated lualatex vs. tikz-feynman
How to find the stem of any word?
Scheduling based problem
Could moose/elk survive in the Amazon forest?
How much of a wave function must reside inside event horizon for it to be consumed by the black hole?
How exactly does Hawking radiation decrease the mass of black holes?
Map material from china not allowed to leave the country
What is /etc/mtab in Linux?
Is accepting an invalid credit card number a security issue?
Multiple options vs single option UI
Older movie/show about humans on derelict alien warship which refuels by passing through a star
Did the Roman Empire have penal colonies?
What is the ongoing value of the Kanban board to the developers as opposed to management
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
Air bladders in bat-like skin wings for better lift?
Mistake in years of experience in resume?
Putting Ant-Man on house arrest
What is the best way to deal with NPC-NPC combat?
Why do games have consumables?
Why doesn't the standard consider a template constructor as a copy constructor?
All ASCII characters with a given bit count
Multiple fireplaces in an apartment building?
Approximating integral with small parameter
How does the mezzoloth's teleportation work?
Is it acceptable to use working hours to read general interest books?
tikz-feynman: edge labels
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraEgg-shaped Feynman diagramvertex style in tikz-feynmanInstalling Tikz-FeynmanFeynman diagrams in tikz-feynman: labelling of an edgeFeynman diagram - shorten legs in tikz-packageProblems with tikz-feynmantadpole diagram using tikz-feynmanVacuum bubbles in tikz-FeynmanSpecific Feynman Diagram TikZ-Feynman DrawingModifying an edge in a Feynman diagram generated by tikz-feynmanUpdated lualatex vs. tikz-feynman
I would like to understand how can I label edges of diagrams as at this picture:
I assume that it possible to label vertices and than move each label, but I do not know how. Can anyone gives some suggestions?
What I tried: label each vertex
beginfeynman
vertex (v1) (cl);
vertex[right=0.5cm of v1] (v2) (cl);
vertex[right=1cm of v2] (v3) (cl);
vertex[right=0.5cm of v3] (v4) (cl);;
diagram*(v1)--(v2), (v2)--[half left](v3)--[half left](v2),(v3)--(v4);
endfeynman
It is awful. Then, I have tried to label edges:
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=(cl quad)](v2), (v2)--[half left,edge label=(cl quad cl)](v3)--[half left,edge label=(cl quad cl)](v2),(v3)--[edge label=(quad cl)](v4);
endfeynman
It looks not so awful, but not perfect: labels are so far from edges.
tikz-feynman
add a comment |
I would like to understand how can I label edges of diagrams as at this picture:
I assume that it possible to label vertices and than move each label, but I do not know how. Can anyone gives some suggestions?
What I tried: label each vertex
beginfeynman
vertex (v1) (cl);
vertex[right=0.5cm of v1] (v2) (cl);
vertex[right=1cm of v2] (v3) (cl);
vertex[right=0.5cm of v3] (v4) (cl);;
diagram*(v1)--(v2), (v2)--[half left](v3)--[half left](v2),(v3)--(v4);
endfeynman
It is awful. Then, I have tried to label edges:
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=(cl quad)](v2), (v2)--[half left,edge label=(cl quad cl)](v3)--[half left,edge label=(cl quad cl)](v2),(v3)--[edge label=(quad cl)](v4);
endfeynman
It looks not so awful, but not perfect: labels are so far from edges.
tikz-feynman
add a comment |
I would like to understand how can I label edges of diagrams as at this picture:
I assume that it possible to label vertices and than move each label, but I do not know how. Can anyone gives some suggestions?
What I tried: label each vertex
beginfeynman
vertex (v1) (cl);
vertex[right=0.5cm of v1] (v2) (cl);
vertex[right=1cm of v2] (v3) (cl);
vertex[right=0.5cm of v3] (v4) (cl);;
diagram*(v1)--(v2), (v2)--[half left](v3)--[half left](v2),(v3)--(v4);
endfeynman
It is awful. Then, I have tried to label edges:
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=(cl quad)](v2), (v2)--[half left,edge label=(cl quad cl)](v3)--[half left,edge label=(cl quad cl)](v2),(v3)--[edge label=(quad cl)](v4);
endfeynman
It looks not so awful, but not perfect: labels are so far from edges.
tikz-feynman
I would like to understand how can I label edges of diagrams as at this picture:
I assume that it possible to label vertices and than move each label, but I do not know how. Can anyone gives some suggestions?
What I tried: label each vertex
beginfeynman
vertex (v1) (cl);
vertex[right=0.5cm of v1] (v2) (cl);
vertex[right=1cm of v2] (v3) (cl);
vertex[right=0.5cm of v3] (v4) (cl);;
diagram*(v1)--(v2), (v2)--[half left](v3)--[half left](v2),(v3)--(v4);
endfeynman
It is awful. Then, I have tried to label edges:
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=(cl quad)](v2), (v2)--[half left,edge label=(cl quad cl)](v3)--[half left,edge label=(cl quad cl)](v2),(v3)--[edge label=(quad cl)](v4);
endfeynman
It looks not so awful, but not perfect: labels are so far from edges.
tikz-feynman
tikz-feynman
edited 4 hours ago
Artem Alexandrov
asked 5 hours ago
Artem AlexandrovArtem Alexandrov
134
134
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I have kept the same structure as you by eliminating your labels and I have inserted them manually using nodes.... (a) (b) ....
with cartesian coordinates that have all small labels and are closer to the ellipse.
documentclass[tikz]article
usepackagetikz-feynman
tikzfeynmansetcompat=1.0.0
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=](v2),
(v2)--[half left,edge label=](v3)--[half left,edge label=](v2),
(v3)--[edge label=](v4);
endfeynman
node(a) at (.6,-.5) small cl;
node(b) at (1.35,-.5) small cl;
node(c) at (.6,.5) small cl;
node(d) at (1.35,.5) small cl;
node(e) at (-.11,.15) small cl;
node(f) at (2.1,.15) small cl;
endtikzpicture
enddocument
add a comment |
Using hardcoded coordinates like node(a) at (.6,-.5) small cl;
in tikz is a deadly sin, this will break as soon as you change the tiniest thing.
to move the labels on the horizontal lines to the start and end of the lines, use
near start
andnear end
to move the labels around the circle closer to the line, reduce the
inner sep
don't use inline math to make multi-letter things italic
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*
(v1)--[edge label=textitcl,near start](v2),
(v2)--[half left,edge label=textitclquad cl,inner sep=1pt](v3)--[half left,edge label=textitclquad cl,inner sep=1pt](v2),
(v3)--[edge label=textitcl,near end](v4)
;
endfeynman
endtikzpicture
enddocument
Alternatively without any manual intervention, one can let tikz-feynman
do it's job:
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture[inner sep=2pt]
itshape
beginfeynman
diagram[horizontal=a to f,small]
a--[edge label=cl,near start]b,
b -- [quarter right,edge label'=cl]
c -- [quarter right,edge label'=cl]
d -- [quarter right,edge label'=cl]
e -- [quarter right,edge label'=cl]
b,
d--[edge label=cl,near end]f
;
endfeynman
endtikzpicture
enddocument
New contributor
Very good. I have given my little contribute. I hope I haven't made a deadly sin.
– Sebastiano
just now
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487519%2ftikz-feynman-edge-labels%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have kept the same structure as you by eliminating your labels and I have inserted them manually using nodes.... (a) (b) ....
with cartesian coordinates that have all small labels and are closer to the ellipse.
documentclass[tikz]article
usepackagetikz-feynman
tikzfeynmansetcompat=1.0.0
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=](v2),
(v2)--[half left,edge label=](v3)--[half left,edge label=](v2),
(v3)--[edge label=](v4);
endfeynman
node(a) at (.6,-.5) small cl;
node(b) at (1.35,-.5) small cl;
node(c) at (.6,.5) small cl;
node(d) at (1.35,.5) small cl;
node(e) at (-.11,.15) small cl;
node(f) at (2.1,.15) small cl;
endtikzpicture
enddocument
add a comment |
I have kept the same structure as you by eliminating your labels and I have inserted them manually using nodes.... (a) (b) ....
with cartesian coordinates that have all small labels and are closer to the ellipse.
documentclass[tikz]article
usepackagetikz-feynman
tikzfeynmansetcompat=1.0.0
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=](v2),
(v2)--[half left,edge label=](v3)--[half left,edge label=](v2),
(v3)--[edge label=](v4);
endfeynman
node(a) at (.6,-.5) small cl;
node(b) at (1.35,-.5) small cl;
node(c) at (.6,.5) small cl;
node(d) at (1.35,.5) small cl;
node(e) at (-.11,.15) small cl;
node(f) at (2.1,.15) small cl;
endtikzpicture
enddocument
add a comment |
I have kept the same structure as you by eliminating your labels and I have inserted them manually using nodes.... (a) (b) ....
with cartesian coordinates that have all small labels and are closer to the ellipse.
documentclass[tikz]article
usepackagetikz-feynman
tikzfeynmansetcompat=1.0.0
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=](v2),
(v2)--[half left,edge label=](v3)--[half left,edge label=](v2),
(v3)--[edge label=](v4);
endfeynman
node(a) at (.6,-.5) small cl;
node(b) at (1.35,-.5) small cl;
node(c) at (.6,.5) small cl;
node(d) at (1.35,.5) small cl;
node(e) at (-.11,.15) small cl;
node(f) at (2.1,.15) small cl;
endtikzpicture
enddocument
I have kept the same structure as you by eliminating your labels and I have inserted them manually using nodes.... (a) (b) ....
with cartesian coordinates that have all small labels and are closer to the ellipse.
documentclass[tikz]article
usepackagetikz-feynman
tikzfeynmansetcompat=1.0.0
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*(v1)--[edge label=](v2),
(v2)--[half left,edge label=](v3)--[half left,edge label=](v2),
(v3)--[edge label=](v4);
endfeynman
node(a) at (.6,-.5) small cl;
node(b) at (1.35,-.5) small cl;
node(c) at (.6,.5) small cl;
node(d) at (1.35,.5) small cl;
node(e) at (-.11,.15) small cl;
node(f) at (2.1,.15) small cl;
endtikzpicture
enddocument
edited 3 hours ago
answered 3 hours ago
SebastianoSebastiano
11.5k42366
11.5k42366
add a comment |
add a comment |
Using hardcoded coordinates like node(a) at (.6,-.5) small cl;
in tikz is a deadly sin, this will break as soon as you change the tiniest thing.
to move the labels on the horizontal lines to the start and end of the lines, use
near start
andnear end
to move the labels around the circle closer to the line, reduce the
inner sep
don't use inline math to make multi-letter things italic
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*
(v1)--[edge label=textitcl,near start](v2),
(v2)--[half left,edge label=textitclquad cl,inner sep=1pt](v3)--[half left,edge label=textitclquad cl,inner sep=1pt](v2),
(v3)--[edge label=textitcl,near end](v4)
;
endfeynman
endtikzpicture
enddocument
Alternatively without any manual intervention, one can let tikz-feynman
do it's job:
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture[inner sep=2pt]
itshape
beginfeynman
diagram[horizontal=a to f,small]
a--[edge label=cl,near start]b,
b -- [quarter right,edge label'=cl]
c -- [quarter right,edge label'=cl]
d -- [quarter right,edge label'=cl]
e -- [quarter right,edge label'=cl]
b,
d--[edge label=cl,near end]f
;
endfeynman
endtikzpicture
enddocument
New contributor
Very good. I have given my little contribute. I hope I haven't made a deadly sin.
– Sebastiano
just now
add a comment |
Using hardcoded coordinates like node(a) at (.6,-.5) small cl;
in tikz is a deadly sin, this will break as soon as you change the tiniest thing.
to move the labels on the horizontal lines to the start and end of the lines, use
near start
andnear end
to move the labels around the circle closer to the line, reduce the
inner sep
don't use inline math to make multi-letter things italic
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*
(v1)--[edge label=textitcl,near start](v2),
(v2)--[half left,edge label=textitclquad cl,inner sep=1pt](v3)--[half left,edge label=textitclquad cl,inner sep=1pt](v2),
(v3)--[edge label=textitcl,near end](v4)
;
endfeynman
endtikzpicture
enddocument
Alternatively without any manual intervention, one can let tikz-feynman
do it's job:
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture[inner sep=2pt]
itshape
beginfeynman
diagram[horizontal=a to f,small]
a--[edge label=cl,near start]b,
b -- [quarter right,edge label'=cl]
c -- [quarter right,edge label'=cl]
d -- [quarter right,edge label'=cl]
e -- [quarter right,edge label'=cl]
b,
d--[edge label=cl,near end]f
;
endfeynman
endtikzpicture
enddocument
New contributor
Very good. I have given my little contribute. I hope I haven't made a deadly sin.
– Sebastiano
just now
add a comment |
Using hardcoded coordinates like node(a) at (.6,-.5) small cl;
in tikz is a deadly sin, this will break as soon as you change the tiniest thing.
to move the labels on the horizontal lines to the start and end of the lines, use
near start
andnear end
to move the labels around the circle closer to the line, reduce the
inner sep
don't use inline math to make multi-letter things italic
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*
(v1)--[edge label=textitcl,near start](v2),
(v2)--[half left,edge label=textitclquad cl,inner sep=1pt](v3)--[half left,edge label=textitclquad cl,inner sep=1pt](v2),
(v3)--[edge label=textitcl,near end](v4)
;
endfeynman
endtikzpicture
enddocument
Alternatively without any manual intervention, one can let tikz-feynman
do it's job:
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture[inner sep=2pt]
itshape
beginfeynman
diagram[horizontal=a to f,small]
a--[edge label=cl,near start]b,
b -- [quarter right,edge label'=cl]
c -- [quarter right,edge label'=cl]
d -- [quarter right,edge label'=cl]
e -- [quarter right,edge label'=cl]
b,
d--[edge label=cl,near end]f
;
endfeynman
endtikzpicture
enddocument
New contributor
Using hardcoded coordinates like node(a) at (.6,-.5) small cl;
in tikz is a deadly sin, this will break as soon as you change the tiniest thing.
to move the labels on the horizontal lines to the start and end of the lines, use
near start
andnear end
to move the labels around the circle closer to the line, reduce the
inner sep
don't use inline math to make multi-letter things italic
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture
beginfeynman
vertex (v1);
vertex[right=0.5cm of v1] (v2);
vertex[right=1cm of v2] (v3);
vertex[right=0.5cm of v3] (v4);
diagram*
(v1)--[edge label=textitcl,near start](v2),
(v2)--[half left,edge label=textitclquad cl,inner sep=1pt](v3)--[half left,edge label=textitclquad cl,inner sep=1pt](v2),
(v3)--[edge label=textitcl,near end](v4)
;
endfeynman
endtikzpicture
enddocument
Alternatively without any manual intervention, one can let tikz-feynman
do it's job:
% !TeX TS-program = lualatex
documentclassarticle
usepackagetikz-feynman
begindocument
begintikzpicture[inner sep=2pt]
itshape
beginfeynman
diagram[horizontal=a to f,small]
a--[edge label=cl,near start]b,
b -- [quarter right,edge label'=cl]
c -- [quarter right,edge label'=cl]
d -- [quarter right,edge label'=cl]
e -- [quarter right,edge label'=cl]
b,
d--[edge label=cl,near end]f
;
endfeynman
endtikzpicture
enddocument
New contributor
edited 37 mins ago
New contributor
answered 2 hours ago
valerievalerie
514
514
New contributor
New contributor
Very good. I have given my little contribute. I hope I haven't made a deadly sin.
– Sebastiano
just now
add a comment |
Very good. I have given my little contribute. I hope I haven't made a deadly sin.
– Sebastiano
just now
Very good. I have given my little contribute. I hope I haven't made a deadly sin.
– Sebastiano
just now
Very good. I have given my little contribute. I hope I haven't made a deadly sin.
– Sebastiano
just now
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487519%2ftikz-feynman-edge-labels%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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