[TxMt] LaTeX syntax enhancements.

otheraccount at verizon.net otheraccount at verizon.net
Sat Jan 29 17:16:58 UTC 2005


> The feature I would really like to figure out how to do is how to keep 
> track of labels,  so I could have some kind of autocomplete when I 
> type \ref{fig:x <some command key> I get a list of matching labels to 
> choose from.

I have essentially this set up, along with a more general system that 
does LaTeX autocomplete stuff... So in the situation you describe, 
it'll autocomplete the label and display its context in a tooltip 
(rotating through different possible matches with repeated keypresses) 
and, if nothing matches, just display a list of labels. There's also a 
script that does this kind of autocompletion for BibTeX \cite{blah<some 
command key, and, if you're in neither a \ref nor a \cite, it tries to 
autocomplete with a LaTeX command. (For the \cite stuff, you need to 
define a shell variable $TM_BIBFILE that contains the full pathname of 
the bibliography file you're using.)

I'm attaching the scripts... Fiddling will likely be required to get 
these to work on any set-up other than mine... It should essentially 
work, though, if you just dump everything into your 
~/Library/Latex.tmbundle/Macros directory. (Or go into the macro and 
change the path appropriately.) It's triggered by 
command-shift-spacebar.

(I'm not getting anywhere near svn---catastrophe would ensue if I did, 
and in any case, these really would need to be fiddled with a bit, 
changing some filepaths and stuff, to fit elegantly into a bundle.)

Marcin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: LaTeXcompletion.tgz
Type: application/x-gzip
Size: 7367 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20050129/9b576a32/attachment.tgz>


More information about the textmate mailing list