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 have just installed TeXLive 2013 Portable (Windows, full install) on my USB stick, and have also extracted the TeXstudio USB zip into the root of my USB. The folder hierarchy is as follows:

USB Root
|------ texlive
|------ TeXStudio

When I ran TexStudio from the USB I initially set up direct paths to the TeXlive directory (USB stick is drive D):

PDFLaTeX: "D:/texlive/bin/win32/pdflatex" -synctex=1 -interaction=nonstopmode %.tex

etc. It compiled a basic Hello World file fine (PDFLaTeX).

To make my installation portable, I changed the paths to relative ones so I could use the USB stick on other PCs.

PDFLaTeX: "../texlive/bin/win32/pdflatex" -synctex=1 -interaction=nonstopmode %.tex

Now when I try to compile the same file I get the following error:

Process started: "../texlive/bin/win32/pdflatex" -synctex=1 -interaction=nonstopmode "texstudio_pG4740".tex
(null): fatal: Can't determine where the executable ..\texlive\bin\win32\pdflatex is. .
Process exited with error(s)

Obviously it can't find the executables anymore. Am I using the correct syntax for relative paths? This is a Windows machine by the way.

share|improve this question
3  
Hmm, I think the path is relative to where the tex file is not where TeXstudio is. TeXstudio runs this in the folder of the tex file ... or does it work if you save the file properly? –  Qrrbrbirlbel Jun 26 '13 at 5:59
    
Your solution will work only if you put the file you want to compile in a directory "parallel" to texlive. E.g. in the directory D:\MyTeXFiles supposing that your USB root is seen as D: –  karlkoeller Jun 26 '13 at 9:46
    
Yes, it seems it is relative to the .tex file rather than the TeXstudio installation. This seems bizarre - but thanks for the help! –  jackf Jul 1 '13 at 4:56
    
@Qrrbrbirlbel That looks like the core of an answer: do you want to make it one? Perhaps start with the fact that 'behind the scenes' most editors effectively open a command prompt in the working directory and do the equivalent of pdflatex <filename>. –  Joseph Wright Aug 20 '13 at 13:03
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.