2

I am using biblatex-chicago-notes in combination with the sidenotes package. For my current project I am using quite a lot of online articles with an URL field. The use of \Cite prints the URL not only in the bibliography but also in the text margin. In order to save space and improve the clarity I would like to omit the URL field in the margins but not in the bibliography (otherwise, I could have used url=false in the preamble). All current citation commands in biblatex-chicago do not fullfill that need. How can this be achieved?

MWE:

\documentclass{scrartcl}

\usepackage[notes]{biblatex-chicago}
\usepackage{sidenotes}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{article:poole2001,
author          = {Poole, Steven},
title           = {Trigger Happy: Videogames and the Entertainment Revolution},
date            = {2008-01-15},
abstract        = {2001 edition, with 2004 afterword},
url             = {http://stevenpoole.net/blog/trigger-happier/},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Lorem ipsum.\sidenote{\Cite{{article:poole2001}}

\printbibliography

\end{document}
2

1 Answer 1

2

You can use

\AtEveryCitekey{\clearfield{url}\clearfield{urlyear}}

to get rid of the URL and urldate in citations as explained in Excessive fields in biblatex could not be removed if using \fullcite.

With chicago-notes that leaves a spurious comma, however, this is due to the macro cjournal+issue+year+pages not using \setunits in certain places. To fix that we need

\renewbibmacro*{cjournal+issue+year+pages}{%
  \usebibmacro{cjournal+ser+vol+num}%
  \ifboolexpr{% 16th ed.
    test {\iffieldundef{issue}}%
    and
    test {\iffieldundef{year}}%
    and
    not togl {cms@switchdates}%
  }%
  {\iffieldundef{number}%
    {\ifthenelse{\iffieldundef{pagination}\AND%
        \iffieldundef{bookpagination}}%
      {\setunit{\postvolpunct}}%
      {\setunit{\addcolon\addspace}}}%
    {\setunit{\addcomma\addspace}}}%<---- here
  {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
    {\newcunit%
      \iffieldundef{issue}
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}%
      \setunit{\addcomma\addspace}}%<--- here
    {\setunit{\addspace}%
    \printtext[parens]{% parens is the default here
      \iffieldundef{issue}
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}}}}}

Where we wrapped the \addcomma\addspace in the indicated lines in \setunits.

MWE

\documentclass{scrartcl}
\usepackage[marginparwidth=5cm, 
            margin=6cm,
            ]{geometry}

\usepackage[notes]{biblatex-chicago}
\usepackage{sidenotes}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{article:poole2001,
author          = {Poole, Steven},
title           = {Trigger Happy: Videogames and the Entertainment Revolution},
date            = {2008-01-15},
abstract        = {2001 edition, with 2004 afterword},
url             = {http://stevenpoole.net/blog/trigger-happier/},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\AtEveryCitekey{\clearfield{url}\clearfield{urlyear}}

\renewbibmacro*{cjournal+issue+year+pages}{%
  \usebibmacro{cjournal+ser+vol+num}%
  \ifboolexpr{% 16th ed.
    test {\iffieldundef{issue}}%
    and
    test {\iffieldundef{year}}%
    and
    not togl {cms@switchdates}%
  }%
  {\iffieldundef{number}%
    {\ifthenelse{\iffieldundef{pagination}\AND%
        \iffieldundef{bookpagination}}%
      {\setunit{\postvolpunct}}%
      {\setunit{\addcolon\addspace}}}%
    {\setunit{\addcomma\addspace}}}%<---- here
  {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
    {\newcunit%
      \iffieldundef{issue}
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}%
      \setunit{\addcomma\addspace}}%<--- here
    {\setunit{\addspace}%
    \printtext[parens]{% parens is the default here
      \iffieldundef{issue}
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}}}}}

\begin{document}

Lorem ipsum.\sidenote{\Cite{article:poole2001}}

Dolor\sidenote{\Cite{sigfridsson}}

\end{document}

enter image description here

You must log in to answer this question.

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