2

The is a MWE:

\documentclass{article}
\usepackage[]{biblatex}
\addbibresource{my.bib}

\begin{document}
test \autocite{not-exist-bib-citekey}
\end{document}

In the resulting pdf, you can see that "not-exist-bib-citekey" is in bold font.

I want to style it, for example, with red color, so as to make it more distinct.

2

Following Wanted: question mark instead of bibtex key for missing citations (biblatex) the macro \abx@missing@entry was introduced. \abx@missing@entry is used to typeset missing entry keys, it defaults to \abx@missing, which is used for all kinds of missing things (mainly bibstrings).

So if you only want to influence missing entry keys, go with

\documentclass{article}
\usepackage{xcolor}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\makeatletter
\protected\def\abx@missing@entry#1{%
  \mbox{\reset@font\color{red}??#1??}}
\makeatother

\begin{document}
test \autocite{missing-key}
\end{document}

"test [??missing-key??]", the part in the square brackets is shown in bold red

For most intents and purposes, this will give the same results as changing \abx@missing and one may even want to make missing bibstrings and other similar issues pop with red colour as well...

2

BibLaTeX uses \abx@missing to print missing citation entries. You just need to redefine it:

\documentclass{article}
\usepackage{xcolor}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\makeatletter
\protected\def\abx@missing#1{%
  \mbox{\reset@font\color{red}#1}}
\makeatother

\begin{document}
test \autocite{not-exist-bib-citekey}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.