[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Feature Request
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX-devel] Feature Request |
Date: |
Sun, 20 Dec 2015 07:27:17 +0100 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Mosè Giordano <address@hidden> writes:
>> That only contains the \bibitems of a thebibliography environment,
>> not the entries of standalone bibtex files.
>
> Uh, it does for me: "auto/bibliography.el" file, associated to
> "bibliography.bib", contains
>
> (TeX-add-style-hook
> "bibliography"
> (lambda ()
> (LaTeX-add-bibitems
> "ref1"
> "ref2")))
>
> This is done by `BibTeX-auto-store', that is added to
> `bibtex-mode-hook' by tex-site.el. But yes, this relies on the
> bibliography file having being edited beforehand.
Ok, I see. That style is not active for me with my test document whose
bib files have different names.
>>> but I'm not expert enough of font-locking to implement this feature
>>> without some hints.
>>
>> It shouldn't be overly hard in general, i.e., you write 2 functions
>> `font-latex-match-(un)known-citation' which search for the next
>>
>> "\\\\cite{\\([[:alnum:]:-]+\\)}"
>>
>> [1] where the group 1 is (not) contained in the hash-table. Then these
>> functions could be used as font-lock matchers, e.g.
>>
>> (font-latex-match-known-citation 1 font-latex-known-citation-face)
>> (font-latex-match-unknown-citation 1 font-latex-unknown-citation-face)
>
> Thanks for the hint!
>
>> The only problem I see is with updates. Point one is that we don't get
>> notifications about updates of bibtex entries, and re-computing all keys
>> can be slow. I have a rfc.bib which contains all IETF RFCs amounting to
>> almost 100.000 lines. Extracting all entries from that file takes about
>> 3 seconds. However, `reftex-extract-bib-entries' does much more than
>> just extracting the keys, so we could easily add a much faster version
>> just for that purpose and then update the hash-table in an
>> `after-save-hook' or so.
>
> This function should go into RefTeX, right?
>
> I'll try to have a look to this feature now that I know where to
> start, but not really soon, I'm pretty busy in this period.
As said in my other mail, we better go the other way and collect the
unknown references and citations during compilation.
Bye,
Tassilo
- Re: [AUCTeX-devel] Feature Request, (continued)
- Re: [AUCTeX-devel] Feature Request, Tassilo Horn, 2015/12/18
- Re: [AUCTeX-devel] Feature Request, Tassilo Horn, 2015/12/18
- Re: [AUCTeX-devel] Feature Request, Mosè Giordano, 2015/12/18
- Re: [AUCTeX-devel] Feature Request, Mosè Giordano, 2015/12/18
- Re: [AUCTeX-devel] Feature Request,
Tassilo Horn <=