1

I have just installed TeXnicCenter on my new computer and I am trying to use LaTex => ps => pdf profile as I was using this with my old computer. I checked all profile settings from output profile and they match settings of my old computer. However for some reason, the .pdf file is not being created. The only files created are .aux, .bbl, Performance monitor file, .dvi, Text, and .dwg TrueView PostScript support file.

Can someone help me with this please?

Mensch
  • 65,388
natt010
  • 11
  • You might have a look at this for the correct compilation sequence. From what you say it seems the step between dvi and ps is missing/broken. If all you want is a pdf output and you have no other reasons to go via dvi, consider pdflatex as a single step, rather than the long sequence you're using. – greyshade Aug 13 '14 at 10:42
  • thanks for your reply. i have figures in .eps format. can i use pdflatex in this case? – natt010 Aug 13 '14 at 10:49
  • yes. see here and here. – greyshade Aug 13 '14 at 10:55
  • thanks, i did as suggested but instead of the figures i am getting an empty box with the link to my .eps file. in fact i've got some errors while compiling – natt010 Aug 13 '14 at 11:33
  • i think the problem is with the write18 or shell escape. i don't know how to enable these can you advise please? – natt010 Aug 13 '14 at 11:34
  • shell escape is easily activated by adding -shell-escape when invoking pdflatex. i.e. in TeXnicCenter where the commands for the compilation options are defined in the settings, add -shell-escape before the filename – greyshade Aug 13 '14 at 11:37
  • sorry but i'm not an expert with latex. so in teXnicCenter i go to build-output profiles right? and then where shall i add the -shell-escape? – natt010 Aug 13 '14 at 11:46
  • within those settings, what's the setting for pdflatex - I don't have TeXnicCenter here atm. – greyshade Aug 13 '14 at 11:54
  • LaTeX setting: command line arguments to pass to compiler: -interaction=nonstopmode "%pm". are you referring to this setting? Or the settings in Viewer option? – natt010 Aug 13 '14 at 12:04
  • yes, replace that with -interaction=nonstopmode -shell-escape "%pm". – greyshade Aug 13 '14 at 12:27
  • ok the shell escape error is no longer popping up but i am still getting errors and the pictures are not being shown. the first error displayed is "package pdftex.def Error: File 'Paper3_V18-pics.pdf' not found". My .pdf filename should be 'Paper3_V18'. I do not know to what filename 'Paper3_V18-pics.pdf' is latex referring to though. – natt010 Aug 13 '14 at 12:35
  • can you look in your source folders if any .pdf files for the images have been created? or, can you search the log for any mentions of (epstopdf). oh, and you did add \usepackage{epstopdf} to the preamble as suggested in the links in my second comment? – greyshade Aug 13 '14 at 12:40
  • no .pdf files for the images have been created. i looked into .log file and i found this warning : "could not create Paper3_V18-pics.pdf". auxiliary files not deleted. there is also this warning "package epstopdf Warning: Drivers other than 'pdftex.def' are not supported". yes i did use \usepackage{epstopdf} in the preambple as suggested. – natt010 Aug 13 '14 at 13:13

1 Answers1

1

To solve this problem you have to do several things.

First prepare your code to be compilable:

\documentclass{article}
\usepackage[%
% pdftex % be carefull!!: with this option: 2 errors, without: 0 errors
]{graphicx} % for \includegraphics
\usepackage{epstopdf} % to change .eps to .pdf
\epstopdfsetup{update} % conversion only if no .pdf file already created

\begin{document}
Now you should see the picture in pdf:

\includegraphics[width={\textwidth}]{example-image-a.eps}
\end{document}

In line 5 of the mwe I added \usepackage{epstopdf} to prepare the possibility to change .eps images to .pdf images. Line 6 starts epstopdf only, if the changed "epstopdf" file does not exist. (Please see documentation with texdoc epstopdf). Because you gave no MWE I can only guess what you are doing, here just a remark. In the epstopdf documentation is showed to call package graphicx with option pdftex. That causes in 2 errors. Without the option the code compiles with only one warning, but wanted document!

Second you have to prepare TeXnicCenter to be able to do what you want. Prepare a new output profile, for example LaTeXshellescape=>PS=>PDF.

Copy the original LaTeX=>PS=>PDF to the new profile, and do the following changes:

  1. Add -shell-escape in arguments for the compiler (see red marking):

Configuration (La)TeX

Please see, that I changed "%bm" to "%tm" (see red markings).

  1. Open register Nachbearbeitung (sorry, do not know the english name, it is the third one, see image) and check if you see:

Configuration Nachbearbeitung

With theese changes you will get the following compiled result without errors:

Result of MWE

Alternative method with dvipdfmx

You can also use an alternative method with dvipdfmx (see Project KTug.org or CTAN:dvipdfmx). But then you use the way from .dvi to .pdf!

MiKTeX is not able to run several script, because Windows has no installed perl or ... interpreter. But you can use the program dvipdfmx.exe (see windows directory C:\Program Files\MiKTeX 2.9\miktex\bin\x64) to get the same result. Use dvipdfmx --help to see all possible options. I need none of them for the example here.

With the following MWE (please see that epstopdf is missing)

\documentclass{article}
\usepackage{graphicx} % for \includegraphics


\begin{document}
Now you should see the picture in pdf:

\includegraphics[width={\textwidth}]{example-image-a.eps}
\end{document}

and the following configuration (profile LaTeXdvipdfmx) for TeXnicCenter you get the wanted result.

Copy LaTeX=>DVI=>PDF to LaTeXdvipdfmx, do not add -shell-escape, change %bm to %tm (see red markings).

dvtpdfmx configuration 1

Now click on Nachbearbeitung and change there dvipdfm to dvipdfmx to call program dvipdfmx.exe.

enter image description here

Click ok and compile the mwe. The result is the same I showed above ...

Mensch
  • 65,388