如何在侧注中使用 \Cite 而不打印 URL?

如何在侧注中使用 \Cite 而不打印 URL?

我正在biblatex-chicago-notes与包结合使用sidenotes。对于我当前的项目,我使用了很多带有字段的在线文章URL。使用\Cite打印URL不仅在参考书目中,而且在文本边距中。为了节省空间并提高清晰度,我想省略URL边距中的字段,但不是在参考书目中(否则,我可以url=false在序言中使用)。所有当前的引用命令都biblatex-chicago不能满足这一需求。如何实现这一点?

梅威瑟:

\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}

答案1

您可以使用

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

删除 URL 并urldate按照说明进行引用如果使用 \fullcite,则无法删除 biblatex 中的多余字段

然而,这chicago-notes留下了一个虚假的逗号,这是因为宏在某些地方cjournal+issue+year+pages没有使用\setunits。为了解决这个问题,我们需要

\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}}}}}}

我们在s\addcomma\addspace中指示的行中包装了。\setunit

平均能量损失

\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}

在此处输入图片描述

相关内容