Gostaria de descartar o author
campo de uma entrada do biblatex em um \cite
comando específico (como se não tivesse autor algum), mas ainda assim listá-lo na biliografia.
Preciso disso porque as figuras são meus trabalhos originais, e repetir meu nome nas próprias citações é estranho. Então, basicamente:
\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...
Estou bem em usar algum outro comando diferente de \cite
. Eu realmente gostaria de ter um \citenoauthor
comando se soubesse como fazê-lo.
EDITAR: aqui está um 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}
Responder1
O \caption
problema pode ser corrigido com um uso criterioso \protect
ou você pode definir seu próprio comando 'robusto' com etoolbox
's \newrobustcmd
( biblatex
requer e carrega etoolbox
por padrão). Aquilo é:
\caption{%
\AtNextCitekey{\protect\clearname{author}}%
\cite{somebook}}
ou:
\newrobustcmd{\hlcite}[1]{%
\AtNextCitekey{\clearname{author}}%
\cite{#1}}
Exemplo completo:
\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}