TransWikia.com

Why isn't clearfield suppress issue number in footnotes in Biblatex?

TeX - LaTeX Asked by ezgranet on January 27, 2021

The clearfieldcommand should suppress issue numbers globally in biblatex, but in my MWE below, it only suppressed the issue number in the bibliography, and it ghostly reappears in the footnote. Why is this and how can I suppress the issue number everywhere?

documentclass{article}
usepackage[british]{babel}
usepackage[autostyle]{csquotes}
usepackage[style=oscola,backend=biber,ibidtracker=true,ibidstyle=lc,giveninits,ecli=true]{biblatex}
AtEveryBibitem{%
ifentrytype{article}{
    clearfield{issue}%
    clearfield{number}%
}{}}
addbibresource{mylibrary.bib}
begin{filecontents}{mylibrary.bib}
@article{VanderMeulen2013,
author = {van der Meulen, Bernd},
doi = {10.3390/laws2020069},
issn = {2075-471X},
journal = {Laws},
number = {2},
pages = {69--98},
title = {{The Structure of European Food Law}},
volume = {2},
year = {2013}
}

end{filecontents}
begin{document}
    A sentence.autocites{VanderMeulen2013}
    
    printbibliography
end{document}

an annoyingly wrong footnote

One Answer

AtEveryBibitem applies only to the bibliography. If you need your clearfields to apply to citations as well, you can use AtEveryCitekey. But of course that doubles the lines of code you have to write.

documentclass{article}
usepackage[british]{babel}
usepackage[autostyle]{csquotes}
usepackage[backend=biber,
  style=oscola,
  giveninits,
  ibidtracker=true, ibidstyle=lc,
  ecli=true,
]{biblatex}

AtEveryBibitem{%
  ifentrytype{article}
    {clearfield{issue}%
     clearfield{number}}
    {}}
AtEveryCitekey{%
  ifentrytype{article}
    {clearfield{issue}%
     clearfield{number}}
    {}}

begin{filecontents}{jobname.bib}
@article{VanderMeulen2013,
  author  = {van der Meulen, Bernd},
  doi     = {10.3390/laws2020069},
  issn    = {2075-471X},
  journal = {Laws},
  number  = {2},
  pages   = {69--98},
  title   = {The Structure of {European} Food Law},
  volume  = {2},
  year    = {2013},
}
end{filecontents}
addbibresource{jobname.bib}

begin{document}
  A sentence.autocites{VanderMeulen2013}
    
  printbibliography
end{document}

In order to completely remove fields from the output I usually prefer a sourcemap solution that deletes the fields when they are read from the .bib file.

documentclass{article}
usepackage[british]{babel}
usepackage[autostyle]{csquotes}
usepackage[backend=biber,
  style=oscola,
  giveninits,
  ibidtracker=true, ibidstyle=lc,
  ecli=true,
]{biblatex}

DeclareSourcemap{
  maps[datatype=bibtex]{
    map{
      pertype{article}
      step[fieldset=number, null]
      step[fieldset=issue, null]
    }
  }
}

begin{filecontents}{jobname.bib}
@article{VanderMeulen2013,
  author  = {van der Meulen, Bernd},
  doi     = {10.3390/laws2020069},
  issn    = {2075-471X},
  journal = {Laws},
  number  = {2},
  pages   = {69--98},
  title   = {The Structure of {European} Food Law},
  volume  = {2},
  year    = {2013},
}
end{filecontents}
addbibresource{jobname.bib}

begin{document}
  A sentence.autocites{VanderMeulen2013}
    
  printbibliography
end{document}

B van der Meulen, ‘The Structure of European Food Law’ (2013) 2 Laws 69.

Correct answer by moewe on January 27, 2021

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