Comments (2)
Thanks for the feedback, I'm glad you have found this package useful :)
Firstly, the graph can be flipped around by using horizontal'=v1 to v2
instead of horizontal=v1 to v2
. The extra '
tells the graphing algorithm to flip the graph around that line, so this should fix your fermion line to be going up.
As for the momentum labels, there is the key momentum/label distance
which can move the momentum label further away; however, due to the way Ti_k_Z draws the graph, it doesn't work on a per-arrow basis when used inside a graph and has to be set globally. When I get around to it, I want to fix this and implement a similar syntax to the way labels are created (something like momentum={[label sep=0.5cm] \(k\)}
). Your code also illustrates another bug: the momentum arrows override the way the line is draw and remove the effect of bend left
unfortunately (something else I have to fix).
Finally, regarding the fermion lines not being bent by the scalar: unfortunately this can't be achieved with the algorithm as it is (at least, to my knowledge). Ti_k_Z-Feynman builds on the existing graphing algorithms from Ti_k_Z and for me to support this, I would need to rework the underlying algorithms to work more intimately with Ti_k_Z-Feynman (which I may do at some point in the future, but it's definitely not a priority). A workaround is to not draw the scalar edge in the graph itself, but draw it afterwards (though I find the
Here is a minimal working example to illustrate the fixes:
\documentclass[tikz]{standalone}
\usepackage{tikz-feynman}
\begin{document}
\begin{tikzpicture}[momentum/label distance=0.5cm]
\graph[feynman, horizontal'=v1 to v2]{
a
-- [fermion, momentum'=\(p\)] h1
-- [fermion, momentum=\(k\)] v1
-- [fermion, momentum={\(k' = k + q\)}] h2
-- [fermion, momentum'=\(p'\)] b
;
h1 -- [scalar, momentum'=\(p - k\)] h2;
v2 -- [photon, momentum=\(q\)] v1;
};
\end{tikzpicture}
\begin{tikzpicture}[momentum/label distance=0.5cm]
\graph[feynman, horizontal'=v1 to v2]{
a
-- [fermion, momentum'=\(p\)] h1
-- [fermion, momentum=\(k\)] v1
-- [fermion, momentum=\(k + q\)] h2
-- [fermion, momentum'=\(p'\)] b
;
v2 -- [photon, momentum=\(q\)] v1;
};
\draw[scalar, momentum'=\(p - k\)] (h1) to (h2);
\end{tikzpicture}
\end{document}
I have exams finishing on the 9th of November, so I won't be able to fix these bugs until then; however, I certainly intend to get version 1 of Ti_k_Z-Feynman complete soon afterwards :)
from tikz-feynman.
Thanks for the suggestions! Those helped me enough to get a nice looking graph. Good luck with your exams!
from tikz-feynman.
Related Issues (20)
- blob not centered as it should HOT 2
- Compiler cannot find PGF files even though they exist HOT 8
- Many-body feynman diagrams HOT 2
- \usetikzlibrary{feynman} HOT 3
- Export baseline value for an equation from Latex HOT 1
- Externalization of tikz-feynman environment inside math environment spawns multiple figure files HOT 1
- Reuse diagram
- Conflict with pgf 3.15 HOT 1
- How to finish this particle decay channel diagram?
- In what direction is time in by default?
- Global option to disable all LuaTeX warnings
- Funky and backward diagrams in TeX Live 2019/2020. HOT 5
- Feature Request: Compat with MathJax HOT 2
- Trouble angling edges
- Getting funky-looking diagrams using electron-positron scattering example HOT 1
- \feynmandiagram does not work at all anymore in TexShop 4.73 HOT 2
- inline/baseline in feynman environment
- Momentum arrows unreadable HOT 1
- How to draw a line that connects the same point (single line loop)? HOT 1
- Very bad quality of output, not smooth lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tikz-feynman.