[Tex/LaTex] LaTeX not finding .sty files

installingpathstexlive

I know a similar question has been asked many times, but I cannot seem to port those answers to my situation.

I have recently installed TeXLive on my Ubuntu 14.04 system. I did this using the install-tl.zip file from texlive.org.

When I try to compile just the basic TeXLive default article, it crashes on every package, giving me (just to pick the first one):

! LaTeX Error: File 'booktabs.sty' not found.

But I know booktabs.sty is on my system:

/usr/local/texlive/2016/texmf-dist/tex/latex/booktabs/booktabs.sty

I have the following lines at the end of my .bashrc:

PATH=/usr/local/texlive/2016/bin/x86_64-linux:$PATH 
export PATH
MANPATH=$MANPATH:/usr/local/texlive/2016/texmf-dist/doc/man
export MANPATH
INFOPATH=$INFOPATH:/usr/local/texlive/2016/texmf-dist/doc/info
export INFOPATH

None of those lines point to the location of any of my .sty files, and I'm not sure what variable should.

Thank you for your help.

Best Answer

I solved my issue by following the answer by @Dox here.

Specifically, simply running

sudo apt-get -y install texlive-latex-recommended texlive-pictures texlive-latex-extra

fixed my installation.

I confess that I don't entirely understand why that worked, and I would love it if someone would explain why. Using install-tl.tar.gz from TeXlive seems to have installed LaTeX into /usr/local. But that does not come with an editor, like TeXworks. Downloading TeXworks from the ubuntu software center seems to make the editor think that all LaTeX .sty files will be located in in /usr/share. Finally, running the above line of code makes the editor work, yet my /usr/share/ installation doesn't balloon to ~2 GB. I still seem to only have one "full" LaTeX installation in /usr/local (1.8 GB), while /usr/share is very small (100 MB).

I would appreciate any explanation of why this works, or ideas about what is going on behind the scenes of my installation(s?).

Thanks