1

I'm working on a Debian-based OS, and I have the latest version of TeXlive installed:

alex@Sargon:~$ latex -v
pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2018)
kpathsea version 6.3.0
Copyright 2018 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.34; using libpng 1.6.34
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.00

I worked for some time so that the terminal got the LaTeX's commands from the 2018's folder. Now this is the $PATH variable that is loaded per default when I start the terminal:

alex@Sargon:~$ echo $PATH
/usr/local/texlive/2018/bin/x86_64-linux:/home/alex/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

If I export a document from the terminal, it works perfectly. It uses the latest version of all the packages of TeXLive.

alex@Sargon:~/MEGAsync/gnogna$ pdflatex gnogna.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./gnogna.tex
LaTeX2e <2018-04-01> patch level 5
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/bk10.clo))
(/usr/local/texlive/2018/texmf-dist/tex/generic/babel/babel.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/babel/switch.def)
(/usr/local/texlive/2018/texmf-dist/tex/generic/babel-italian/italian.ldf
(/usr/local/texlive/2018/texmf-dist/tex/generic/babel/babel.def
(/usr/local/texlive/2018/texmf-dist/tex/generic/babel/txtbabel.def))))
(/usr/local/texlive/2018/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/ulem/ulem.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/url/url.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/eurosym/eurosym.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/wrapfig/wrapfig.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/tocloft/tocloft.sty)
(./gnogna.aux)

[...]

Output written on gnogna.pdf (107 pages, 2501192 bytes).
Transcript written on gnogna.log.

If I export the same document from TeXStudio, though, the log shows some error related to some packages.

Package babel Error: Unknown option `italian'. Either you misspelled itd. \ProcessOptions*
Package babel Error: You haven't specified a language option. ...ry to proceed from here, type x to quit.}
File `eurosym.sty' not found. \usepackage

That happens because TeXstudio is curiously trying to use an old version of TeXlive, which got installed together with it. In fact, if I go on Help --> check LaTeX installation, the output is this:

which pdflatex: /usr/bin/pdflatex

PDFLATEX: pdflatex -version
pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian)
kpathsea version 6.2.2
Copyright 2016 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.28; using libpng 1.6.28
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.48.0

Environment variables:
DISPLAY=:0
DESKTOP_SESSION=/etc/alternatives/x-session-manager
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_AUTH_SOCK=/tmp/ssh-cNcLxJOj0sIm/agent.15897
HOME=/home/alex
XDG_SESSION_COOKIE=cafc501f3b2c4e64bbd5ed2d878ff3ef-1540731184.754442-1971382251
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
XDG_SEAT=seat0
USER=alex
LOGNAME=alex
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
PWD=/home/alex
INVOCATION_ID=68a91321ce974e7a844df05ad0754f2f
JOURNAL_STREAM=8:18516
XAUTHORITY=/home/alex/.Xauthority
XDG_SESSION_ID=8
LANG=it_IT.UTF-8
XDG_VTNR=7
PATH=/home/alex/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
SHELL=/bin/bash
QT_ACCESSIBILITY=1
SSH_AGENT_PID=15950
XDG_RUNTIME_DIR=/run/user/1000
SHLVL=0

TeXstudio:
Path        : /usr/bin/texstudio
Program call: texstudio
Setting file: /home/alex/.config/texstudio/texstudio.ini

Command configuration in TeXstudio:
    PdfLaTeX (pdflatex) (r): pdflatex -synctex=1 -interaction=nonstopmode %.tex
    Default Viewer (view): txs:///view-pdf
    Makeglossaries (makeglossaries): makeglossaries %
    Recompile Bibliography (recompile-bibliography): txs:///compile | txs:///bibliography | txs:///compile
    Ps2Pdf (ps2pdf): ps2pdf %.ps
    Latexmk (latexmk): latexmk -pdf -silent -synctex=1 %
    PDF Chain (pdf-chain): txs:///pdflatex | txs:///view-pdf
    PS Chain (ps-chain): txs:///latex | txs:///dvips | txs:///view-ps
    Build & View (quick): txs:///compile | txs:///view
    Metapost (metapost): mpost -interaction=nonstopmode ?me)
    Default Index Tool (index): txs:///makeindex
    Biber (biber): biber %
    Makeindex (makeindex): makeindex %.idx
    Asymptote PDF Chain (asy-pdf-chain): txs:///pdflatex | txs:///asy | txs:///pdflatex | txs:///view-pdf
    SVNADMIN (svnadmin): svnadmin 
    Ghostscript (gs): gs "?am.ps"
    PDF Viewer (view-pdf): txs:///view-pdf-internal --embedded
    DviPdf (dvipdf): dvipdf %.dvi
    PS Viewer (view-ps): xdg-open %.ps > /dev/null
    Default Compiler (compile) (r): txs:///pdflatex
    BibTeX 8-Bit (bibtex8): bibtex8 %.aux
    DVI->PS->PDF Chain (dvi-ps-pdf-chain): txs:///latex | txs:///dvips | txs:///ps2pdf | txs:///view-pdf
    Internal Precompile (internal-pre-compile): txs:///pre-compile | txs:///conditionally-recompile-bibliography
    LuaLaTeX (lualatex) (r): lualatex -synctex=1 -interaction=nonstopmode %.tex
    DVI Viewer (view-dvi): xdg-open %.dvi > /dev/null
    Asymptote DVI Chain (asy-dvi-chain): txs:///latex | txs:///asy | txs:///latex | txs:///view-dvi
    XeLaTeX (xelatex) (r): xelatex -synctex=1 -interaction=nonstopmode %.tex
    Asymptote (asy): asy ?m*.asy
    SVN (svn): svn 
    Default Glossary Tool (glossary): txs:///makeglossaries
    DviPs (dvips): dvips -o %.ps %.dvi
    DviPng (dvipng): dvipng -T tight -D 120 %.dvi
    BibTeX (bibtex): bibtex %.aux
    Texindy (texindy): texindy %.idx
    LaTeX (latex) (r): latex -src -interaction=nonstopmode %.tex
    External PDF Viewer (view-pdf-external): xdg-open %.pdf > /dev/null
    Default Bibliography Tool (bibliography): txs:///bibtex
    Precompile (pre-compile): 
    DVI Chain (dvi-chain): txs:///latex | txs:///view-dvi
    DVI->PDF Chain (dvi-pdf-chain): txs:///latex | txs:///dvipdf | txs:///view-pdf

Additional Search Paths:
    Command: 
    Log: 
    Pdf: 

The weirdest thing for me is that PATH=/home/alex/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games line. Of course it's different from what it should be: it's missing that /usr/local/texlive/2018/bin/x86_64-linux part which I believe that, if it had it, it would allow it to load the correct version of PdFLatex

If I go in the configurations, under "Compile" I can find "Configurations ($PATH)", and I tried to insert the correct path, /usr/local/texlive/2018/bin/x86_64-linux, in several ways, but nothing changed.

Do you have some clue about how should I proceed?

  • Let me guess, you set up the path change in bashrc and starts texstudio from a menu or by double clicking a file. Add the path change to .profile as well, then log out and in again. – daleif Oct 28 '18 at 13:58
  • I add that not to .bashrc but to the autostart of Openbox. Indeed by adding it to .profile it worked. Put it as answer and I'll indicate it as correct. – il mietitore Oct 28 '18 at 14:04
1

When manually adding stuff to the path, remember to also add the addition to .profile as well (remember to log out and in again). Generally, things you add to a shell, is never seen if you start a programme from a menu

|improve this answer|||||

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.