Skip to content

Draft:Tikz export

juupje requested to merge juupje/FeynGame:tikz_export into master

The changes on this branch add a feature to export diagram to a TikZ-Feynman code. The conversion to TikZ is done as accurately as possible but due to the limitations of TikZ-Feynman an exact copy is not possible. The code has been tested with various diagrams. Known issues are:

  • No support for shapes (can be added in the future)
  • Arched lines cannot be represented as arcs in Tikz-Feynman, but instead use some kind of Bezier-curve.
  • No support for disconnected diagrams
  • Font-sizes cannot be copied exactly, since they depend on the settings of the TeX-document.
  • Due to a bug in TikZ-Feynman, the wiggles of photon lines cannot be changed.

Possible future improvements:

  • Remove the constraints of using TikZ-Feynman and use bare TikZ instead (possible as an optional feature). This enables the use of arcs in TikZ and custom photon lines.
  • Add support for shapes
  • Add support for custom arrow shapes and positions (requires overriding TikZ-Feyngame styles)

Merge request reports