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 using Ubuntu on my laptop.

I am new to using LaTeX. I have recently installed Texmaker and I am writing a dissertation; I downloaded a template somewhere from the internet. It has been working fine. But today, when I tried to compile it into a PDF, I got this error:

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

I have looked at other posts, but I have no idea what they meant. Can someone explain to me in layman terms, how can I solve this problem ?

Texmaker said the error is produced in Latex/Classes/PhDthesisPSnPDF.cls line. So I opened the file and this is what I have from line 31 to line 37

%If you want to use a Book style document then uncomment the following 3 lines and comment the above 8 report style lines:
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions\relax
\ifx\pdfoutput\undefined
   \LoadClass[dvips, a4paper]{book}
\else
   \LoadClass[pdftex, a4paper]{book}
\fi
share|improve this question
1  
Does the file book.cls exist in your TeX distribution? It should be at TEXMF/tex/latex/base/book.cls. –  ChrisS Aug 28 '13 at 8:41
    
I just tried cd TEXMF/tex/latex/base/book.cls, the directory TEXMF doesnt seem to exist. How do I find my Tex distribution in ubuntu ? –  user1769197 Aug 28 '13 at 8:50
    
TEXMF is an acronym for the root directory of your TeX distribution. Where exactly the root directory is located varies across TeX distributions. Please post a minimum working example (MWE) that generates the error messages you're encountering. All one can tell is that it looks like you're using the document class contained in ./Latex/Classes/PhDthesisPSnPDF.cls, but it's not clear who this class file then tries to invoke the book document class. –  Mico Aug 28 '13 at 8:54
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.