引用文中的所有参考文献

引用文中的所有参考文献

我想用单个命令(例如\cite{*})引用文中的所有作品,最好按字母顺序排列。

需要澄清的是:我不希望参考文献仅出现在参考书目中(因为这可以通过命令实现\nocite{*}),并且我不想在命令中粘贴所有 bibkeys。

有什么想法如何实现这一点吗?

答案1

使用biblatexUlrike Fischer 的citeall包裹。

只需输入\citeall引用所有来源。如果您想使用不同于 的命令\cite,请使用\citeall[<command>],例如\citeall[\fullcite]引用文件\fullcite中的所有来源.bib

.bbl由于自上次发布以来文件的格式发生了一些变化citeall,我需要一些额外的代码才能使其正常运行。

\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\usepackage{citeall}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{sigfridsson,
  author       = {Sigfridsson, Emma and Ryde, Ulf},
  title        = {Comparison of methods for deriving atomic charges from the
                  electrostatic potential and moments},
  journaltitle = {Journal of Computational Chemistry},
  date         = 1998,
  volume       = 19,
  number       = 4,
  pages        = {377-395},
  doi          = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}

@book{maron,
  author       = {Maron, Monika},
  title        = {Animal Triste},
  date         = 2000,
  translator   = {Brigitte Goldstein},
  origlanguage = {german},
  publisher    = {University of Nebraska Press},
  location     = {Lincoln},
}

@book{worman,
  author       = {Worman, Nancy},
  title        = {The Cast of Character},
  date         = 2002,
  publisher    = {University of Texas Press},
  location     = {Austin},
}

@thesis{geer,
  author       = {de Geer, Ingrid},
  title        = {Earl, Saint, Bishop, Skald~-- and Music},
  type         = {phdthesis},
  institution  = {Uppsala Universitet},
  date         = 1985,
  subtitle     = {The {Orkney Earldom} of the Twelfth Century. {A} Musicological
                  Study},
  location     = {Uppsala},
  options      = {useprefix=false},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\ExplSyntaxOn
\cs_set:Nn \_UFca_init_bblfields:
 {\newcommand\true [2][]{\ignorespaces}
  \newcommand\field[3][]{\ignorespaces}
  \newcommand\name [5][]{\ignorespaces}
  \newcommand\strng[2]{\ignorespaces}%
  \renewenvironment{refsection}[1]{}{\ignorespaces}
  \newenvironment{sortlist}[2][]{}{\ignorespaces}
  %\renewcommand\verb{\@ifnextchar\bgroup{\@gobble}{\my@verb}}
  \def\verb##1\endverb{\ignorespaces}
  \renewcommand\list[4][]{\ignorespaces}
  \newcommand\inset[1]{\ignorespaces}
  \newcommand\keyw[1]{\ignorespaces}
  \newcommand\set[1]{\ignorespaces}
  \newcommand\warn[1]{\ignorespaces}
  \renewcommand\inset[1]{\addtocategory{citeall}{##1}\ignorespaces}
  \newcommand\range[2]{\ignorespaces} %for biblatex-dev
  }
\ExplSyntaxOff

\begin{document}
\citeall
\printbibliography
\end{document}

相关内容