JP-Ellis / tikz-feynman

Feynman Diagrams with TikZ
http://www.jpellis.me/projects/tikz-feynman
Other
148 stars 20 forks source link

Example does not compile out of the box #1

Closed natfarleydev closed 9 years ago

natfarleydev commented 9 years ago

On cloning, compiling with lualatex -shell-escape tikz-feynman.tex fails as it cannot create the folder pgf-img. Creating the folder fixes the problem, although it would be nice if this was done automatically (or at least documented in the README).

JP-Ellis commented 9 years ago

I didn't think people would be actually trying to compile the documentation itself, but I will make sure to fix that in the next version. The package itself, tikz-feynman.sty, doesn't rely on the externalization at all.

If you are curious, the externalization calls is a way to avoid re-creating the pictures every time. This can save a considerable amount of time on very large documents and I make use of some basic Linux programs and bash syntax so that it works nicely with Latexmk. If you comment out lines 61 to 67 it should work fine.

natfarleydev commented 9 years ago

The compilation still fails if you take out lines 61-67 unless you use -interaction=batchmode. But I think this is a problem with Tikz (so perhaps documentation/creating a Makefile is the most appropriate fix). This is a general problem when using the tikz-feynman.sty file.

In summary lualatex -interaction=batchmode -shell-escape tikz-feynman.tex works :).

JP-Ellis commented 9 years ago

That's interesting; I just tried compiling the documentation with lines 61-67 commented out and it compiles fine without -interaction=batchmode.

The interaction mode actually doesn't change whether it successfully compiles or not, it just changes whether lualatex asks you what to do at each error it encounters. With batchmode, it is essentially telling lualatex to compile as much as it possibly can and skip over all errors.

Did you make sure to apply the patch to TikZ? If you have done that, can you post the log file somewhere so I can have a look?

natfarleydev commented 9 years ago

My mistake, I assumed the patch had been applied in the sty file! I'll have to apply the patch myself.