[TxMt] Help with LaTeX-build command

otheraccount at verizon.net otheraccount at verizon.net
Thu Dec 30 18:49:07 UTC 2004


I'm attaching the compile script I use, or actually combination of scripts. 
The compile script expects to get nothing as input and discards its output, 
and the 'save active file before running command' thing should be on. The 
command that runs it is:

	compile-tm "$TM_FILEPATH" >/dev/null 2>&1 &

Two points:

- This reports on how things went via Growl---and it doesn't check if you 
have it installed---so if you don't use it, you might want to go into the 
'compile-report' script and change the Growl stuff to something else, like 
maybe an AppleScript dialog box.  (Just redirecting the output of the script 
to a tooltip won't work without serious additional fiddling.)

- This tries to preview using TeXniscope.

The typeset script works analogously. I'm also attaching a script that goes 
to the next TeX error by looking at the output file and piloting TM via 
AppleScript (which is a bit slow and causes the 'go to line' dialog box to 
appear briefly), and one that compiles the current selected text (but 
requires the whole document as input).

Hope some of this might be of some use... It's not particularly earth-
shattering, but works OK for me.

On Dec 30, 2004, at 6:14 AM, Ivar Åsell wrote:

> From: Ivar Åsell <ivar at enskede.net>
> Date: 2004/12/30 Thu AM 05:14:54 CST
> To: TM Users <textmate at lists.macromates.com>
> Subject: [TxMt] Help with LaTeX-build command
> Hi!
> I would like to be able to do this in TM
> 1. select a .tex-file
> 2. run a macro that
> 2.1 selects all text
> 2.2 runs that text through a "tex-compiler" wich listens to stdin
> 2.3 pipe the results from the "tex-compiler" to the preview-app (can 
> this too listen to stdin?) which show me a nice pdf
> And if I like the results I can save the .tex-file otherwise not.
> The main point here is that I which to see the pdf without having to 
> save my .tex-file.
> Would someone help me with this?
> I have an idea on how this is supposed to be done...
> 1. record a macro (alt-cmd-m)
> 2. select all text (cmd-a)
> 3. filter through command (shift-alt-r)
> 3.1 input: selection
> 3.2 output: ? discard?
> 3.3 command:  ??? something like "<build pdf> | open -a 
> /Applications/Preview.app"
> I just read that "open" cannot read from stdin so I guess it has to be 
> some other way around.
> Please, I'm really lousy at this stuff.
> Help would be much appreciated!
> Kindest Regards
> Ivar
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
-------------- next part --------------
A non-text attachment was scrubbed...
Name: some LaTeX compile stuff.zip
Type: application/zip
Size: 6233 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20041230/c8ff2968/attachment.zip>

More information about the textmate mailing list