在同一文档中使用 biblatex 进行部分和完整引用

在同一文档中使用 biblatex 进行部分和完整引用

嗯,这可能是一个奇怪的问题,但问题如下:

我正在写一组文章,其中一些带有参考文献,因为我使用 Tufte LaTeX 来撰写它们。因此,这个类使用将参考文献作为旁注引用。在我看来,这是一个很好的功能,但问题是当 PDF 输出显示所引用的每个参考文献的所有信息时,有时带有旁注的边距会包含过多的信息。

我认为一个好的解决方案是只在旁注中打印作者姓名、书名和年份,当然不是按这个顺序。并在文章末尾打印包含所有信息的整个参考书目,包括 ISBN、页码、URL 以及我们可以添加到参考文献中的所有额外信息。

所以我的问题是,有什么方法可以用 biblatex 来实现这一点?

我的代码:

\PassOptionsToPackage{usenames,dvipsnames,table}{xcolor}
\documentclass[twoside,symmetric,nobib]{tufte-handout} %
\usepackage{etex}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{marginfix}
\usepackage[style=american]{csquotes}
\usepackage[autocite=footnote,%
backend=biber,%
date=short,%
style=verbose-inote,%
url=false]%
{biblatex} 
\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldset=doi null]
    }
  }
}
\addbibresource{getrification.bib}
\begin{document}

\newthought{This is an essay about technology}, power relations, and basic
 dignity.  It is about the commercialization of online platforms and the 
difficulties of retaining individual power and autonomy online.  It is about
 the gentrification of the internet. When I call the internet gentrified, I’m
 describing shifts in power and control that limit what we can do online. I’m 
also calling out an economy and industry that prioritize corporate profits 
over the public good and pointing to the ways that some forms of online 
behavior have become the  \enquote{right} way to use the Web, while other 
forms of behavior get labeled backward or out of date. In the early days, the
 Web was driven by experiments in technology, DIY community-building and 
curiosity around connecting with strangers from across the world. The Web we 
have now is guided by different principles, like business models that rely on
 a  constant transfer of data \autocite{Tufecki2018} from people to 
marketers, social norms of consumption\autocite{Mammoser2018} and self-
promotion\autocite{Marwick2015}, and black boxing\autocite{Pasquale2015} the
 algorithms that structure the platforms we use. The internet is increasingly 
making us more isolated, less democratic, and beholden to major corporations
 and their shareholders. In other words, the internet is increasingly 
gentrified.

\printbibliography
\end{document}

所引参考文献:

