[Tex/LaTex] TeXworks doesn’t see packages installed by tlmgr

installingpackagestexworks

I am running Fedora 19 on a Dell Latitude E6410 with an i7 dual-core. The program I use for LaTeX is TeXworks. I have Tex Live 2013, and use pdfTeX 3.1415926-2.5-1.40.14 set as my processing tool under preferences.

I would like to use the package "pgfplots.sty" in TeXworks, but TeXworks tells me

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

This question has been asked several times, but I have not found an answer. For each of the things I have tried, the explanation includes a link to the answer(s) suggesting that solution.

I have checked, and TeXworks is running TeX Live 2013:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)

I have set up tlmgr and have run the commands to install the package:

[root@localhost Desktop]# tlmgr install pgfplots
tlmgr: package repository http://mirror.hmc.edu/ctan/systems/texlive/tlnet
[root@localhost Desktop]# tlmgr update pgfplots
tlmgr: package repository http://mirror.utexas.edu/ctan/systems/texlive/tlnet
tlmgr: saving backups to /usr/local/texlive/2013/tlpkg/backups
tlmgr: no updates available

tlmgr has downloaded the package into the correct location:

[beason4251@localhost ~]$ kpsewhich pgfplots.sty
/usr/local/texlive/2013/texmf-dist/tex/latex/pgfplots/pgfplots.sty

I have run mktexlsr and it ran successfully.

[root@localhost ~]# mktexlsr
mktexlsr: Updating /usr/local/texlive/2013/texmf-config/ls-R... 
mktexlsr: Updating /usr/local/texlive/2013/texmf-dist/ls-R... 
mktexlsr: Updating /usr/local/texlive/2013/../texmf-local/ls-R... 
mktexlsr: Updating /usr/local/texlive/2013/texmf-var/ls-R... 
mktexlsr: Done.

tlmgr tells me the package is installed, output linked below:

[beason4251@localhost Desktop]$ tlmgr info pgfplots –list

If I run the command

pdflatex M365CNotes.tex

everything works fine and the pdf is created, I just can't do the same through TeXworks.

Here are my typesetting preferences. The duplicate entry at the bottom is one I added manually while trying to get this to work. I've removed it now.

I can't link to the output of the following document since I don't have enough reputation yet:

\RequirePackage{array}\stop

Here's a disassembled link: http: //pastebin. com/Zgxt2s6R

Best Answer

The .log file resulting from compiling the suggested one line document

\RequirePackage{array}\stop

shows

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=pdflatex 2013.8.14)  25 SEP 2013 17:41
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty
Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
[...]

and the line

/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty

definitely tells you that TeXworks is not using the “vanilla” TeX Live 2013 rooted in

/usr/local/texlive/2013

but a system provided one. Installing packages with tlmgr has no effect on the TeX distribution presently used by your TeXworks.

Open the Preferences window of TeXworks and go to the “Typesetting” tab. You find at the top a list of the search paths for executable programs. Ensure that

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

is at the top.

Indeed TeXworks doesn't use the PATH environment variable or, better, it supplements it with its own list of paths as ordered in the Preferences.

Here's a picture of the window taken from a Mac OS X machine, but it should be similar on your system. The buttons for adding or moving a path should be self-explaining.

enter image description here