I was told to make a document with a given template. That uses a class called jps-cp. Using this class I am unable to insert any figures. When article class is used I can insert figures using \includegraphics. Can anybody tell what could be the problem?





To explain the matter-antimatter asymmetry observed in the universe, must be satisfied \cite{c1}.

\caption{You can embed figures }

In summary, the  first study of baryon number violation is done.

  • Welcome to TeX.SX! As jps-cp is not a standard class you could add a link to it, if possible. Also add the error message. Maybe jps-cp does not load something that is loaded by article or there is some conflict?
    – dexteritas
    Nov 19 '19 at 17:30
  • The template can be found from here journals.jps.jp/page/jpscp/authors. I am using TexMaker in Ubuntu. There is no error message, it's compiling successfully. Also, the caption is coming but no plots. Figure fromat I have tried in eps, png also pdf. One can debug with any figure.
    – Debashis
    Nov 19 '19 at 17:47
  • Also another thing, figures are insertable with the same template by TeXshop in MacOS.
    – Debashis
    Nov 19 '19 at 17:56

It has to do with the implicit workflow.

The jps-cp class, in contravention to the suggested best practice listed in the documentation for the graphicx package, hard codes a driver. You find in it


which specifies using the dvipdfmx driver. Which means that if you compile your document, which uses the jps-cp class, using pdflatex, you will not see the included image. But if you compile it using the two-step process

latex file.tex 
dvipdfmx  file.dvi

the image will now appear. I bet if you look under the "working" installation of TeXShop you will find that it does the two step process, while TeXMaker just calls pdflatex.

  • Thank You so much! It works.
    – Debashis
    Nov 20 '19 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.