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.

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

How do you choose which .sty file a document uses in TeXworks?

share|improve this question
I think I don't understand your question. Are you asking how to load a package? – Gonzalo Medina Jun 2 '11 at 23:06
possible duplicate of How can I manually install a package on MiKTeX (Windows) – Caramdir Jun 3 '11 at 5:05
up vote 3 down vote accepted

I understand the problem; I misunderstood what a .sty file was. I didn't realize a .sty file was the same as a package. I had a standalone .sty file that I wanted to incorporate into my document. In order to do it I did the following (I am using TeXworks/MiKtex on Windows):

  • Create a new directory "C:/Local Tex Files/tex/latex/misc" and put the file "myfile.sty" in there.
  • Go into the MikTex settings and add "C:/Local Tex Files" as a root directory.
  • Add "\usepackage{myfile}" to the document preamble.
share|improve this answer
See also tex.stackexchange.com/questions/2063/… – Caramdir Jun 3 '11 at 5:04

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.