1

I would like to have a bibliography without the author names (in case you are wondering, this is for part of a bibliography in a CV). I've tried to used the clearlist command but I guess I am using it wrong.

Here is my MWE which I compiled with xelatex - biber - xelatex - xelatex:

\documentclass{article}
\usepackage[style=authoryear,maxbibnames=99]{biblatex}
\usepackage{hyperref}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % to create a file when first processed % \begin{filecontents}[<options>]{<filename>} % possible options: overwrite, nosearch, noheader \begin{filecontents}{bib_2ndtry.bib} @misc{A2020, author = {Author, A. and Author, B. and Author C.}, year = {2020}, title = {Alpha}, } @misc{B2021, author = {Buthor, A.}, year = {2021}, title = {Bravo}, } @misc{C2022, author = {Cuthor, A. and Cuthor, B. and Cuthor, C.}, year = {2022}, title = {Charlie}, } \end{filecontents} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% modifying bibliography items (well, trying to) \AtEveryBibitem{ \clearlist{author} }

\addbibresource{bib_2ndtry.bib}

\begin{document} \nocite{*} \printbibliography \end{document}

In the final pdf, the authors are still included, see the attached image:

final pdf

What am I missing?

Alf
  • 467

2 Answers2

3

To do this with a sourcemap, put this in your preamble:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
     \step[fieldset=author, null]
   }
 }
}

This will remove all author fields from every cited entry before biblatex even sees the data. You can conditionalise this in arbitrary ways - just remove in certain entry types, just remove when certain other fields are present etc. by adding to this example. For example to only remove author fields in misc entry types, do:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{misc}
      \step[fieldset=author, null]
   }
 }
}
PLK
  • 22,776
  • Well, this was easier than I thought - just not clear to me which solution is "better" but I guess it depends on the use-case. – Alf Sep 12 '22 at 19:15
1

After reading the official biblatex documentation, I found the answer to my question: I need to replace \clearlist{author} by \clearname{author}.

Alf
  • 467
  • 1
    Or you can use a sourcemap (see docs) to remove the field before biber/biblatex even process the .bib – PLK Sep 09 '22 at 18:51
  • @PLK am I right that you are referring to \DeclareSourcemap ? (which looks more complicated to me, i.e. I haven't been able to use it to remove the author field yet...) – Alf Sep 12 '22 at 07:12