0

I've installed texlive and add its /bin folder to the PATH from .bashrc file. Both pdflatex and xelatex commands work well within the terminal; pdflatex works from TeXstudio too, but xelatex doesn't work from TeXstudio and gives this error:

Error: Could not start the command: xelatex -synctex=1 -interaction=nonstopmode "template_Article".tex

I changed the build command to use the absolute path to xelatex and it worked fine:

"/usr/local/texlive/2019/bin/x86_64-linux/xelatex" -synctex=1 -interaction=nonstopmode %.tex

As opposed to pdflatex which is invoked by just calling:

pdflatex -synctex=1 -interaction=nonstopmode %.tex

What is the problem in your opinion? TeXstudio version is 2.12.18 and I'm running on TeXLive 2019.

MHTB
  • 11
  • I'm not using TeXstudio or xelatex, but he part "template_Article".tex of the error message is a bit strange to me, I would not expect the " at the places they are. I would expect no " at all or otherwise "template_Article.tex". This is all a bit of a, wild, guess. – albert Jan 01 '20 at 14:52
  • @albert I copied that to the terminal and it worked just fine; even with the strange place " are. – MHTB Jan 01 '20 at 14:57
  • 1
    Maybe related? https://tex.stackexchange.com/questions/212225/texstudio-sees-the-wrong-version-of-texlive – Marijn Jan 01 '20 at 17:27
  • @Marijn Yes, It worked! I removed PATH modification from .bashrc, added it to .profile instead, and did a restart finally. – MHTB Jan 01 '20 at 17:40
  • Good that it worked, i'll vote to close as a duplicate. I suspect, although I'm not sure, that pdflatex was already present on your system from a previous installation while xelatex was not, which makes the questions actually duplicate. Maybe this is not true, in that case it would be better to close as 'solved in comments' - but anyway the question can be closed I think. – Marijn Jan 01 '20 at 17:57
  • @Marijn No, That's not the case; using which shows that both pdflatex and xelatex are placed in the same directory, which is the one I installed this fresh installation of texlive in it. – MHTB Jan 03 '20 at 18:17
  • @MH.TavakoliBina, ok, but which which? If the problem is that the terminal loads different paths than TeXstudio, then which pdflatex in the terminal does not tell you much about the executable that TeXstudio uses. Maybe whereis pdflatex in the terminal will show more information. – Marijn Jan 03 '20 at 20:56
  • @Marijn You are right. Using whereis pdflatex gives an additional directory compared to whereis xelatex, which is /usr/bin/pdflatex. Seems like Ubuntu 18.04 has a pre-installed pdflatex binary in there. – MHTB Jan 04 '20 at 09:41

0 Answers0