# Printing with the LGTD bundle

My last post gave a thumbnail description of my LGTD bundle, a set of scripts, commands, and snippets for handling next actions lists in TextMate. Almost everything you need is included in the bundle, but there is one omission: ps2pdf is needed to print your lists onto index cards. I didn’t include it because it’s part of the Ghostscript system, a big set of files that you may already have on your system.

If you don’t have Ghostscript, you can get it several ways:

And there may be others. I’ve had Ghostscript installed thru MacPorts (née DarwinPorts) for some time. The installation command is

sudo port install ghostscript


which puts ps2pdf in the /opt/local/bin directory. Fink will put it in /sw/bin, i-Installer will put it in /usr/local/bin, and you can put it wherever you want if you do the compilation by hand (although /usr/local/bin is probably the best place). If you know you have Ghostscript and ps2pdf installed, but don’t remember how or where, you can find out with the command

which ps2pdf


This command will search your \$PATH and report back the full pathname.

After you have Ghostscript installed, you need tell the LGTD bundle where your ps2pdf is so it can “PDFize” your next actions lists before sending them off to the printer. Launch TextMate and open its Preferences. Go to the Advanced section, click on the Shell Variables selector, and add a new variable named TM_LGTD_PS2PDF with the full path to ps2pdf as its value. Here’s what it looks like on my system.

Unfortunately, the Preferences window can’t be resized, so the end of the pathname is not visible.

Now you may be ready to print your lists on index cards. If you have a printer like mine, where index cards run through the center of the feed path (as below), you should be done and can skip this next part.

If index cards don’t feed through the center of your printer, there’s one more step. Open your ~/Library/Application Support/TextMate/Bundles folder, Control-click (or right click) on the LGTD bundle, and choose Show Package Contents from the popup menu. Now open in the Support folder. It should look like this:

/* Configuration file for html2ps.
Meant for printing out on index cards.
*/

@html2ps {
}

/* Standard style sheet definitions */
body    { font-family: Times;
font-size: 10pt; }
H1      { font-family: Helvetica;
font-size: 12pt;
font-weight: bold; }
H2      { font-family: Helvetica;
font-size: 10pt;
font-weight: bold; }
ul      { margin-left: 1.5em; }
li      { margin-left: -.5em; }
@page   { size: 8.5in 11in;
margin-left: 3in;
margin-right: 3in;
margin-top: .25in
margin-bottom: 6.25in}


If your index cards feed through the printer where the left edge of a letter-sized sheet would feed, you’ll want to change the left and right margin lines to

          margin-left: 0.25in;
margin-right: 5.75in;


If your index cards feed through the printer where the right edge of a letter-sized sheet would feed (a setup I’ve never seen), you’ll want to change the left and right margin lines to

          margin-left: 5.75in;
margin-right: 0.25in;