I am trying to apply my thesis to a TeX template. I have pdflatex
installed on a Linux box (in my university), but cannot get it to work. When I point to my TeX file as below, it gives an error:
Enter file name: /users/ugrad/oconnorp/Downloads/CUEDThesisPSnPDF/thesis
! LaTeX Error: File `Classes/CUEDthesisPSnPDF.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Best Answer
Reason for the error:
There is no change in directory by
cd /users/ugrad/oconnorp/Downloads/CUEDThesisPSnPDF
before running pdflatex from the CUEDThesisPSnPDF directory.cd
should be done asCUEDthesisPSnPDF.cls
(class file) is located inClasses/CUEDthesisPSnPDF
where thepdflatex
would be searching as it is mentioned in the argument of\documentclass[]{}
as below.Hence the .cls(class)/.sty(style) file location was not known to
pdflatex
engine. Instead you ranpdflatex
from a different directory, but did not provide name of the .tex file and the location of .cls and .sty files. Program was just exited by typingX
.Correct Approach
Run
pdflatex thesis
after thecd /users/ugrad/oconnorp/Downloads/CUEDThesisPSnPDF
to satisfy theCUEDthesisPSnPDF.cls
location atClasses/CUEDthesisPSnPDF
Command line/Terminal way of running
pdflatex fileName.tex
should work always and its the best verification test incase of errors from Editors. Ideally there is no need for latex editor, its for GUI user experience and synctex/view pdf facilities.Verify a latex installation: Commandline/Terminal:
latex small2e
to get thesmall2e.dvi
(or)latex sample2e
to get thesample2e.dvi
pdflatex small2e
to get thesmall2e.pdf
(or)pdflatex sample2e
to get thesample2e.pdf
pdflatex sample2e
to get thesample2e.pdf
xetex opentype-info
to get theopentype-info.pdf
Notice, there is no need for
.tex
extensionMentioned by: jon in his comment
Portable LaTeX editor: Without sudo rights:
When one don't have a LaTeX editor installed on Ubuntu and also don't have
sudo/admin
rights. use portable version of TeXmaker LaTeX editor depending on the 32bit(i386) or 64 bit (x86_64) linux.Test whether linux is 32 bit or 64 bit using
uname -a
at terminal. 32bit portable editor can run on both.