WinEdt Macro Library  | LaTEX previous macro  | next macro


Since January 2005, this macro is part of WinEdt's default setup (Help | LaTeX Doc...).


This macro finds the documentation for LaTEX packages for you and opens it in the respective viewer.

It will first search in the \doc directory of the TEXMF trees for printable files (i.e. dvi, ps, pdf, and txt). If more than one file have been found, it will let you choose which one to open.

If it didn't find any files, it will search in the \source and the package's directory, and will also search for the sources of the documentation (tex, dtx). If it finds the documentation source only, the documentation will automatically be created and put into the correct place.

You can also use Regular Expressions, e.g. "euro*".

This macro can also be used to find LaTEX resp.BibTEX sources, e.g. .cls, .sty or .bst files, or any other file anywhere in the TEXMF trees, if you include its extension.


Put the macro in %b\Macros\LaTeX\ and do one of the following (or both):

  • create a menu entry for it (in Options | Menu Setup), and put the following line in the Macro field:
  • set the macro up as the Double-Click response to the Active String "\usepackage?{?}" and/or "\documentclass?{?}" (in Options | Settings | Active Strings) by defining the Macro:
       Assign("LaTeXDoc","Active"); Exe("%b\Macros\LaTeX\LaTeXDoc.edt");
    In the same way, you can also assign the macro to the Active String "\bibliographystyle{?}", in which case the macro will search for .bst files.

You can also use this macro to search for the source of LaTEX packages (i.e. .cls and .sty files). Read the documentation provided in the macro to learn how to achieve this.



Macro contributed by Robert <>

WinEdt Macro Library  | LaTEX previous macro  | next macro