Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using TeXMaker 3.5 (same problems in TeXMaker 3.4.1) and MikTeX 2.9. My source is:

\documentclass[10pt,a4paper]{article} 
\usepackage[utf8]{inputenc} 
\usepackage{graphicx} 
\usepackage{epstopdf} 
\begin{document} 
\begin{figure} 
\includegraphics[scale=1]{test.eps} 
\end{figure} 
\end{document} 

But I always get:

Package pdftex.def Error: File `test-eps-converted-to.pdf' not found.

MikTeX is working! The picture also exists and using the command prompt:

G:\LaTeX\sandbox>G:/miktex/miktex/bin/epstopdf --outfile=G:\LaTeX\sandbox\test-eps-converted-to.pdf G:\LaTeX\sandbox\test.eps

produce the pdf from the eps-file. This is my configuration:

 Tools\Latex="\"../miktex/miktex/bin/latex.exe\" -enable-write18 
 -interaction=nonstopmode %.tex"  Tools\Dvi=../miktex/miktex/bin/yap.exe -1 -s @.tex %.dvi 
 Tools\Dvips=\"../miktex/miktex/bin/dvips.exe\" -o %.ps %.dvi 
 Tools\Ps=../gsview/GSviewPortable.exe %.ps 
 Tools\Ps2pdf=\"../miktex/miktex/bin/ps2pdf.exe\" %.ps 
 Tools\Makeindex=\"../miktex/miktex/bin/makeindex.exe\" %.idx 
 Tools\Bibtex=\"../miktex/miktex/bin/bibtex.exe\" %.aux 
 Tools\Pdflatex="\"../miktex/miktex/bin/pdflatex.exe\" -enable-write18
 -interaction=nonstopmode %.tex"  Tools\Pdf=../SumatraPDF/SumatraPDF.exe %.pdf -reuse-instance
 -forward-search %.tex @  Tools\Dvipdf=\"../miktex/miktex/bin/dvipdfm.exe\" %.dvi 
 Tools\Metapost="\"../miktex/miktex/bin/mpost.exe\" --interaction
 nonstopmode " 
 Tools\Ghostscript=\"../miktex/ghostscriptx/bin/gswin64c.exe\" 
 Tools\Asymptote=../Asymptote/asy.exe %.asy 
 Tools\Latexmk="\"G:/miktex/miktex/bin/latexmk.exe\" -e
 \"$pdflatex=q/pdflatex -interaction=nonstopmode/\" -pdf %.tex" 
 Tools\Sweave=../R/bin/R.exe CMD Sweave %.Rnw

Does anyone has an idea how to solve this problem? I have created my portable version here.

Thanks in advance. I tried all possible permutations of --enable-write18, --shell-escape, -enable-write18,....

share|improve this question
    
I suppose, it’s a question of the search path. What does the log file say? Cf. also my answer to “Using MikTex Portable, TexMaker, and Asymptote from a USB drive” tex.stackexchange.com/a/51110/9237. –  Speravir Aug 25 '12 at 20:46
    
Here is the logfile: pastebin.de/29075 –  wieschoo Aug 25 '12 at 21:05
    
Edit your question and paste in the lines from “(epstopdf) Output file: <test-eps-converted-to.pdf>” until “runsystem(epstopdf --outfile=test-eps-converted-to.pdf test.eps)...executed.” Compare the log file, that you created with the command line execution. I’m even more convinced right now, that the search path is the problem. Try out the last part of my above linked answer, replace “ASYPATH” with “SANDBOX” or “LOCALTEX” or whatever you want, and “<path-to-asymptote-executables>” with “LaTeX\sandbox”. –  Speravir Aug 25 '12 at 21:27
1  
Run on the command line (in a folder which contains only the test document and the eps-graphic) pdflatex --shell-escape test and show the log-file. In case that pdflatex is not found change in the command line at first the PATH variable: set PATH= path\to\miktex\bin;%PATH%. –  Ulrike Fischer Aug 26 '12 at 10:08
    
Wieschoo: In my humble opinion you should have it mentioned here on TeX.SE, that you asked the same on another place: golatex.de/texmaker-3-5-epstopdf-t9439.html (I’m not a regular reader of Golatex.de, but found it by accident). –  Speravir Aug 26 '12 at 17:22
show 1 more comment

2 Answers

up vote 1 down vote accepted

After (re-)installation of MiKTeX portable and some try&error I found out, that the real answer is … RTFM:

Excerpt from the epstopdf manual:

Note: Usually the conversion program needs the exact location of the image file. Usually the current directory works. Also if the image file is found using \graphicspath, the location is known. However, if the image is somewhere in a directory of environment variable TEXINPUTS, then the package does not know the exact location and the conversion program will not find the image file unless it implements a search using TEXINPUTS (program kpsewhich may be of help in this task).

So, you have the choice between following 3 possibilities:

  1. To the call of pdflatex add the commandline switch --include-directory="G:\LaTeX\sandbox" (Attention! No closing backslash here, or, if the path is without white space, leave out the double quote marks), but included inside of TeXMaker it’s not portable.

  2. Add the command \graphicspath to your TeX file. In a test I had to use slashes instead of the usually in Windows used backslashes. That’s also not portable, but you can easily change it, before you do a new compiling.

    \documentclass[10pt,a4paper]{article} 
    \usepackage[utf8]{inputenc} 
    \usepackage{graphicx} 
    \graphicspath={{G:/LaTeX/sandbox/}}
    \usepackage{epstopdf} 
    \begin{document} 
    \includegraphics[scale=1]{test.eps} 
    \end{document}
    
  3. What I would favour:
    Similar as I already pointed out in Using MikTex Portable, TexMaker, and Asymptote from a USB drive – edit the start file miktex-portable.cmd (make a safety copy first) and add the system variable TEXINPUTS. Note: The way it’s shown here, it works only, if the TEXINPUTS directory is on the same drive as the portable MiKTeX installation, and as far as I see, it’s the only portable way.

    @echo off
    
    set MOBIDRIVE=%~d0
    set TEXINPUTS=%MOBIDRIVE%\LaTeX\sandbox\
    
    set PATH=%TEXINPUTS%;%PATH%
    
    miktex\bin\miktex-taskbar-icon.exe
    

    Then you can (and should!) use the command line prompt, that you get with right click on the traybar icon. The command line compilation worked fine here in a test. Start TeXMaker from this command prompt or add a line

    start /i /d%MOBIDRIVE%\<path-to-texmaker> texmaker.exe
    

    before the above miktex\bin\miktex-taskbar-icon.exe or create an own startbatch file with the variable TEXINPUTS.

Remark: After I’ve done a test with TeXMaker portable (BTW: that’s actually not fully true!), that I had to download first, I must say, that obviously with TeXMaker this approach of point 3 didn’t work! Only with the \graphicspath version or, if the EPS file was in the same directory like the TEX file, I’ve got a result. (Remark 2: I used some example files of Ghostscript and the example folder as graphics path, everything was on the same drive.)

I leave the not functioning point here, because wieschoo’s answer refers to it.

share|improve this answer
    
surrender Hi, first of all thank you. I tried all your suggestions. But they don't work at my computer. After reinstalling I have the following folder structure: G - latex (for documents) - texsuite - miktex (portable 2.9) - texmakerwin32usb (texmaker) - gnuplot I found out that the command pdflatex -output-directory=G:\latex\ -undump=pdflatex G:\latex\works.tex works well using the prompt and produce the pdf. This command doesn't work in TexMaker. I give up. I can't understand why there isn't a portable package that contains some applications and miktex itself. Thanks anyway! –  wieschoo Aug 27 '12 at 17:06
add comment

I found usbtex from http://www.exomatik.net/U-Latex/USBTeXEnglish and use their idea and your (Speravir, thank you) suggestion.

First: Install miktex portable as usual.

Second: create folderstructur of the usb like
- documents
- texsuite
- - MiKTeX_2.9 (miktex 2.9)
- - gs9.02 (ghostscript)
- - texmakerwin32usb (texmaker 3.5)
- - tikzedt (tikzedt 0.2)
- - gnuplot (gnuplot)
- - texmaker.bat
- - tikzedt.bat

texmaker.bat

set path=%~dp0MiKTeX_2.9\miktex\bin;%~dp0gs9.02\lib;%~dp0gs9.02\bin;%~dp0gnuplot\bin;%PATH%
cd %~dp0texmakerwin32usb\
start texmaker

tikzedt.bat (for Tikzedt)

set path=%~dp0MiKTeX_2.9\miktex\bin;%~dp0gs9.02\lib;%~dp0gs9.02\bin;%PATH%
cd %~dp0tikzedt\
start tikzedt.exe -p
share|improve this answer
    
Sorry for late comment: If both texmaker.bat and tikzedt.bat are inside of texsuite, as you show in the folder structure, then your settings were wrong. I’ve changed it now. –  Speravir Oct 7 '12 at 18:25
1  
Unfortunately USBTeX is no longer maintained. I created a portable bundle of basic components (MiKTeX, Texmaker and SumatraPDF) for compiling LaTeX documents (in Windows): TexPortable. It's already configured and ready to work with. Here you'll find more information about the setup. –  symera Feb 4 at 2:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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