JP-Ellis / tikz-feynman

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

small, large doesn't work with pdflatex #35

Open TorbjornT opened 7 years ago

TorbjornT commented 7 years ago

E.g. \feynmandiagram [large] { .. } doesn't work when compiling with pdflatex/xelatex.

I don't know if this is a bug at all, as the Lua algorithms for node placement obviously isn't used when not compiling with lualatex, but thought I'd report it anyway. I just skimmed the manual, but it isn't immediately obvious that the size changing keys shouldn't work with pdflatex.

Reference: http://tex.stackexchange.com/questions/337404/too-small-feynman-diagram-with-tikz-feynman-and-size-command-doesnt-work

JP-Ellis commented 7 years ago

The large and small keys should have an effect no matter what the compiler is. These keys changes the default separation between nodes but they do not rescale the overall picture. As a result, if you are manually specifying locations of vertices then large and small won't have much of an effect. Similarly, if you are using left=2cm of 〈vertex〉, the distance specification will override the default.

Without providing the actual diagram that is causing the issue, I can't really test much more than this.

TorbjornT commented 7 years ago

Oops, sorry for the lack of example. I just tested with an example from the manual (e.g. the one where you're describing small, medium, large). But you don't need a large example, try for example

\documentclass[a4paper]{article}
\usepackage{tikz-feynman}
\begin{document}
\feynmandiagram [small] {
a -- [fermion] b
};
\feynmandiagram [large] {
a -- [fermion] b
};
\end{document}

With pdflatex the only difference is that the line is thicker with large, but with lualatex the line is longer as well (and oriented differently, but that is just the placement algorithm).

A couple of screenshots of the output, first with lualatex, second with pdflatex.

screenshot_20161104_090625 screenshot_20161104_090637

JP-Ellis commented 7 years ago

I saw the post on the TeX StackExchange, but I thought you were the original person asking the question.

Anyway, that's weird then that pdfLaTeX results in different behaviour, it shouldn't be doing that since the change in defaults should apply to all algorithms, even the most basic one. I'll have a look at what might be the issue tomorrow.