# How to compile a document that both uses jaxodraw feynman diagrams and png images

I initially had a problem getting feynman diagrams, which were produced using jaxodraw, to show properly (due to using psTricks). I've solved that problem using the suggestion in the answer to question: Feynman Diagrams with jaxodraw-2.1-0

That is, I compiled my document using latex->dvips->ps2pdf, and that solved my problem. Unfortunately when I try to include a png image in my document, I am unable to get the image to show. I get the error "cannot determine size of graphic". As a workaround, I followed the answer in question:Cannot determine size of graphic

Thus, I've included the bmpsize package and [dvipdfmx] option for the graphicx package. When I now compile using latex->dvips->ps2pd the figure shows the caption, but not the actual image. When I use pdfLatex build, the image shows up correctly, but the Feynman diagrams do not.

What type of build, or possible other solution is there, so that I can get jaxodraw feynman diagrams to show up properly, as well as png images?

This is the command I'm using for my figure.

\begin{figure}[h]
\centering
\includegraphics[width=\textwidth,natwidth=610,natheight=642]{SomePng.png}
\caption{Hellow World}
\label{fig:TotalCS}
\end{figure}

• run your document with xelatex – user2478 Jun 21 '18 at 15:13
• Thanks for your response, Herbert. That did not work. I guess I'm just stuck converting many png files to eps. – Saleh Hamdan Jun 22 '18 at 7:06
• Would anyone recommend an image file converter that is trustworthy? I heard about Imagick and maybe Ghostscript. Suggestions? – Saleh Hamdan Jun 22 '18 at 7:12