@Online{Tufecki2018,
  author = {Tufecki, Zeynep},
  editor = {{The New York Times}},
  title  = {The Latest Data Privacy Debacle},
  date   = {2018-01-30},
  url    = {https://www.nytimes.com/2018/01/30/opinion/strava-privacy.html},
}

@Online{Mammoser2018,
  author   = {Mammoser, Giger},
  editor   = {Healthline},
  title    = {The FOMO Is Real: How Social Media Increases Depression and Loneliness},
  date     = {2018-12-09},
  url      = {https://www.healthline.com/health-news/social-media-use-increases-depression-and-loneliness},
  subtitle = {New research reveals how social media platforms like Facebook can greatly affect your mental health},
}

@Book{Marwick2015,
  author    = {Marwick, Alice E.},
  title     = {Status Update},
  year      = {2015},
  subtitle  = {Celebrity, Publicity, and Branding in the Social Media Age},
  publisher = {Yale University Press},
  isbn      = {9780300209389},
  url       = {https://yalebooks.yale.edu/book/9780300209389/status-update},
  urldate   = {2019-07-03},
}

@Book{Pasquale2015,
  author    = {Pasquale, Frank},
  title     = {The Black Box Society},
  year      = {2015},
  subtitle  = {The Secret Algorithms That Control Money and Information},
  isbn      = {9780674368279},
  pagetotal = {320},
  url       = {http://www.hup.harvard.edu/catalog.php?isbn=9780674368279},
  urldate   = {2019-07-03},
}

答案1

至少有三种方法可以解决这个问题。

  1. \AtEveryCitekey{...}使用、和删除您不想看到的字段\clearfield\clearlist\clearname

  2. 使用不同的样式(style=authortitle)并修补其 cite 命令以便向引用添加更多字段。

  3. 定义一个新的自定义引用命令,仅打印您想要查看的信息。

1. 使用以下方式删除引文中的字段\AtEveryCitekey

如果你没有那么多想要在引用中隐藏的字段,那么只需发出相关\clear...命令\AtEveryCitekey并继续使用\fullcite/ \autocite/ verbose-\cite

\AtEveryCitekey{%
  \clearfield{url}%
  \clearfield{subtitle}%
  \clearname{editor}%
  \clearlist{organization}%
}

请注意,您需要知道类型(场地列表名单)) 来删除要删除的字段。类型列在数据库指南biblatex手动的

例如另请参阅我需要做一个稍微少于 \fullcite

\documentclass[twoside,symmetric,nobib]{tufte-handout}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{marginfix}
\usepackage[style=american]{csquotes}
\usepackage[backend=biber,
  style=verbose-inote,
  autocite=footnote,
  date=short,
  url=false]{biblatex}

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

\AtEveryCitekey{%
  \clearfield{url}%
  \clearfield{subtitle}%
  \clearname{editor}%
  \clearlist{organization}%
  \clearlist{publisher}%
  \clearlist{location}%
}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem\autocite{sigfridsson}
ipsum\autocite{cicero}
dolor\autocite{worman}
sit\autocite{markey}

\printbibliography
\end{document}

“南希·沃曼。人物角色。2002 年。”但:“艾玛·西格弗里德森和乌尔夫·赖德。“从电势和电矩推导原子电荷的方法比较”。在:《计算化学杂志》19.4(1998 年),第 377-395 页。”

如您所见,打印的引文仍然非常冗长,因此清除的字段列表可能会很长。如果您想快速隐藏少数字段,这是一个很好的解决方案,但对于样式来说verbose,事情会变得混乱。

2. 将字段添加为不同的样式

在某种程度上,这是 1 的补充。不要要求biblatex打印verbose引用并删除信息,而是要求它打印authortitle引用并修补命令以添加信息。这在Beamer:如何将“年份”信息添加到 footcite?

\documentclass[twoside,symmetric,nobib]{tufte-handout}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{marginfix}
\usepackage[style=american]{csquotes}
\usepackage[backend=biber,
  style=authortitle,
  autocite=footnote,
  date=short,
  url=false]{biblatex}

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

\usepackage{xpatch}
\xpatchbibmacro{cite}
  {\usebibmacro{cite:title}}
  {\usebibmacro{cite:title}%
   \setunit{\addcomma\space}%
   \usebibmacro{date}}
   {}
   {}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem\autocite{sigfridsson}
ipsum\autocite{cicero}
dolor\autocite{worman}
sit\autocite{markey}

\printbibliography
\end{document}

Sigfridsson 和 Ryde,“从电势和电矩推导原子电荷的方法比较”,1998 年。//Cicero,De natura deorum,1995 年。

当然,修补依赖于宏的内部结构,并且并不总是像人们希望的那样灵活。

3. 定义新的引用命令

也可以看看简洁的 \fullcite 命令

这是最稳定的解决方案,并且不会影响所有其他 cite 命令。

\documentclass[twoside,symmetric,nobib]{tufte-handout}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{marginfix}
\usepackage[style=american]{csquotes}
\usepackage[backend=biber,
  style=verbose-inote,
  date=short,
  url=false]{biblatex}

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

\newbibmacro*{fajycite}{%
  \iffieldundef{shorthand}
    {\printtext[bibhyperref]{%
       \printnames{labelname}%
       \setunit*{\printdelim{nametitledelim}}%
       \printfield[citetitle]{labeltitle}%
       \setunit*{\addcomma\space}%
       \printdate}}
    {\usebibmacro{cite:shorthand}}}

\DeclareCiteCommand{\fajycite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{fajycite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareMultiCiteCommand{\fajycites}[\mkbibfootnote]{\ajycite}{\multicitedelim}

\DeclareAutoCiteCommand{fajy}{\fajycite}{\fajycites}

\ExecuteBibliographyOptions{autocite=fajy}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem\autocite{sigfridsson}
ipsum\autocite{cicero}
dolor\autocite{worman}
sit\autocite{markey}

\printbibliography
\end{document}

Sigfridsson 和 Ryde,“从电势和电矩推导原子电荷的方法比较”,1998 年。//Cicero,De natura deorum,1995 年。

相关内容