Missing Column Info and Printing Question (Re: [TxMt] Re: textmate Digest, Vol 34, Issue 31)

Paul McCann paul.mccann at adelaide.edu.au
Mon Jul 30 23:45:43 UTC 2007


Takaaki Kato wrote:

>> Oh, thanks for the info.  Amazing that an otherwise competent text  
>> editor should lack such essentials.  BTW, the information in the  
>> URL above differs a bit from what my copy of TextMate (1.5.6)  
>> shows: the "View Source as PDF" is in the Latex bundle rather than  
>> the Source bundle.  Where's the best place to get pdfsync and  
>> pdflatex?
>
> I think some bundles have changed over time. I think what you have  
> is recent. If you download every bundle update via subversion,  
> that's the latest. I have no experience with latex, so somebody  
> else will hopefully chime in. Make sure that some bundles have Help  
> in the bundle, which is not available in Help menu in the menu bar.  
> LaTeX bundle has a very long help file.

Gack: I don't think you want to be grabbing latex just to get some  
printing functionality in place! If you're interested in producing  
beautiful technical documents on the other hand...

The link mentioned earlier in this thread *is* out of date: the  
"Typeset and View (PDF)" command in the latex bundle almost certainly  
isn't what was being referred to: it is --unsurprisingly-- only  
useful on a latex source file. I do have a recollection of some  
printing scripts being developed using "enscript", a formatting  
utility that comes with OS X. Here's one that lingers in my bundle,  
and occasionally proves useful. Make a new command with...
=======================================================================
Save: Current File
Command(s):
#!/bin/bash
# close stderr
exec 2<&-
# set options here
enscript_opt="-2Gr --line-numbers -o -"
tempfile="/tmp/texmate-print.$$.pdf"  # note: "$$" is the current pid
pstopdf_opt="-i -o $tempfile"
# create the pdf and open it
enscript $enscript_opt | pstopdf $pstopdf_opt
open $tempfile
rm $tempfile

Input: Entire Document
Output: Discard
=======================================================================

You'll probably want to play with the enscript options to get the  
output to your liking, but it's very malleable.

Cheers,
Paul




More information about the textmate mailing list