13

Is it possible for auctex to display missing references differently to ones which are in the bib file? Currently, all references look identical so it's impossible to tell at a glance which citation keys are defined in the bib file, and which are not. Texstudio does this quite nicely.

book.tex:

\documentclass{book}
\usepackage[backend=biber]{biblatex}
\addbibresource{bib.bib}

\begin{document}
This reference exists \autocite{ref1}.
This reference does not \autocite{ref2}.
% A squiggle, red, anything different to show "ref2" differently to "ref1" would be lovely.
\end{document}

book.bib:

@misc{ref1, ...}
nyameko
  • 545
  • 2
  • 15
cazgp
  • 231
  • 1
  • 3
  • 2
    If you use RefTeX you'll never mistype a reference!!! Jokes apart, I'd suggest you to raise this suggestion to the AUCTeX mailing list, even though I'm not sure it could be easy to do: auctex-devel@gnu.org – giordano Dec 09 '15 at 08:53

1 Answers1

2

In a similar approach to @giordano, I would suggest you have a look at the excellent Org-Ref, which is a collection of org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools; together with Helm-Bibtex, which can be used in unison with org-ref to search and manage your bibliographies.

With your insert reference or citation, etc, bound to helm-bibtex you will now be given a list of options from entries that exist in you bibliographies .bib file.

In particular, should you also decide to author you LaTeX documents in org-mode files, using org-ref and highlight non-existant references, citations or bibliogoraphy files, it will notify you with a File does not exist, warning in the modeline.

nyameko
  • 545
  • 2
  • 15
  • 1
    This does not seem to answer the question. Reftex also provides modeline information when point is over a citation, but it doesn't help to distinguish, at a glance, those mistyped citations or those which need to be added to the bib file. – T. Verron Jan 30 '17 at 11:10
  • 1
    That's already the set-up I use. It does not answer the question. However, this is a useful tip in general. – cazgp Jan 30 '17 at 22:27
  • 2
    org-ref provides a command: M-x org-ref which will make a list of bad citation keys (also duplicate labels, and bad refs) that you can select and jump to. It isn't realtime, e.g. red squiggles under bad keys as you type them though. – John Kitchin Mar 04 '17 at 18:23
  • Org-ref now shows bad citations in red so it easy to see bad ones. – John Kitchin Jul 31 '17 at 12:13