2

I know about a lot of solutions how to draw Feynman diagrams in LaTeX. Unfortunately, none of them is perfect. I know about TikZ-Feynman and it is the best variant (may be) but I do not understand how to work with LuaLatex using cyrillic and latin at the same document. Moreover, as I understand, some of math and fonts packages do not work in LuaLatex.

So, my questions:

  1. Are there any simple & good packages for diagrams which use pdflatex?
  2. Can anyone please give reference to source with TikZ-Feynman & LuaLatex where I can find all the information about math & fonts in LuaLatex?

If it is the duplicate question, sorry.

Sebastiano
  • 54,118

1 Answers1

0

There are two possible ways to work with Tikz-Feynman in pdf-latex:

  1. The simplest way is to use standalone,
    \documentclass{standalone}
    \usepackage{tikz}
    \usetikzlibrary{calc,decorations.markings,decorations.pathmorphing}
    \usetikzlibrary{shapes,arrows,positioning,automata,backgrounds,calc,er,patterns}
    \usepackage[compat=1.1.0]{tikz-feynman}

and then just use produced pdf as picture

  1. The second way for me is unconvenient and unstable (I use Overleaf), it uses externalization (can be found in manual),
    \usepackage{tikz}
    \usetikzlibrary{external}             
    \immediate\write18{mkdir -p pgf-img}
    \tikzexternalize[                    
      prefix=pgf-img/,                    
      system call={                       
        lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname="\image" "\texsource"
      },
    ]

I noticed that it does not work sometimes (especially when your file contains large number of diagrams).

Sebastiano
  • 54,118