[Tex/LaTex] Typesetting Error using TeXworks


I am trying to make a minor tweak to a template using TeXworks. I am new to LaTeX so forgive me for my ignorance. The file type is pdfLaTex. When making the slight adjustment and clicking the green "play looking button" or typesetting button to compile the file, I receive an error that reads:

! LaTeX Error: File `fancyhdr.sty' not found. 

I am also running MiKTeX on my computer. Is this interfering with the connection? Or how do I obtain the so called "missing" file fancyhdr.sty? Thanks.

Best Answer

When you installed MikTeX there were some additional management programs installed. Find the install folder and open the Package Manager.

IMPORTANT: If you install Miktex as admin then use that version. If you installed only for one user then be sure you are in that account and you use the version that does not say (Admin) in the filename.

After the package manager has populated the package list, then scroll down to the fancyhdr package and click on it. Now click on the + at the top left of the package manager screen. Now your compile should work.

SUGGESTION: Go back to the folder where MikTeX was installed and run the appropriate Settings Program. (Either Admin or not based on the original installation)

Now near the bottom of the opening splash screen be sure that either Ask me first (my choice, as I am a bit of a control freak as I like to know when my computer is being modified and why the compile is taking extra time. ) or Yes for the automatic package installation. Then in the future when a package is needed but not installed, then it will be installed during the compile. This only applies for packages in CTAN which Miktex has registered as available for installation.

Related Question