[TxMt] Printing in TextMate
eric at aplosmedia.com
Sat Jul 8 06:41:13 UTC 2006
I just like the fact that Allan seems to leverage what's already
I moved from windows about 7 months ago, and I used to use Zend
Studio, and a couple other tools. They were all a pain in the ass,
and I couldn't do everything I needed to do during my day. TextMate
allows this, and if it doesn't, I can add in what I need without
harassing Allan (for the most part anyways).
So, Kudos to Allan.
I think I might have to name my first kid Allan ;)
On Jul 8, 2006, at 1:36 AM, Eric O'Brien wrote:
> It seems to me (a non-programer even) that it is THIS sort of
> solution to a problem that gives me warm feelings about TextMate!!
> The design approach results in a sense that "It's not just a text
> editor, it's an editing framework!" Or something. Although the
> functionality of enscript is not built-in to TextMate, it is fully
> AVAILABLE to TextMate. I'm reminded of the fellow who "augmented"
> TextMate into being his favorite editor for writing Dramatic
> Scripts. (!)
> "It's a breath mint! It's a floor wax! It's a chameleon! It's
> fabulous!" :)
> There must easily be 20 or 30 other similar "case studies."
> On Jul 7, 2006, at 3:06 PM, Matthew Anderson wrote:
>> If you make the following script a command (I called it "enscript
>> # 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
>> your default PDF viewer (probably Preview.app) will pop up with
>> the buffer's contents in two columns with line numbers and 'fancy'
>> headers. You can then print from that pdf viewer.
>> see "man enscript" for many potential options; the ones I used were:
>> -2 two columns
>> -G fancy headers
>> -r landscape mode
>> --line-numbers obvious
>> -o - output to stdout
>> It doesn't look like "mpage" is a standard tool installed on OS X;
>> if it was, you could do some additional interesting things with
>> arranging text (like more than 2 pages per page). I bet you could
>> install it from somewhere and use it though, if you needed its
>> On Jul 7, 2006, at 4:30 PM, Brad Choate wrote:
>>> For two column, landscape layout, just choose the "Layout" set of
>>> options from TM's print dialog.
>>> For line numbering, you'll have to use the "Create HTML from
>>> Document" command (in the TextMate bundle) to produce a html
>>> representation of your source (there's even an option to display
>>> line numbers). Save the output to a .html file and open it in
>>> Safari. From there you can select page layout options from
>>> Safari's print dialog. It also preserves the theme you're using,
>>> so select a theme and font that is suitable for printing before
>>> using the "Create HTML..." command.
>>> On Jul 7, 2006, at 1:34 PM, Kurt Wolf wrote:
>>>> I am wondering if there are settings that can be adjusted for
>>>> setting up printing support in TextMate. I would like to print
>>>> line numbers and change the font to a more printer friendly
>>>> choice. Also (dreaming here), being able to print landscape on
>>>> the page in a two col style would be killer. Any thoughts?
>> Matt Anderson
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
More information about the textmate