[Tex/LaTex] Adding packages to TeXnicCenter

miktexpackageswindows

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?

Best Answer

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.

Related Question