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

1 Answer 1

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.

share|improve this answer
    
This is a rather a comment than an answer –  Christian Hupfer Oct 5 at 8:13
    
That's true, but as an unregistred user as I was yesterday I couldn't comment. And still I cannot. –  MoooT Oct 6 at 17:26

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.