I have migrated recently to biblatex and am trying to understand the many possibilities to tune and tweak the appearance of references in the bibliography. For example, for a work in a collection with a certain volume entry, I want to change the appearance of this volume in the bibliography.
I came along the renewbibmacro construction. Hence I added in the preamble of my document
\renewbibmacro*{volume}{%
\printtext{VOLUMEMACRO}\space\printfield{volume}%
}%
This didn't result in anything, whereas using the DeclareFieldFormat did work:
\DeclareFieldFormat{volume}{\printtext{VOLUMEDECLARE} #1}
However, it didn't apply to the volume field in the article. When I used the renewbibmacro for author, it did work for an article:
\renewbibmacro*{author}{%
\printtext{anon}%
}
I have searched this forum, as well as the biblatex manual, but could not find a concise overview on how to use these renewbibmacro and DeclareFieldFormat functions. Hence I am posting this myself. So I am interested to learn about the usage of this constructions, and what fields can and cannot be changed this way.
A MWE that shows that the DeclareFieldFormat for volume applies to the collection only, and that the renewbibmacro for author works:
\documentclass[10pt, english]{report}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear]{biblatex}
\begin{filecontents}{abib.bib}
@article{some:article:1964,
author = "Mister Smart",
title = {A very difficult narrative of sub-atomic particles in the diary of Louis XIV},
journal = {Journal for Advanced Thinking},
volume = "41",
number = "3",
year = "1964",
pages = "307--323"
}
@collection{collection:mass:histroical:vol1,
options = useeditor,
title = {Collections of the Massachusetts Historical Society},
volume = {i},
series = {third series},
address = {Boston},
year = 1896,
sorttitle = {Collections of the Massachusetts Historical Society},
shorthand = {Collections MHS Vol.~1},
publisher = {Massachusetts Historical Society}
}
\end{filecontents}
\addbibresource{./abib.bib}
\DeclareFieldFormat{volume}{\printtext{VOLUMEDECLARE} #1}
%\newbibmacro*{volume}{%
% \printtext{VOLUMEMACRO}\space\printfield{volume}%
%}%
\renewbibmacro*{author}{%
\printtext{anon}%
}
\begin{document}
Test ~\textcite{some:article:1964} and~\textcite{collection:mass:histroical:vol1}.
\printbibliography
\end{document}
author,volume,title) in an entry type would have the same interface functions for making changes. Now I look further in thebiblatexmanual, the difference between alistentry asauthorand afieldentry asvolumebecome clear. My example forauthorwas just an experiment to see if I could change theauthorfield this way. – wdrenth Jul 12 '14 at 17:55