23

I am trying to get my TeX document to build. I know this works because I've done it on another system, but I recently put Lubuntu on my Linux partition, so everything is new again.

I've installed Texmaker as well as texlive and texlive-latex-extra and a few other related LaTeX packages. elsarticle.cls is supposed to be part of texlive-latex-extra but when I quick build my document I still get

! LaTeX Error: File `elsarticle.cls' not found.

Is there something I have to do to tell Texmaker that I've installed extra packages, and that it can look for elsarticle.cls in texlive-latex-extra? How do I fix this?

Additional info: here are screenshots of my Texmaker settings. Please let me know if I should include anything else.

epR8GaYuh
  • 2,432
  • Welcome to TeX.SE! What does kpsewhich elsarticle.cls give you? – Mico May 20 '14 at 05:57
  • @Mico Nothing. A blank line. – agampersand May 20 '14 at 05:58
  • In that case elsarticle.cls was not installed in a folder that's searched by your TeX distribution. (Maybe it wasn't installed at all...) Try downloading the basic files from the CTAN page and running the file elsarticle.ins through LaTeX to create elsarticle.cls. – Mico May 20 '14 at 06:00
  • @Mico I did what it said and put the .cls and *.bst files in /usr/local/share/texmf/ but it still doesn't seem to work. When I kpsewhich elsarticle.cls in that directory it finds it but not from the directory my TeX document is in. Should I be using a different directory to contain elsarticle.cls? – agampersand May 20 '14 at 06:12
  • 1
    After installing the files, did you update the filename database of your TeX distribution? Hint: texhash might do the job.) – Mico May 20 '14 at 06:22
  • @Mico I did that, but it's still giving me the same error. – agampersand May 20 '14 at 06:32
  • 1
    for a test copy the elsarticle.cls in your documents directory. Did it run without a problem? –  May 20 '14 at 07:05
  • Moving the cls file to /usr/share/latex/texmf/elsevier/ and running texhash after that worked for me in CentOS 7 – randombee May 31 '16 at 11:43

2 Answers2

45

elsarticle is not included in texlive-latex-extra http://packages.ubuntu.com/trusty/all/texlive-latex-extra/filelist, but in texlive-publishers packages http://packages.ubuntu.com/trusty/all/texlive-publishers/filelist. So, you need to install it first. Run this command on terminal

sudo apt-get install texlive-publishers

and then try compile your document again.

0

Installing Texlive-Science solved the problem. Try sudo apt install texlive-science. My version: https://launchpad.net/ubuntu/+source/texlive-extra/2017.20180305-2

Manoov
  • 1
  • Please see that this question is 6 years old. Your answer may be valid for a current version of TeX Live, but it may not valid for an old version six years ago ... Please add your used TeX Live version number (simply copy the first line of a resulting *.log file to your answer) ... – Mensch Oct 11 '19 at 20:01