
Ich möchte das author
Feld eines Biblatex-Eintrags in einem bestimmten \cite
Befehl löschen (als hätte es überhaupt keinen Autor), ihn aber trotzdem in der Bibliografie aufgeführt haben.
Ich brauche das, weil die Abbildungen meine Originalarbeiten sind und die Wiederholung meines Namens in den Zitaten selbst ungünstig ist. Im Wesentlichen also:
\begin{figure}[!hbt]
\centering
\includegraphics[width=300px]{image.jpg}
\caption{\cite[]{the-biblatex-entry}} % *shouldn't* produce my name, only title, date, etc...
\end{figure}
\printbibliography % *should* produce my name, along with title, date, etc...
Ich habe kein Problem damit, einen anderen Befehl als zu verwenden \cite
. Ich hätte wirklich gerne einen \citenoauthor
Befehl, wenn ich nur wüsste, wie man ihn ausführt.
EDIT: hier ist ein MWE
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{example.bib}
@book{somebook,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}
\usepackage[style=verbose,backend=bibtex]{biblatex} %backend tells biblatex what you will be using to process the bibliography file
\bibliography{example}
\begin{document}
\cite{somebook} % I'd like this to not include the author, only the other fields
\printbibliography % All the fields, please
\end{document}
Antwort1
Das \caption
Problem kann durch eine umsichtige Verwendung von behoben werden, \protect
oder Sie können Ihren eigenen „robusten“ Befehl mit etoolbox
„s“ definieren \newrobustcmd
( biblatex
erfordert und lädt etoolbox
standardmäßig). Das heißt:
\caption{%
\AtNextCitekey{\protect\clearname{author}}%
\cite{somebook}}
oder:
\newrobustcmd{\hlcite}[1]{%
\AtNextCitekey{\clearname{author}}%
\cite{#1}}
Vollständiges Beispiel:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{example.bib}
@book{somebook,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}
\usepackage[style=verbose,backend=bibtex]{biblatex}
%\bibliography{example}% <-- deprecated
\addbibresource{example.bib}
\usepackage{caption}
\newrobustcmd{\hlcite}[1]{%
\AtNextCitekey{\clearname{author}}%
\cite{#1}}
\begin{document}
\begin{figure}
\rule{3cm}{3cm}
\caption{%
\AtNextCitekey{\protect\clearname{author}}%
\cite{somebook}}
\end{figure}
\begin{figure}
\rule{3cm}{3cm}
\caption{\hlcite{somebook}}
\end{figure}
\printbibliography
\end{document}