auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] RefTeX not working well with Biblatex in class file


From: Mosè Giordano
Subject: Re: [AUCTeX] RefTeX not working well with Biblatex in class file
Date: Fri, 8 Sep 2017 12:04:03 +0200

Dear Tristan,

2017-09-07 17:43 GMT+02:00 Tristan Miller <address@hidden>:
> Dear all,
>
> It seems that RefTeX does not work properly with Biblatex when the
> latter is included via a class file rather than directly in the LaTeX
> file being edited.  In such cases, C-[ doesn't provide the full
> list of Biblatex citation commands, and searches only the first
> bibliography resource for entries.
>
> For example, consider the following four files:
>
> === foo.cls:
> \NeedsTeXFormat{LaTeX2e}
> \LoadClassWithOptions{article}
> \ProvidesClass{foo}[2017/09/07 v0.1 test class]
> \RequirePackage[backend=biber]{biblatex}
>
> === foo.tex:
> \documentclass{foo}
> \addbibresource{bar.bib}
> \addbibresource{baz.bib}
> \begin{document}
> \end{document}
>
> === bar.bib:
> @article{smith,
>   author       = {John Smith},
>   title        = {Smith's Article},
>   year         = 2017,
>   title        = {Smith's Journal},
> }
>
> === baz.bib:
> @article{smythe,
>   author       = {Joan Smythe},
>   title        = {Smythe's Article},
>   year         = 2017,
>   title        = {Smythe's Journal},
> }
>
>
> I open foo.tex (using Emacs 25.2 and AUCTeX 11.91) and hit C-[.  The
> list of citation commands seems awfully short.  I hit enter.  I'm then
> prompted for a regular expression. If I enter "smith" then everything
> works fine and the citation is inserted. If I enter "smythe" then I get
> the message "No matches found".
>
> On the other hand, if I modify foo.tex so that it directly includes
> biblatex with \usepackage, then C-[ gives me the full range of citation
> commands, and the search is able to find both "smith" and "smythe".
>
> Is this a known issue?

Yes, see the first item of the list of known bugs:
https://www.gnu.org/software/auctex/manual/auctex.html#Bugs
Unfortunately, you can't have two files with the same basename, if you
expect to have a style file for both of them.  Thus, you have a style
file for the .tex file, but not for the .cls one.  The simplest
workaround is to change the basename of one of them.

Admittedly, this is the single most annoying bug in AUCTeX, and any
fix would be most probably breaking.

Bye,
Mosè



reply via email to

[Prev in Thread] Current Thread [Next in Thread]