[TxMt] Textmate/TeXShop-Interaction

Matthias Damm textmate at macpla.net
Tue Jan 10 23:52:58 UTC 2006


Hi,

> 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...

well, that worked (and thus was rather easy) indeed ...

The only change I had to make was to add "|pre" to the bibtex command  
to get a nice output.

For the records:
To call BibTeX in a bibtopic-compatible way, use the following macro  
from within Textmate:

location=$(dirname "$TM_FILEPATH")
basefname="${location}/`basename "$TM_FILEPATH" .tex`"
# process the bibliography
for file in "${basefname}"?.aux ;
do
	bibtex "${file}"|pre
done


Thanks for the quick help,
best regards

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