[Tex/LaTex] Relative paths with TeXstudio under Windows (portable installation)


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.

Best Answer

I tried to use the same combination of Texlive (2014) and Texstudio on a flahs drive and ran into the same issues. Providing the direct path worked fine but would probably not on another computer. Using relative links didn't work. At some point I ommited the dots in the beginning of the link (i.e. "/texlive/bin/win32/pdflatex.exe" -synctex=1 -interaction=nonstopmode %.tex) and it worked fine. I even did not use the root directory. Set the folders before in the links and everything should be fine as well.