2

I have a .bib file that includes pagetotal information. How do I surpress that information from being printed when I compile my document.

This is the inverse of the problem here, from which I use the example below

Bibliography Total pages?

\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  pagetotal = {999},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
Jordan
  • 87

1 Answers1

2

There are two easy ways of doing this:

  1. You can use a source map to delete the pagetotal field from every entry in your bib file on the fly. I prefer this as the field will never reach biblatex.

    \DeclareSourcemap{
      \maps{
        \map{
          \step[fieldset=pagetotal, null]
        }
      }
    }
    
  2. You can clear the field at every bibliography item. This will still leave the field available in citations (although it can be cleared there too).

    \AtEveryBibitem{\clearfield{pagetotal}}
    

MWE

You only need one of the options.

\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  pagetotal = {999},
}
\end{filecontents}
\addbibresource{\jobname.bib}
% Option 1: Delete pagetotal field from every entry in bib file
\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldset=pagetotal, null]
    }
  }
}
% Option 2: Clear pagetotal field at every bibliography item
\AtEveryBibitem{\clearfield{pagetotal}}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
David Purton
  • 25,884