auctex
[Top][All Lists]
Advanced

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

Re: No valid bibliography in this document


From: Arash Esbati
Subject: Re: No valid bibliography in this document
Date: Mon, 16 Mar 2020 21:10:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50

Hi Jobst,

"Hoffmann, Jobst" <address@hidden> writes:

> I'm using the current AUCTeX from git://git.savannah.gnu.org/auctex and
> I try to use \cite for inserting citations.

The issue you describe below is created by RefTeX.  Since RefTeX is
bundled with Emacs itself, the question is which Emacs version you're
using?  I tried your example below with current Emacs from git with no
problem.

> The file below compiles perfectly with C-c C-a
>
> tst_01.tex
> ~~~~~~~~~~
> \documentclass{article}
> \usepackage[backend=biber]{biblatex}
> \addbibresource{biblatex-examples_short.bib}
> \begin{document}
> \cite{aristotle:anima}
>
> \printbibliography
> \end{document}
> ~~~~~~~~~~~

This is the document I tried:

tst_01.tex
--8<---------------cut here---------------start------------->8---
\documentclass{article}

\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-example_short.bib}

\begin{document}

\cite{baez/article} and \cite{aristotle:anima} and
\cite{aristotle:anima} or \cite{baez/article}.

\begin{verbatim}
(reftex-get-bibfile-list)
\end{verbatim}

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---

I tried both `C-c C-m cite RET' and `C-c [ RET', without problem.

> When I try to insert the second citation by using the \cite command, an
> error occurs in the minibuffer:
> No valid bibliography in this document, and no default available

What do you see if you put the cursor after (reftex-get-bibfile-list)
and hit `C-x C-e'?  If nothing, can you select from the menu

    Ref->Parse Document->Entire Document

and try it again?

> In the Messages buffer I can rad the following line:
>
> reftex-offer-bib-menu: No valid bibliography in this document, and no
> default available
>
> My .emacs contains the following lines concerning the RefTeX
> ~~~~~~~~~~~

Please also add:

(add-hook 'LaTeX-mode-hook #'turn-on-reftex)
> (setq reftex-plug-into-AUCTeX t)
> (setq reftex-bibliography-commands '("bibliography"
>                                      "nobibliography"
>                                      "addbibresource"))
> (setq reftex-external-file-finders
>       '(("tex" . "kpsewhich -format=.tex %f")
>         ("bib" . "kpsewhich -format=.bib %f")))

This is actually the default, you can remove this.

> ~~~~~~~~~~~
>
> What am I missing?

Hopefully we will find out :)

Best, Arash



reply via email to

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