Super User is a question and answer site for computer enthusiasts and power users. 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

In Windows 7, I want to associate .tex files with latex, which is in PATH. The association should work even if the binary is moved to another place in PATH. Can that be accomplished without associating the file extension with a custom batch script?

share|improve this question
Surely you'd want to associate them with your text editor rather than latex? – James May 23 '11 at 10:02
@James: No, I want to compile/typeset them on double-click. I have several text editors without a mapped pdflatex key, and compile more often than I start editing. – user67194 May 23 '11 at 10:11
I'd suggest using a better editor, but other than that, you'd probably want a batch file to be able to run on double-click. You could also just use the commmand line - once you write the command once, up + enter will repeat the compile process. Also look at texi2dvi to run twice and with bibtex to resolve all references. – James May 23 '11 at 10:28
@James: Using the command line would not solve my problem at all. Feel free to edit my question to make it more general if the latex example bothers you. – user67194 May 23 '11 at 10:33
OK I understand now. latex isn't in PATH, the folder that contains all of the various *tex executables is in PATH, so windows knows to look there for them. So you could associate with the .exe files, but I don't think you could pass parameters to the command with an association. – James May 23 '11 at 10:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.