[Tex/LaTex] How to tell Texmaker where to look for packages

pathstexlivetexmaker

I recently installed texlive from the internet (using tar found here).
When the installation finished, I added the following lines to /etc/bash.bashrc:

PATH=/usr/local/texlive/2013/bin/i386-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2013/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2013/texmf-dist/doc/info:$INFOPATH; export INFOPATH

The same three lines I added to ~/.profile and to ~/.bashrc

Also I added this line to the manpath file (/etc/manpath.config):

MANPATH_MAP /usr/local/texlive/2013/bin/i386-linux  /usr/local/texlive/2013/texmf-dist/doc/man

I'm not really sure what it means to add those lines to those files, but it doesn't seem to change anything if I leave them there or if I cut them off.

Now, when I try to compile something on Texmaker, I get an error:

! LaTeX Error: File `package_name.sty' not found.

That comes from the file

/usr/share/texlive/texmf-dist/tex/latex/package_name/package_name.sty

So as I can see, Texmaker is looking for the packages on the path:

/usr/share/texlive/texmf-dist/tex/latex  

but all the packages installed by texlive are on the path:

/usr/local/texlive/2013/texmf-dist/tex/latex

The first path, I think, came up when I installed (from Software Manager) the packages texlive-latex-base and texlive-latex-extra.
Now that I have the actual texlive, I removed those packages and manually remove the directories they created (So now /usr/share/texlive/texmf-dist/tex/latex doesn't even exist!)

I tried removing and reinstalling Texmaker (after I deleted the previous directory), and same thing with TexLive (I installed TexLive first and then Texmaker), but nothing changed.

Now, all I need to do is tell Texmaker where all the packages are, but I guess that's what adding those lines to the mentioned files is all about.

So, I don't know. Did I do something wrong? Is there any other way to manually tell Texmaker where to find the packages?

Thank you for reading this, I appreciate your time.

I use Linux Mint 15 Olivia.

Best Answer

I was having the same problem: I could compile from the terminal but not from Texmaker. Turns out the solution is fairly simple.

Open up a terminal and run

which pdflatex

On my machine I get the output as

/usr/local/texlive/2017/bin/x86_64-linux/

Then, open the Texmaker configuration Window from the Options menu. In the Commands tab replace whatever is in quotes in the PdfLaTeX textbox with the above path. You should be good to go from here.