all, I tried to use \usepackage{verbatimbox,xcolor}
, and when I tried to TeXify
my tex
file, an error message popped up (after install verbatimbox
):
! Latex Error: File `readarray.sty` not found.
How to fix this error?
I am using MiKTeX2.9
with WinEdt7.1
on Win7 X64
.
[EDIT1] I have installed both verbatimbox
(WinEdt
promoted) and xcolor
(using MiKTeX Package Manager
) packages, but the error persists.
[EDIT2] The problem has been resolved using the method suggested by Segletes
. Refresh FNDB
in MiKTex Maintenance
->Settings
.
cheers
Best Answer
Per the OP's request, I am turning my comments into an answer. When one's LaTeX installation can't locate a package, your only option is to install it yourself. First you have to locate the missing package. A good place to start is the repository at
ctan.org
. In this case, thereadarray
package that I wrote is stored there in http://ctan.org/pkg/readarray . Failing that, there is always a google search to try to locate an obscure package (disclaimer: be careful what you download from unknown sites).Some packages are easier to install than others. In the simplest cases (for which
readarray
qualifies), there is a.sty
file that is directly downloadable. For more complicated installations, the package should hopefully provide installation instructions.LaTeX is set up so that if you place the needed
.sty
file in your working directory, it will be located and used. This can get you over the hump in the short term, but ideally, you would like to place the file in the "proper" place. There are typically (at least) two directory trees in a LaTeX installation, the tree where the system's installation resides. On a MikTeX installation, for example, that would beC:\Program Files\MiKTeX 2.9
.You don't want to mess with that directory tree manually, unless you know what you are doing, What you want to find is the "local" LaTeX installation directory tree, historically referred to as the
localtexmf
(on Unix systems). In the default MikTeX installation, each user gets his own local installation directory, and so it has a name (in my case) ofC:\Users\steven.segletes\AppData\Roaming\MiKTeX\2.9
. Obviously, the directory name should reflect the name of user in question. MikTeX also permits, through the "Roots" tab of itsSettings
program, to add your own local installation directory (I also have one calledC:\localtexmf
).The structure of the directory tree in this local directory (regardless of it pathname) has some standard locations to put things.
\tex\latex
- directories where.sty
files can be placed\source\latex
- directories where source code goes (I use it for.dtx
,.ins
, and other such files)\doc\latex
- PDF package documentation, and the.tex
files for producing the documentation\bibtex\bst
- BibTeX styles\bibtex\bib
- standard bibfile dataThere are many others, but these are the main ones I use. So, in my case, I would want to move the readarray style file to
C:\Users\steven.segletes\AppData\Roaming\MiKTeX\2.9\tex\latex\readarray\readarray.sty
or (since I created a secondary local LaTeX directory)
C:\localtexmf\tex\latex\readarray\readarray.sty
as its proper repository location (I even keep a shortcut to
C:\Users\steven.segletes\AppData\Roaming\MiKTeX\2.9\tex\latex
on my desktop to quickly access these directories). You can similarly move documentation, etc., as described above.The only thing left (and it is essential) is to let MikTeX know that you have placed the file in this location. From a Windows command prompt (program
cmd
) you need to runC:\Program Files\MiKTeX 2.9\miktex\bin\texhash
Alternately, from the MikTeX settings program, you need to click on the "Refresh FNDB" button, which updates the filename database.
Your installation of
readarray.sty
should now be ready to use.