TransWikia.com

biblatex/ no pagetotal in footnotes

TeX - LaTeX Asked by happybobby on December 29, 2020

I’m working with

usepackage[maxlevel=3]{csquotes}
usepackage[backend=biber, citestyle=verbose-trad2, bibstyle=verbose-trad2, citepages=omit]{biblatex}

I don’t want to show pagetotal for books in the footnotes, but only in the final bibliography. I know that I can use the authortitle style but I need to keep the following fields: adress, publisher and year.

Does someone know how I can get that with XeLaTeX?

One Answer

The following modification of the cite:full:citepages macro for citepages=omit will always suppress pagetotal in citations.

documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}

usepackage[backend=biber, style=verbose-trad2, citepages=omit]{biblatex}

renewbibmacro*{cite:full:citepages}{%
  clearfield{pagetotal}%
  ifboolexpr{
    test {ifnumequal{value{citecount}}{value{citetotal}}}
    and
    test {iffieldpages{postnote}}
  }
    {clearfield{pages}}
    {}}%

addbibresource{biblatex-examples.bib}

begin{document}
lorem autocite{companion}

ipsum autocite{sigfridsson}

printbibliography
end{document}

Michel Goossens, Frank Mittelbach and Alexander Samarin. The LaTeX Companion. 1st ed. Reading, Mass.: Addison-Wesley, 1994.

A slightly quicker alternative that is not restricted to just the cases where it is necessary to delete the field would be

AtEveryCitekey{clearfield{pagetotal}}

if you don't need the field at all, use

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

Correct answer by moewe on December 29, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP