TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Simple question: I have a folder I'd like to add to my MikTex search path (containing a stack of include and .sty files.)

For the life of me, I can't seem to figure out how to add a folder to the search path.

(For the record, I'm on Windows 7, and using TeXWorks to generate pdf files via XeLaTex, all installed via MikTex 2.8 )

share|improve this question
Not a duplicate of this? Include additional Packages - closed – Count Zero Sep 30 '11 at 17:43
That questions is more about "what is the search path now"; I'm more interested in "how do I change the search path", that is, I don't want to use any of the default locations. – Electrons_Ahoy Sep 30 '11 at 17:49
up vote 8 down vote accepted

Open "Maintenance" or "Maintenance (Admin)" in Start Menu, select "Settings". You will open "MiKTeX Options" window.

enter image description here

You can add a root path of your own. e.g. X:\localtexmf\

Then you can put your own LaTeX styles into X:\localtexmf\tex\latex\WHATEVER. tex\latex is predefined position in TDS, you can't use arbitrary directory structure.

Then run "Refresh FNDB" command in "General" tab in "MiKTeX Options" window.

share|improve this answer
Spectacular. Thank you. – Electrons_Ahoy Sep 30 '11 at 21:51
"Maintenance"? I have Windows 7, but don't understand what you are talking about. – Jason S May 30 '14 at 19:49

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.