I use JaxoDraw 2.1 to draw Feynman Diagrams as eps files for a document I am working on. In turn, JaxoDraw uses the axodraw4j package.
My problem is that when I include the eps figures in a document and compile through LaTeX+dvips+ps2pdf it works fine, but when I compile through PdfLaTeX the figure is out of place, with huge blank spaces and occupies a whole page.
Here is a MWE. The TeX code for the diagram generated by JaxoDraw is
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% LaTex file generated by JaxoDraw-2.1-0
%%% CreationDate: 6/2/2018
%%% Make sure you have the axodraw4j package installed in order to proceed!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage{axodraw4j}
\usepackage{pstricks}
\usepackage{color}
\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{0pt}
\setlength{\topmargin}{0pt}
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
\setlength{\topskip}{0pt}
\setlength{\footskip}{0pt}
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-2in}
\pagestyle{empty}
\begin{document}
%%JaxoComment:
%%JaxoScale{1.0}
\begin{center}
\fcolorbox{white}{white}{
\begin{picture}(116,150) (31,-27)
\SetWidth{1.0}
\SetColor{Black}
\Photon(96,102)(96,38){7.5}{3}
\Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](32,-26)(96,38)
\Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](96,38)(144,-26)
\Text(112,102)[lb]{\Large{\Black{$p_\mu$}}}
\end{picture}
}
\end{center}
\end{document}
I compile this file using LaTeX+dvips+ps2pdf and generate an eps file, say "simple_diagram.eps". Then I use GSview to convert to eps again in order to get the correct bounding box. When I look at the final eps, it seems to have the right bounding box indeed.
Then I try to include the eps figure in a document,
\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\begin{document}
Some text goes here, perhaps referring to a simple Feynman diagram, Fig.~\ref{simple_diagram}.
%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[ht]
\begin{center}
\includegraphics[scale=1]{./simple_diagram}
\caption{A simple Feynman diagram.}\label{simple_diagram}
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%
\end{document}
This compiles fine using LaTeX+dvips+ps2pdf, but if I want to use PdfLaTeX then hell breaks loose.
I tried the clip option of includegraphics, and many other things without success. I need a simple and portable solution, since the document I am working on has multiple authors.
I am sorry if the question is silly, I just do not understand much about how to use eps with pdflatex. Thanks in advance!
$p_\mu$
. But maybe I did not understand your suggestion right.