4

I am using the Chicago author/title footnote referencing system and would like to remove the publisher's address both from footnotes and bibliography (but without removing it from my library.) Here is the code:

\usepackage[notes,backend=biber,hyperref=false,giveninits=true]{biblatex-chicago}

\AtEveryBibitem{\clearfield{month}}
\AtEveryCitekey{\clearfield{month}}
\AtEveryBibitem{\clearfield{address}}
\AtEveryCitekey{\clearfield{address}}
\AtEveryBibitem{\clearfield{doi}}
\AtEveryCitekey{\clearfield{doi}}
\AtEveryBibitem{\clearfield{url}}
\AtEveryCitekey{\clearfield{url}}
\AtEveryBibitem{\clearfield{issn}}
\AtEveryCitekey{\clearfield{issn}}
\AtEveryBibitem{\clearfield{isbn}}
\AtEveryCitekey{\clearfield{isbn}}
\AtEveryBibitem{\clearfield{number}}
\AtEveryCitekey{\clearfield{number}}

The command \AtEveryBibitem and \AtEveryCitekey works for every other field indicated above, except the address.

6
  • 1
    It would help if you showed the code of a small document that gives the complete setup, and also showed a bib entry with an address that you want to suppress. Since you clear the address field: where do you put the publisher's address? Most people put it into the publisher field. Then it is difficult to split the information in this field.
    – gernot
    Mar 16, 2021 at 9:46
  • Use \clearlist{address} instead
    – Ivan
    Mar 16, 2021 at 11:15
  • Thanks. Using \clearlist{address} did not work. Here is a MWE as requested by gernot followed by an entry in the next comment. Clearing the url works. :\documentclass[a4,british,12pt]{article} \usepackage{ebgaramond} \usepackage[notes,backend=biber,hyperref=false,giveninits=true]{biblatex-chicago} \AtEveryBibitem{\clearfield{address}} \AtEveryCitekey{\clearfield{address}} \AtEveryBibitem{\clearfield{url}} \AtEveryCitekey{\clearfield{url}} \addbibresource{/Users/fabrec/Dropbox/LATEX/texmf/bibtex/library.bib}
    – Cecile
    Mar 16, 2021 at 13:38
  • @book{Gardner2018a, address = {Oxford}, author = {Gardner, John}, date-added = {2020-06-30 12:45:55 +0100}, date-modified = {2021-03-16 13:34:27 +0000}, publisher = {Oxford University Press}, shorttitle = {From Personal Life to Private Law}, title = {From Personal Life to Private Law}, url = {oxford.universitypressscholarship.com/view/10.1093/oso/…}, year = {2018}}
    – Cecile
    Mar 16, 2021 at 13:40
  • 1
    Consider accepting and upvoting the provided answer (it apparently was helpful for you) - this is common on this site. Mar 21, 2021 at 23:14

1 Answer 1

6

There are two issues here

  • address is just a convenience alias for BibTeX compatibility. Internally the field is called location (address is automatically converted to location by Biber), so if you want to delete the field on the biblatex side, you need to delete location and not address;
  • location (address) is a list and not a normal field, so you need to use \clearlist instead of \clearfield (biblatex has three field types: normal fields, lists and name lists, each of those types has its own \clear... command: \clearfield, \clearlist, \clearname, you can look up the type of a field in the biblatex documentation, §2.2.2 Database Guide > Entry Fields).

So

\AtEveryBibitem{\clearlist{location}}
\AtEveryCitekey{\clearlist{location}}

would work.

In this case, however, I think that the \clearfield/\clearlist approach is inferior to other approaches to delete fields.

Either use a Biber sourcemap (which comes in before the address->location remapping and thus needs to delete address and location)

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[notes, backend=biber, giveninits=true]{biblatex-chicago}

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldset=month, null]
      \step[fieldset=address, null]
      \step[fieldset=location, null]
      \step[fieldset=doi, null]
      \step[fieldset=url, null]
      \step[fieldset=isbn, null]
      \step[fieldset=number, null]
    }
  }
}

\begin{filecontents}{\jobname.bib}
@book{Gardner2018a,
  address   = {Oxford},
  author    = {Gardner, John},
  publisher = {Oxford University Press},
  title     = {From Personal Life to Private Law},
  doi       = {10.1093/oso/9780198818755.001.0001}, 
  year      = {2018},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,Gardner2018a}

\printbibliography
\end{document}

Gardner, J. From Personal Life to Private Law. Oxford University Press, 2018.

Or delete the fields when they are read from the .bbl file with \DeclareFieldInputHandler.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[notes, backend=biber, giveninits=true]{biblatex-chicago}

\DeclareFieldInputHandler{month}{%
  \def\NewValue{}}
\DeclareFieldInputHandler{doi}{%
  \def\NewValue{}}
\DeclareFieldInputHandler{url}{%
  \def\NewValue{}}
\DeclareFieldInputHandler{isbn}{%
  \def\NewValue{}}
\DeclareFieldInputHandler{number}{%
  \def\NewValue{}}
\DeclareListInputHandler{location}{%
  \def\NewValue{}}

\begin{filecontents}{\jobname.bib}
@book{Gardner2018a,
  address   = {Oxford},
  author    = {Gardner, John},
  publisher = {Oxford University Press},
  title     = {From Personal Life to Private Law},
  doi       = {10.1093/oso/9780198818755.001.0001}, 
  year      = {2018},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,Gardner2018a}

\printbibliography
\end{document}

The output is the same.

2
  • See also tex.stackexchange.com/q/491887/35864
    – moewe
    Mar 16, 2021 at 16:31
  • Wonderful, thanks! Both solutions worked but I’m going to go with the Biber source map. Feels more elegant somehow. Cecile
    – Cecile
    Mar 16, 2021 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .