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 found a latex2e.pdf in my MiKTeX installation tree. How do I make texdoc latex2e open the PDF version by default?

I tried renaming latex2e.html to something else, and now the PDF version is opened by default. Is there a more elegant way to do this?

share|improve this question

The ordered list of extensions used by mthelp (the real program behind the name texdoc on MiKTeX) can be set in the registry.

In the registry editor, create the key HKEY_CURRENT_USER\Software\MiKTeX.org\MiKTeX\2.8\mthelp if it doesn't exist yet, then add a new string value named DocExtensions and set the associated data to, eg .chm;.pdf;.html;.dvi;.ps;.txt (that is, the default value with pdf move forward). Obviously, you need to replace 2.8 with your actual MiKTeX version number.

Also, you may replace HKEY_CURRENT_USER with HKEY_LOCAL_MACHINE if you want the change to affect all users (and have sufficient privileges).

share|improve this answer
There is now a more comprehensive answer: tex.stackexchange.com/a/54490/9237. – Speravir May 14 '12 at 18:14

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.