____________________________________________

 MetaPost Preview macros for WinEdt 5.3

============================================

 Release 2.01 - BUGFIX version
 February 10, 2003

 by Arnout Standaert
 E-mail: arnoutstandaert@hotmail.com

 http://www.winedt.org/

____________________________________________


This macro simplifies the editing-viewing process of MetaPost
source files in WinEdt. It provides a configurable menu
commands that outputs a PostScript file containing all or selected
figures from the source .mp file.

---------------------------
 NOTICE
---------------------------

Since I'm not a heavy MetaPost user myself, feel free to report any flaws
or bugs to me. Suggestions for improvement are highly appreciated as well.

My email adress: arnoutstandaert@hotmail.com

---------------------------
 INSTALLATION
---------------------------

Just unzip the MPPreview.zip archive (as you have probably done
already), open the macro file "Install_MPPreview.edt" in WinEdt,
and execute it by choosing "Macros" menu > "Execute Current Macro".
This copies all relevant files to their correct location and adds
3 menu items to your Accessories menu with corresponding menu
images and toolbar icons.

---------------------------
 UNINSTALLATION
---------------------------

To uninstall the program, it should suffice to open the macro file
"Uninstall_MPPreview.edt" in WinEdt, and then execute it by choosing
"Macros" menu > "Execute Current Macro".

---------------------------
 MANUAL UNINSTALL
---------------------------

If the uninstallation doesn't work by using the Uninstall_MPPreview.edt
macro file, do the following:

* In WinEdt, choose "Options" menu > "Menu Setup..." and from there,
    remove the "MetaPost Preview All", "MetaPost Preview One" and
    "MetaPost Preview Config..." menu items. For the sake of appearance,
    also remove the menu separator above these items.

* If you installed toolbar buttons for the MetaPost Preview commands,
    remove these in the Toolbar Setup unless you're very fond of them.

* Close down WinEdt, and remove the directory ...\WinEdt\Macros\MPPreview
    and all files inside.

* Remove the files "MPPrevAllTB.bmp", "MPPrevOneTB.bmp" and "MPPConfTB.bmp"
    in the ...\WinEdt\Bitmaps\Buttons directory. Also remove the files
    "MPPrevAllM.bmp", "MPPrevOneM.bmp" and "MPPConfM.bmp" from
    ...\WinEdt\Bitmaps\Images.

* In the file ...\WinEdt\WinEdt.btn, remove the following lines:

        xxx %B\Bitmaps\Buttons\MPPrevAllTB.bmp
        xxx %B\Bitmaps\Buttons\MPPrevOneTB.bmp
        xxx %B\Bitmaps\Buttons\MPPConfTB.bmp

    with xxx some number between 001 and 500.

* In the file ...\WinEdt\WinEdt.img, remove the following lines:

        xxx %B\Bitmaps\Images\MPPrevAllM.bmp
        xxx %B\Bitmaps\Images\MPPrevOneM.bmp
        xxx %B\Bitmaps\Images\MPPConfM.bmp

    with xxx some number between 001 and 250.

That should complete the uninstall. Open WinEdt and check if all traces
of the MetaPost Preview macros have been erased.

---------------------------
 USAGE
---------------------------

To preview the figures in the MetaPost .mp file you're currently editing,
choose "Accessories" > "MetaPost Preview All" (for all figures) or "MetaPost
Preview One" (for one specific figure) (or click the corresponding toolbar
button if you configured it).
In the background, the file is compiled ("mpost <yourfile>.mp"), and
the output files are put in a resulting <yourfile>_preview.ps file.
The result is presented to you in GSView.

There are some configuration options that are accessible through
"Accessories" > "MetaPost Preview Config...":

    - "Delete figure files after preview"
        If this option is checked, all generated figure files will be
        deleted after generating the preview. This may be handy when
        dealing with a lot of figures in your .mp file.

        <default value>: checked -> figure files are deleted after preview

    - "Keep .01 -> .09 extensions after preview (vs. .1 -> .9)"
        Behind the scenes, the MPPreview macro converts file extensions
        .1 to .9 (.x) to extensions .01 to .09 (.0x). This is needed to
        make them show up in the correct order in the preview file. If
        this option is checked, the .0x file extensions are NOT converted
        back to their original .x value.

        <default value>: unchecked -> extensions .1 to .9 are kept

---------------------------
 TIP
---------------------------

If you are a heavy MetaPost user, it's useful to add buttons corresponding
to the menu commands to your WinEdt toolbar. This is accomplished through
a right click on the toolbar > "Toolbar Setup...". The MetaPost Preview
icons should appear somewhere at the end of the list of available icons.

---------------------------
 HISTORY
---------------------------

February 2003 - MetaPost Preview version 2.01
    - BUGFIX! I obviously didn't do enough testing for v2, consequently errors
        were reported and bugs had to be found. MPPreview.edt contains code that
        makes a list of all figures to be shown, but it searched subdirectories
        too and did not recognize metapost figures originating from other .mp
        files.
        A big thanks to Pieter Miedema for alerting me about this problem!

January 2003 - MetaPost Preview version 2
    - Complete rewrite of the macros to cover the functionality of the
        MetaPost PERL scripts by Dirk Fimmel
        (http://www.iee.et.tu-dresden.de/~fimmel/). Thanks to Ignasi Furio
        for this valuable suggestion.
    - Added an installation macro for simple addition of menu commands with
        associated menu and toolbar icons, and an uninstallation macro.
    - Added an interface to configure some aspects of the MetaPost preview
        process. Thanks to Robert for his suggestions and all his
        work on the Winedt.org website!

November 2001 - MetaPost Preview version 1
    - Very basic macro to preview MetaPost pictures from within WinEdt. The
        macro included "\prologues:=2;" before the actual MetaPost code to
        make the GhostScript preview possible.
