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 having problems with the packages in a document I am trying to compile, specifically natbib.sty and fancyhdr.sty. I have both of these on my computer, but I don't think that TeXnicCenter is looking in the correct place for the packages.

How do I find out where TeXnicCenter is looking for packages? I know I need to ensure that the .sty files are in the correct place, but do I need to do anything else to ensure that the program can find the correct packages?

share|improve this question
Is it MikTeX or TeXLive you are using? Note that TeXnicCenter doesn't look for packages it just queries the TeX file properly. Then your distro decides if to install packages on-the-fly etc. –  percusse Dec 3 '12 at 13:08
What error are you getting? It's unlikely that the package will not be found. Paste the error here and you can get better responses. –  recluze Dec 3 '12 at 13:34
I am using MikTeX as far as I am aware... The error message I am getting is as follows: pdflatex> !LaTeX Error: File 'natbib.sty' not found. –  Zoe_Watson Dec 3 '12 at 13:55
Check (MiKTeX) Package Manager (Admin) and try to find if natbib and other packages are installed. If not, then install them. Alternatively you may set Install missing packages on-the-fly to Yes in the Settings (Admin). –  TKO Dec 3 '12 at 14:52

1 Answer 1

It is not the duty of TeXnicCenter to find the packages, but of the TeX distribution. In the output profiles of TeXnicCenter you must set the according executable, but if you use the profile wizard, TeXnicCenter does it for you (you must give the path to the executable binaries.)

For MiKTeX I can say, that both fancyhdr and natbib are not part of the basic installation, so must installed with the Package Manager. However, as @percusse already pointed out, in MiKTeX there is the possibility for installing “on thy fly”, and asking for it is the default setting. Though TeXnicCenter 1.0 has a known bug regarding this default setting: In the MiKTeX Options (settings window) under the “General” tab you must change the setting for “Package installation” from “Ask me first” to “Yes”. But honestly I want to encourage you to install the recently published Beta version 2.0.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.