Jim Schummer's WinEdt Stuff: Macros, tweaks, etc.July 2010 Note: this stuff is for WinEdt 5.5 (and so presumably works in 5.6). I also have an old WinEdt 5.4 page. However, I have not yet found time to play with WinEdt 6.0, and may not anytime soon. Most of this page is still relevant for 6.0, but you will have to install some things manually. I use WinEdt, a customizable text editor. Users can write (and share) macros to perform many editing/compiling tasks. Here are some modest contributions of mine. Disclaimer: I hereby declare that I am not liable for anything. If this software causes your computer to blow up, too bad. That's what backups are for. Upon anyone who does not take this disclaimer seriously, I shall bestow the Eternal Curse of the Soft Wrap. (Victims of this curse often hear their computer screens talking to them, saying "When it comes to line breaks, I am smarter than you!" Trust me, you don't want this curse.) If you have questions, you can probably find help on the WinEdt mailing list. Do post there if you have a question. PDF manipulation via pdftkThe PDF toolkit known as pdftk is a command line program that performs various operations on PDF files. I think of it as the "psutils" of PDF (though it does not perform the n-up operation). I have written two preliminary, MUI-based interfaces that simply pass the appropriate arguments to pdftk.
Some of these operations can be performed using the pdfpages LaTeX package, and for which there is a WinEdt macro. However, that method requires passing through pdfLaTeX, while the pdftk approach should be a bit faster. To use these macros, the user must have pdftk.exe installed. My installation macros will not do that for you. Secondly, the latest version is 1.41. Earlier versions are prominently featured in Google searches, but they do not perform the stamp operation, and thus may cause an error. This is my first (acceptable) version of these macros. (If I used version numbers, this would be v0.9.) They get the job done, but they do not yet deal with Adobe's habit of locking files. (Specifically, if the output file already exists and is open in Acrobat, pdftk cannot complete its task. A future version of this macro should tell Acrobat to close the file first. If there is interest in these macros, I could add this functionality.) Installation: First be sure you have pdftk.exe on your computer. Then, download pdftk-mui.zip, extract it to any folder, open the installation macro in WinEdt, and run it (Shift-Ctrl-F9). You may want to use Options | Maintenance | Backup first, to save your current settings. (Alternatively, you could install the macros and menu items manually.) Let me know if you find these useful. Graphical Interface for psutilsWritten by Angus Duggan, psutils is a collection of utilities for manipulating PostScript files, distributed with many TeX distributions. I find these utilities to be very handy, but they run from the command line and use many hard-to-remember arguments. Therefore I wrote an interface to interact with (some of) these utilities and (some of) their parameters. These interfaces are based on a previous version I wrote for WinEdt 5.4. The current version uses WinEdt 5.5's new MUI engine. (In fact Alex improved my old psnup macro as an example of how to use this new engine.) Once installed, my interface gives you a simple way to interact with the following psutils.
Installation: To install the macros, download this zip file, extract it to any folder, and run the installation macro. You may want to use Options | Maintenance | Backup first. (Alternatively, you could install the macros and menu items manually.) Let me know if you find these useful. MetaPost(Note: these MetaPost macros are now hosted at winedt.org, too.)Proof pagesFor compiling my MetaPost files, I formerly used A. Standaert's MPPreview macro package, which works very nicely. It uses the MetaPost --> LaTeX --> dvips approach to produce a .ps file containing the figures. I recently came across another method for compiling and viewing multiple MetaPost figures, and wrote a macro to take advantage of it (borrowing some ideas from A. Standaert's macros). The macro does the following.
This method may be slightly faster than the approach that uses both LaTeX and dvips, though many will consider the difference to be small. If you would like to install it, then perform the following steps.
Single figure compilationIf you are only interested in compiling and viewing a single figure, then it is
fastest to simply run metapost, and immediately open the single output file in GSView.
Often, this requires the use of the "prologues" variable in your MetaPost file.
Depending on your setup, you may or may not see fonts displayed properly.
Third, you should select the EPS Clip option in GSView to best view the output (thanks
to F. Pétiard for alerting me to this option).
Simply use a macro like the following. To make things even easier, I have written a more detailed macro that runs MetaPost, and then immediately displays in GSView the "current figure", which is determined by the current position of your cursor within the .mp file. If you would like to install it, then perform the following steps.
A note about using LaTeX within MetaPostIf you use LaTeX commands in your labels, you include something likeverbatimtex \documentclass{article} \begin{document} etex in your .mp file. In that case, you want mpost to run with the -tex=latex switch (if you haven't done so via an environment variable). In this case, you need to edit my macros to include this switch. Thanks to John Kitz for this information. ButtonsMy Firefox and Python buttons are now included in WinEdt 5.5. Meanwhile, I have created more buttons/images for: the 7-zip compression program, the gnuplot plotting program, and the USB icon. All of these buttons are contained in this zip file. Download and unzip the file, and put the images in the appropriate directories. It should be clear, but files named *.btn.bmp are Buttons; *.img.bmp files are Images; and *.lbtn.bmp files are Large Buttons. Edit the files Winedt.btn, Winedt.img, and Winedt-Large.btn appropriately. Tweaks and TipsI have tweaked some of WinEdt's standard behavior to my personal liking. Browse through what I've done to give yourself ideas. But back up your settings before trying any changes!
|