TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to compile a LaTeX template to a PDF, but it's not working. The template is available in this link (on the right side in Article Templates).

I'm using TeXnic Center. Can anyone please try to compile this and let me know if it's working.

share|improve this question

closed as too localized by Martin Schröder, Kurt, Werner, Stefan Kottwitz Dec 13 '12 at 23:38

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

What error are you getting, precisely? You can find the error in the file yourfilename.log. You should also try to reduce your problem to a minimal (non) working example (MWE), and then post it here as a code snippet, to make it easier for people to help you. – T. Verron Dec 2 '12 at 18:47
It compiles fine to PDF for me if I delete the DVI from the \documentclass line. – Uwe Ziegenhagen Dec 2 '12 at 19:21
It would be better if you could strip the file down to a MWE that doesn't compile for you. Directing users off the site to a zip file might not be well received by everyone :) – cmhughes Dec 2 '12 at 21:11
Which Output Profile did you use? – Speravir Dec 3 '12 at 1:18
up vote 6 down vote accepted

No answer for almost two weeks, so here my guess: You’ve chosen the wrong output profile for compiling.

The template file NanoMMTA_template.tex, available in the ZIP file to be found from your link, clearly states in the preamble:

%% put the discipline from the list below"
%% chemistry, biology, physics, mathematics, medicine
% if you use PostScript figures in your article
% use the graphics package for simple commands
% or use the graphicx package for more complicated commands
% or use the epsfig package if you prefer to use the old commands

Note the DVI as documentclass option. So you need an output profile in TeXnicCenter, what creates a DVI file in first step. Supposed you have the default profile configuration these are the following:

  • LaTeX ⇨ DVI
  • LaTeX ⇨ DVI ⇨ PDF
  • LaTeX ⇨ PS (what actually is LaTeX ⇨ DVI ⇨ PS)
  • LaTeX ⇨ PS ⇨ PDF (again: actually LaTeX ⇨ DVI ⇨ PS ⇨ PDF)

After choosing the graphics package (I would opt for graphicx) the compilation went fine here.

In fact the cause of the problem is the inclusion of an EPS file:

\includegraphics[width=12cm,height=6cm]{nano-mmta-fig.eps}% Here is how to import EPS art

This file type is not supported in pdftex mode (“LaTeX ⇨ PDF”), cf. Graphics file extensions and their order of inclusion when not specified.


Looking into the class file ejs_author.cls you can see, that beside the option DVI there is also a PDF one, and this is even the default option. Usually for on-the-fly conversion from EPs to a pdftex supported format the package and script epstopdf is recommended. In TeX Live this happens automatic while compilation, in MiKTeX you need to add \usepackage{epstopdf} after usepackage{graphicx}.

But in this case here the EPS file is a bit special (a bitmap file just embedded in a bounding box), and in the result the included image is defunct both in MiKTeX and TeX Live. In MiKTeX there is no cure in such a case (but use one of the DVI modes), in TeX Live I had success in using the Perl script epstopdf.pl with some Ghostscript options:

perl C:\texlive\texmf-dist\scripts\epstopdf\epstopdf.pl --gs --gscmd=C:\Programs\Ghostscript\bin\gswin32c.exe --outfile=e2p-nanofig.pdf nano-mmta-fig.eps

(Paths must be adjusted. Help with adding the option --help.)

I’ve got a warning ==> Warning: BoundingBox not found, what perhaps is the actual reason for all the mess, but the resulting PDF file shows the image, so I could use it replacing the original \includegraphics command:


The image is a bit cutted on the right and distorted. Only the distortion can be cured by setting a bounding box in \includegraphics:

\includegraphics[width=12cm,height=6cm,bb=20mm 10mm 218mm 165mm]{e2p-nanofig.pdf}
share|improve this answer

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