I'm writing a paper that depends on a file elsarticle.cls and also a file clrscode3e.sty (they're for two different things - not related). I have placed both files in my ~/texmf directory. When I remove anything in my .tex file dependent on clrscode3e.sty and compile with LaTeX, everything is fine and from the output formatting i can see that elsarticle.cls has clearly been recognised. When I add something which depends on clrscode3e.sty, I get "File clrscode3e.sty not found". To verify that I hadn't mistyped anything, I tried moving clrscode3e.sty into the same directory as the .tex file being compiled and everything worked fine. Why would LaTeX recognise a .cls file in my ~/texmf directory but not a .sty file?
Asked
Active
Viewed 1,619 times
1
lockstep
- 250,273
Bryce Thomas
- 971
- 3
- 9
- 18
1 Answers
5
The most likely answer here is that neither file is being loaded from ~/texmf, but that the .cls file is also installed correctly in the main TeX tree. The way to work this out is to look at the .log file which TeX produces. Each file loaded will include the location it was loaded from, so a quick search for the relevant files should reveal where they are loaded from.
In general, TeX will find any .cls or .sty file inside ~/texmf/tex/latex, although you may need to run texhash before this happens. (Recent versions of TeX Live do not require you to run texhash on your local tree, whereas older ones do.)
Joseph Wright
- 259,911
- 34
- 706
- 1,036
~/texmf/tex/latex/SOMENAMEand runtexhash. See http://tex.stackexchange.com/questions/2063/how-can-i-manually-install-a-package-on-miktex-windows and other previous related questions. – Leo Liu Feb 11 '11 at 08:15\input{folder/file}. – Martin Scharrer Feb 11 '11 at 12:31elsarticle.clsis being loaded. – Matthew Leingang Feb 11 '11 at 14:12