1

Related to a question on the presentation of the abstract of a citation in the References section using BibTeX and its answer, I would like to know how to add the abstract of a citation in the reference section using BibLaTeX.

Is there any idea to achieve a citation section such that (1) a cited item has its full abstract after the bibliographic information and (2) the abstract starts with the bold header "Abstract" and a line break, as shown below?

enter image description here

MWE

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

biblatex-apa does not display the abstract field by default, but it shows the annotation field for extended comments at the end of an entry.

We can redefine the macro that prints annotation to also print the abstract if present.

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

Abstract with heading in bibliography entry.

1
  • Thank you for the brilliant solution! I accepted and up-vote it! Mar 15 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.