[TxMt] Textmate/TeXShop-Interaction

Charilaos Skiadas cskiadas at uchicago.edu
Tue Jan 10 21:55:13 UTC 2006

On Jan 10, 2006, at 3:35 PM, Matthias Damm wrote:

> They basically are scripts, yes.
> I am working with this .engine file for example:
> #!/bin/sh
> location=$(dirname "$1")
> basefname="${location}/`basename "$1" .tex`"
> # process the bibliography
> for file in "${location}/${basefname}"?.aux ;
> do
>     bibtex "${file}"
> done
> (BibTeX is called for any file1.bbl, file2.bbl etc., which are  
> created by bibtopic to make multiple bibliographies possible.)
> Would something like that work from Textmate?
> (Maybe it obviously does, I am not a shell guru ...)
Yes you should be able to just add this as the text to a command. The  
only thing you will have to do is to change $1 to $TM_FILEPATH, I think.
The great thing about Textmate is exactly that it can help you become  
a shell guru. :) I knew very little about the shell before textmate.  
You just look at the various commands, and you learn.
So if you just create a new command using $TM_FILEPATH instead of $1,  
asking it to save the file first, have it input the entire document  
and output either nothing or "HTML", you should be set. The hardest  
part would be choosing a good key equivalent for it. Bonus points if  
you make it create a nice looking HTML output, and allow you to click  
on any errors that appear.
There are all sorts of possibilities...
> Thanks,
> Matthias
> -- 
> Matthias Damm
> mad at macpla.net
> PGP key: http://macpla.net/MatthiasDamm.asc
> PGP fingerprint: CED3 6074 7F7D 3148 C6F3  DFF2 05FF 3A0B 0D12 4D41


More information about the textmate mailing list