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

Charilaos Skiadas skiadas at hanover.edu
Sun Sep 24 21:30:19 UTC 2006


On Sep 24, 2006, at 2:54 PM, Adam R. Maxwell wrote:
>
> Yes, that's correct; BibDesk reads any of the above (thanks to  
> btparse!), but saves using {} as delimiters.

Hm, perhaps we could change things so as to use btparse as well.  
We'll see.
>
> In that case, just grabbing citekeys is pretty straightforward.  My  
> bib files are fairly large, so I'm not sure how well it scales to  
> read the file every time (if that's what you do?).

Yes I just search recursively starting either from the current file  
or TM_LATEX_MASTER, and descending into all \include'd and \input'd  
files, and searching in there for all \bibliography{} entries, and  
then parsing all those. It looks for the keyword in citekey, author/ 
editor and title fields.
>
> The only reference is the WEB source for BibTeX itself, but the  
> docs with btparse have a pretty good explanation, and Nelson Beebe  
> wrote a paper on bibclean that's helpful.  The bottom line is that  
> BibTeX sucks because of the variations in syntax.

But we can always have it cleaned up by BibDesk first ;)

> That's partially correct; it uses AppleScript to get the list of  
> completions, so BibDesk has to be running, but it searches all open  
> documents.  There are also some features that help searching (you  
> can search for "Bü" instead of "B{\"u} for author name completion).

Ah that last one is probably tricky for our parser to do correctly.  
Of course, if this is basically inherited from btparse, then it just  
might be doable.

> We actually rewrote NSTextView's completion window/controller from  
> scratch for BibDesk, and that's what I was trying to wedge into  
> TextMate (to avoid any use of the mouse).  Since there's no  
> published API for TextMate's main textview, that may be impossible  
> for me.

That would indeed be really sweet. I think we might have a better  
chance at it in TextMate 2.0, where I think a lot of these internals  
might be more attainable. As it is, the best we can do really is the  
current behavior of esc, which using only citekeys I'm afraid  
(because it can't alter the word that is being completed, it can only  
complete it).

>>
>> Haris
>>
>> PS: BibDesk is an awesome program, I can't even imagine managing  
>> bib files without it.
>
> Thanks!  I'll try to avoid promoting it on this list, though ;).

Well, BibDesk is a free product and TextMate doesn't really offer  
great support for managing bib files, so I don't see any harm in some  
occasional mention of it ;). I actually would expect that most of us  
working with bib files use BibDesk for them.
I have often considered improving TextMate's bib file functionality,  
but frankly I find my needs satisfied with BibDesk, so I don't have  
much incentive to do it.

> regards,
> Adam

Haris





More information about the textmate mailing list