Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
Sounds like you have two TeX systems installed and TeXworks is finding a different one to TL2013. What do the typesetting preferences show? –  Joseph Wright Sep 25 '13 at 20:06
    
All right, added to the original post. TeXworks is definitely looking in the correct place The folder /usr/local/texlive/2013/bin/x86_64-linux matches up with the output from mktexlsr. –  Will Beason Sep 25 '13 at 21:32
    
Can you try compiling from TeXworks a one line file containing \RequirePackage{array}\stop and reporting the log file? –  egreg Sep 25 '13 at 21:39
    
Sure! Here's the link: pastebin.com/Zgxt2s6R –  Will Beason Sep 25 '13 at 22:43
    
@beason4251 You find the line /usr/share/texlive/texmf-dist/tex/latex/tools/array.sty which shows that TeXworks uses a different TeX distribution. You should check that you have the correct path at the top in the “Typesetting” tab of the preferences window. –  egreg Sep 25 '13 at 22:51
show 1 more comment

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
Yup, I just had to add the correct executable of pdfLaTeX and now it works. –  Will Beason Sep 26 '13 at 0:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.