WinEdt Macro Library  | LaTEX previous macro  | next macro


Macros and a perl script for converting LaTEX files to web suitable pictures


LaTeX2pic consists of a perl script of the same name, and macros for WinEdt to ease preparation of web ready pictures of formulas. The basic idea is to create a LaTEX file that consists only of an equationand then run LaTeX2pic. At this point it will be made into a picture file (png, jpeg, gif, etc.) that is slightly larger than the equation, ready to place on a web site.


LaTeX2pic requires Perl and ImageMagick. You must therefore first install Perl (ActivePerl can be found several places including Then you must install ImageMagick (

To install LaTeX2pic, simply extract the zip file (e.g. to %b\Macros\LaTeX\LaTeX2pic) and run the install.edt macro (e.g. open install.edt and Execute Current Macro via Shift+Ctrl+F9). This will install the best version for you system. If you have the MUI plugin it will install the MUI version of LaTeX2pic, otherwise it will install the non-MUI version.

The perl script can of course be run from the command-line independent of WinEdt. See the documentation in the perl script for more information.

What does it contain?

After installation two menu items under Accessories are added:

Runs LaTeX2pic, i.e. runs LaTeX, then crops and converts the resulting image to a filetype that you specify.
Basically runs Compile Selection, then LaTeX2pic. Unfortunately, this means that it will open a .dvi window.

Also included is a third macro with no menu item:

The menu must currently be installed by hand since it is experimental and I don't think it will of general interest. It converts one document into a series of pictures--one for each page.


MUI plug-in

Macro contributed by Ivan Andrus <>.

WinEdt Macro Library  | LaTEX previous macro  | next macro