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!







  \begin{picture}(116,150) (31,-27)


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,




Some text goes here, perhaps referring to a simple Feynman diagram, Fig.~\ref{simple_diagram}.

    \caption{A simple Feynman diagram.}\label{simple_diagram}


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!

  • 1
    if you generate eps then you rely on pdflatex calling out to ghostview to generate pdf, you may as well generate pdf version of your image, or you could use the pstricks directly with pdflatex using the package that automates the calls to latex/dvips and ghostscript Commented Feb 6, 2018 at 11:14
  • Thank you for your attention. I tried to include the pdf version of the figure which is generated from the above code compiled with LaTeX+dvips+ps2pdf. But this did not solve the problem. I also tried to compile the figure using pdflatex right away, but then the diagram does not show in the corresponding pdf, only the text $p_\mu$. But maybe I did not understand your suggestion right.
    – maunarciso
    Commented Feb 6, 2018 at 11:27
  • to use pstricks with pdflatex (there are some restrictions) you can use the auto-pst-pdf packagem several examples on this site tex.stackexchange.com/search?q=auto-pst-pdf Commented Feb 6, 2018 at 12:09

1 Answer 1


You code seems to work correctly neither with xelatex nor with auto-psttdf + pdflatex.

I managed to obtain a .pdf file with a correct bounding box in this way:

  • Compile via latex+dvips
  • Convert the resulting .ps file to .pdf with Siep Kroonenberg epspdftk excellent tool, asking for computing a tight bounding box, like this:

enter image description here

  • You're welcom. Always glad to hep!
    – Bernard
    Commented Feb 6, 2018 at 13:32

You must log in to answer this question.

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