平均能量损失

平均能量损失

相关关于使用 BibTeX 在参考文献部分呈现引文摘要的问题它的答案,我想知道如何使用在参考文献部分添加引文摘要BibLaTeX

有没有什么办法可以实现这样的引用部分:(1)引用的项目在书目信息后有完整的摘要,(2)摘要以粗体标题开头“抽象的“以及换行符,如下所示?

在此处输入图片描述

平均能量损失

\documentclass[
]{article}

\begin{filecontents*}{biblio.bib}
  @Manual{R-rmarkdown,
    title = {rmarkdown: Dynamic Documents for R},
    author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone},
    year = {2020},
    note = {R package version 2.3},
    url = {https://github.com/rstudio/rmarkdown},
    abstract = {This is a good book. That's why I cite this. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}
  }
  
\end{filecontents*}

\usepackage[sortcites = true,sorting = nyt,backend = biber,style = apa,citestyle = numeric]{biblatex}
\addbibresource{biblio.bib}

%----------------------------------------------------------------------
% For item number 
% From:
% https://tex.stackexchange.com/a/373395/169454
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
      \printfield{labelprefix}%
      \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}
%----------------------------------------------------------------------

\begin{document}

\nocite{R-rmarkdown}

\printbibliography[title=References]

\end{document}

答案1

biblatex-apa默认情况下不显示该abstract字段,但它会annotation在条目末尾显示扩展注释的字段。

我们可以重新定义打印宏,annotation以便也打印abstract存在的情况。

\documentclass{article}
\usepackage[backend = biber, style = apa, citestyle = numeric]{biblatex}

\renewbibmacro*{annotation}{%
  \ifboolexpr{       test {\iffieldundef{annotation}}
              or not togl {bbx:annotation}}
    {}
    {\begingroup
     \togglefalse{blx@bibliography}%
     \newline
     \setunit{}%
     \printfield{annotation}%
     \endgroup}
  \iffieldundef{abstract}
    {}
    {\begingroup
     \togglefalse{blx@bibliography}%
     \setunit{%
       \par
       \vspace{0.5\baselineskip}}%
     \bibstring[\mkbibbold]{abstract}%
     \setunit{\newline}%
     \printfield{abstract}%
     \endgroup}}

\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
      \printfield{labelprefix}%
      \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\begin{filecontents*}{\jobname.bib}
@Manual{R-rmarkdown,
  title    = {rmarkdown: Dynamic Documents for R},
  author   = {JJ Allaire and Yihui Xie and Jonathan McPherson
              and Javier Luraschi and Kevin Ushey and Aron Atkins
              and Hadley Wickham and Joe Cheng and Winston Chang
              and Richard Iannone},
  year     = {2020},
  note     = {R package version 2.3},
  url      = {https://github.com/rstudio/rmarkdown},
  abstract = {This is a good book. That's why I cite this.
              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
              Ut enim ad minim veniam, quis nostrud exercitation ullamco
              laboris nisi ut aliquip ex ea commodo consequat.},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{R-rmarkdown}

\printbibliography[title=References]
\end{document}

摘要和参考书目条目中的标题。

相关内容