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

I have a few personal class and style files that I keep in a Git repository as they change often. On UNIX-based systems, I simply insert a symbolic link in my texmf tree that points to these files:

ln -sf /path/to/GitRepository/someClass.cls /path/to/texmf-local/tex/latex/

This way, LaTeX always uses the most recent version of the class file. However, my attempts to create a similar setup on Windows with MiKTeX have failed.

Using a Windows shortcut produces a "file not found" error during LaTeX compilation:

! LaTeX Error: File `homework.cls' not found.

Also, pdflatex completely fails to understand a Cygwin symlink:

! LaTeX Error: Missing

See the LaTeX manual or LaTeX
Companion for explanation. Type  H
<return>  for immediate help.  ...    

l.1 ! '<'symlink'>'��.

Is there any way to achieve the effect of symbolically linking files into a texmf tree on Windows using MiKTeX?

Windows XP is the version I encounter most often.

share|improve this question
up vote 4 down vote accepted

You could maybe do something with NTFS junction points, which seem to perform essentially the same function as symlinks to directories. This is unfortunately not going to work for the precise file path you mention above, but you could put a junction point for your entire package at $TEXMFROOT/tex/latex/<packagename>/ — speaking of which, shouldn't you have been putting those symlinks in $TEXMFROOT/tex/latex/misc/ as it is? (Yeah, I was looking at the TDS spec recently...)

The only other suggestion I have is looking into a Cygwin build of MiKTeX (hey, if it can be built on *nix, why not on Cygwin?), but I suspect that that might not be terribly convenient, due to issues integrating with non-Cygwin GUI tools and/or lack of support by GUI tools for a win32 ui but *nix everything else. Of course, if you weren't using any GUI tools to run TeX anyway, it's probably not much of a problem ;-).

share|improve this answer

Usually you have a Makefile or similar installation procedure which copies the files to the correct locations. I don't know of any possible symbolic link replacements for Windows XP; starting with Vista, Windows supports symbolic links natively.

share|improve this answer

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.