2
\documentclass[letterpaper,aps,floatfix,twocolumn]{revtex4}
%\documentclass{article}
%
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{alltt}
\usepackage{setspace}
\usepackage[english]{babel}
\usepackage{euscript}
\usepackage{tikz}
\usepackage{yfonts}
\usepackage{tikz-feynman}
\usepackage[utf8]{inputenc}
\usepackage{feynmf}
\usepackage{natbib}
\usepackage{theoremref}
\usepackage{amsthm}


\begin{document}

\feynmandiagram [horizontal= a to be] 
{ i1 -- [scalar] a[dot] -- [scalar] i2, 
a -- [photon, half left] b, 
b --[photon, half left] a, 
f1 -- [scalar] b -- [scalar] f2, };

\end{document}

I tried the above code under TikZ.

However, the diagram I get looks like the rightmost diagram.....enter image description here

I cannot understand why the diagram looks so weird.....Maybe because I am writing on the paper on two columns....

I tried everything but the diagram wouldn't change and it is extremely frustrating...

Could anyone please help me?

4
  • 1
    Could you add a minimal compilable code which gives the distorted diagram?
    – Tanvir
    Oct 11, 2020 at 6:32
  • Yes I edited the question. Could you please help me?
    – Keith
    Oct 11, 2020 at 19:25
  • Why do you say the diagram is weird? What should be the correct figure?
    – Tanvir
    Oct 11, 2020 at 20:15
  • 4
    Are you using pdflatex or lualatex? Unless you're using lualatex, the advanced positioning algorithms are not used. Oct 11, 2020 at 20:19

2 Answers 2

0

What @Torbjorn said.

Are you using pdflatex or lualatex? Unless you're using lualatex, the advanced positioning algorithms are not used

I.e., you need to use lualatex.

0

Run it with lualatex and not. pdflatex:

\documentclass[letterpaper,aps,floatfix,twocolumn]{revtex4}
%\documentclass{article}
%
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{alltt}
\usepackage{setspace}
\usepackage[english]{babel}
\usepackage{euscript}
\usepackage{tikz}
\usepackage{yfonts}
\usepackage{tikz-feynman}
\usepackage{feynmf}
\usepackage{natbib}
\usepackage{theoremref}
\usepackage{amsthm}
\usepackage{hyperref}


\begin{document}
    
    \feynmandiagram [horizontal= a to be] 
    { i1 -- [scalar] a[dot] -- [scalar] i2, 
        a -- [photon, half left] b, 
        b --[photon, half left] a, 
        f1 -- [scalar] b -- [scalar] f2, };
    
\end{document}

Then you'll get:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .