Skip to main content
Share Your Experience: Take the 2024 Developer Survey
3 of 4
added 1771 characters in body

Automatic citation in list of figures

I'm using biblatex with biber as backend. I want to create citations for my figures by using a \cite command, but surpress any output of it in the caption of a figure or in the footnotes of the respective page.

Instead the citation (including a page number) should be printed only in the \listoffigures, ideally instead of the caption. I'm using the style verbose-ibid. I'd like the references in the list of figures to be printed in the abbreviated form of that style by default. The cited book should be added to the bibliography as well, if it wasn't cited before in the text.

What I'm doing so far:

Placing the \cite command inside [] of \caption[]{} to avoid any output of the citation on the page of the figure and to print the citation inside the list of figures. The cited book gets also added to the bibliography.

Everythings just fine except for the citation style inside the list of figures (always prints full citation).

Any ideas how to achieve the abbreviated citation style in list of figures by default? Is there an overall better approach to this than mine?

MWE:

\documentclass{article}
\usepackage{graphicx}
\usepackage[backend=biber,style=verbose-ibid,hyperref=false]{biblatex}
\addbibresource{mwe.bib}

\begin{filecontents}{mwe.bib}
@Book{knuth1986,
    Title                    = {The \TeX book},
    Author                   = {Donald~Ervin Knuth},
    Publisher                = {Addison-Wesley},
    Year                     = {1986}
}
\end{filecontents}

\begin{document}

\begin{figure}
    \centering
    \includegraphics{example-image-a}
    \caption[{\cite[][5]{knuth1986}}]{This is a caption}
\end{figure}

\printbibliography
\listoffigures
\end{document}

EDIT: I tried implementing the proposed short citation code, and it generally works, however in my specific use case I still encountered some weird problems:

If a bibliography entry wasn't cited before in normal text, it won't print the proper citation, only the label (?!) of the bibliography entry in bold. I can cite it before in normal text inside a \phantom enviroment to avoid this, but that's definitely not a nice solution.

In the MWE you can observe the same bug when you try citing more than one entry:

\documentclass{article}
\usepackage{graphicx}
\usepackage[backend=biber,style=verbose-ibid,hyperref=false]{biblatex}
\addbibresource{mwe.bib}

\begin{filecontents}{mwe.bib}
@Book{knuth1986,
    Title                    = {The \TeX book},
    Author                   = {Donald~Ervin Knuth},
    Publisher                = {Addison-Wesley},
    Year                     = {1986}
}
@Book{test,
    Title                    = {The \TeX book},
    Author                   = {Donald~Ervin Knuth},
    Publisher                = {Addison-Wesley},
    Year                     = {1986}
}
\end{filecontents}

\begin{document}

\begin{figure}
    \centering
    \includegraphics{example-image-a}
    \caption[{\cite[][5]{knuth1986}}]{This is a caption}
\end{figure}

\begin{figure}
    \centering
    \includegraphics{example-image-a}
    \caption[{\cite[][5]{test}}]{This is a caption}
\end{figure}

\printbibliography
\listoffigures
\end{document}

It's all rather weird, if anyone knows a generally better approach to my original problem, please help me out.