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.

  • 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? Jun 26, 2013 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: Jun 26, 2013 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!
    – jkf
    Jul 1, 2013 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, 2013 at 13:03

3 Answers 3


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.

  • 1
    This is a rather a comment than an answer
    – user31729
    Oct 5, 2014 at 8:13
  • 1
    That's true, but as an unregistred user as I was yesterday I couldn't comment. And still I cannot.
    – TVL
    Oct 6, 2014 at 17:26

My Solution

Hi TeX users,

I have found a solution or at least a work around that works with texstudio 2.9.4. I do not know, whether this works in earlier Versions, too.

My portalbe Directory






How to

  1. Set the commands as the following:

    "texlive/bin/win32/pdflatex.exe" -src -interaction=nonstopmode %.tex
  2. In top ribbon choose "Options", "Configure TeXstudio" and "Build"

  3. At the bottom of this window you will find the line "Commands ($PATH)"

  4. Add your root Directory, i.e. "LaTeXportalbe" as the following:


I hope this will spare you guys some time to post solutions for other problems that have not occured to me yet.


Alternatively you just need to add this relative key


For instance:

enter image description here

texlive folder is inside the texstudio folder:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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