[TxMt] LaTeX: Bibliography-Autocompletion stopped to work?

Adam R. Maxwell amaxwell at mac.com
Sun Sep 24 16:20:41 UTC 2006


Hi Haris,

On Sep 24, 2006, at 08:53, Charilaos Skiadas wrote:

> On Sep 24, 2006, at 10:50 AM, Adam R. Maxwell wrote:
>
>> I think I started using TM about the time this transition  
>> occurred.  Is there any way to get the BibDesk Completion command  
>> back for personal usage?  The advantage for me is that BibDesk  
>> searches based on title, keywords, author/editor names, and citekey  
>> (at least through the standard AS interface).  I'm also a BibDesk  
>> developer, so I'm very biased ;).
>>
> Actually the command is still part of the bundle, but just disabled.  
> We were planning to eventually remove it if no-one complained, but  
> it looks like we'll be keeping it ;)
> (Of course, one could alter the current label completion command to  
> look at other fields as well, it really just parses the bib files.)

Well, I happen to think that parsing BibTeX is fairly difficult to do  
correctly.  As a trivial example,

@article(citekey,
title = "title",
author = "m{\"e} and myself")

and

@article{citekey,
title = {title},
author = {me{\"e} and myself}}

are both valid BibTeX (note the use of () and "" instead of {}  
pairs).  Add whitespace and remove newlines for extra fun.  You can  
write an ad-hoc parser that's probably adequate for completion  
(although even then I can imagine some difficulty with encodings).

> Anyway, to enable the bibdesk completion command, open the bundle  
> editor and go to the LaTeX bundle. Then make sure the actual LaTeX  
> bundle item is selected. You should, in that event, see on the right  
> the structure of the bundle menu, and where each command goes in  
> subgroups like Insert and Format etc. You will see BibDesk  
> completion in the list of excluded items all the way to the right.  
> Just drag it back into a desired location in the menu structure  
> area, probably under the "insert" group. Give it a key equivalent,  
> and you should be good to go.

Ah, that's easier than I thought; thanks!  The LaTeX bundle is nice,  
and thanks to all who've worked on it.  I've made a few additions  
locally:  png as a graphics file,  width=0.8\textwidth for  
\includegraphics, and dropping a .bib file inserts its path.

I'd like to write a plugin that adds NSTextView-style completion for  
\cite and \ref, but my first attempt was a complete failure.  This is  
the one thing that I really miss from other editors :(.

regards,
Adam




More information about the textmate mailing list