Possible Duplicate:
Where do I place my own .sty files, to make them available to all my .tex files?

I am using the default LaTeX command provided by ygwin on Windows. Just wonder when I have new .sty and .mf's residing in a different directory than my source .tex files, how to use them? I could in principle put all of them together and it works. But rather, I would keep a repository of these files separated from my .tex source files.

  • 1
    Please read this: tex.stackexchange.com/questions/1137/… Jun 6, 2011 at 21:13
  • @xport: thank you. Is there any way for latex to do something like #include <dir_to_sty/mysty.xty> in C programming? I would want to have the sty files in arbitrary folder.
    – Qiang Li
    Jun 6, 2011 at 21:16
  • You must register your own packages or document class to the LaTeX system. I think you cannot make a reference to them as you can do in C. Jun 6, 2011 at 21:18
  • On Unix/Linux systems, you can override the TEXINPUTS path variable, like TEXINPUTS=/path/to/dir: pdflatex project.tex or TEXINPUTS=/path/to/dir: xelatex project.tex, so it's easy to override that in a Makefile for example. I don't know if there's something of the kind on Windows.
    – raphink
    Jun 6, 2011 at 21:38
  • @Raphink: did what you said. But now it says some .mf's are not found. It seems these mf's are not controlled by TEXINPUTS environment variable, correct? How to specify these .mf's then? Thank you.
    – Qiang Li
    Jun 6, 2011 at 22:45


Browse other questions tagged .