我想使用biblatex
(与 Biber 一起使用)来生成参考文献列表,还想使用该bibentry
包打印文本中的个别引文。但是,似乎无法同时完成这两项工作。
在下面的例子中,\bibentry
只产生空输出
\documentclass{article}
\begin{filecontents}{ref.bib}
@Book{abramowitz+stegun,
author = "Milton {Abramowitz} and Irene A. {Stegun}",
title = "Handbook of Mathematical Functions with
Formulas, Graphs, and Mathematical Tables",
publisher = "Dover",
year = 1964,
address = "New York",
edition = "ninth Dover printing, tenth GPO printing"
}
\end{filecontents}
\usepackage{bibentry}
\usepackage[backend=biber]{biblatex}
\addbibresource{ref.bib}
\begin{document}
Here's a citation
\bibentry{abramowitz+stegun}
\nocite{*}
\printbibliography
\end{document}
答案1
据我从bibentry
的软件包文档中看到的那样,该\bibentry
命令只是输出参考书目中的完整参考资料。\fullcite
的命令biblatex
也正是这样做的。
比较一下我从您的 MWE 改编的以下代码示例的输出:
\begin{filecontents}{ref.bib}
@BOOK{abramowitz+stegun,
author = "Milton {Abramowitz} and Irene A. {Stegun}",
title = "Handbook of Mathematical Functions with
Formulas, Graphs, and Mathematical Tables",
publisher = "Dover",
year = 1964,
address = "New York",
edition = "ninth Dover printing, tenth GPO printing"
}
\end{filecontents}
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{ref.bib}
\begin{document}
Here's a citation \fullcite{abramowitz+stegun}
\nocite{*}
\printbibliography
\end{document}
答案2
当你使用 biber 作为后端时,fullcite 实际上并不正确(如另一个答案所建议的那样)总是产生的结果与参考文献列表中的结果相同。在上面给出的例子中,情况确实如此,但这只是由于作者数量有限。
问题是 fullcite 命令不尊重您传递给 bibtex 包的所有参数。假设您告诉 bibtex 永远不要使用“maxbibnames=99”缩写作者列表,那么 fullcite 仍会这样做,如以下 MWE 所示:
\documentclass{article}
\usepackage[backend=biber,maxbibnames=99]{biblatex}
\begin{filecontents}{\jobname.bib}
@InProceedings{identifier1,
Title = {Some So-So Title},
Author = {First Author and Second Author and Third Author and Fourth Author},
Booktitle = {An okay Booktitle},
Year = {2000},
Pages = {1--100}
}
@InProceedings{identifier2,
Title = {Some Awesome Title},
Author = {Some Writer and Another Writer},
Booktitle = {Some Book about the Future},
Year = {2042},
Pages = {1--42}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\setlength\parindent{0pt} % just cosmetics to ignore indendations
Here's a citation of \textcite{identifier1}:\\
\fullcite{identifier1}\\
And here a citation of \textcite{identifier2}:\\ \fullcite{identifier2}
\nocite{*}
\printbibliography
\end{document}
这将产生以下输出,其中你会看到 fullcite 确实不是产生与参考列表相同的输出。
提出了一个非常简单的解决这个问题的方法这里。您只需插入以下代码,使 fullcite 使用 maxbibnames 而不是默认使用的 maxcitenames。
\makeatletter
\DeclareCiteCommand{\fullcite}
{\defcounter{maxnames}{\blx@maxbibnames}%
\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\makeatother
如上所述,解决方案来自另一个 Stack Overflow 帖子。所以请投票给那个如果你觉得这个答案有用!