How to get a bibliography style that generates numeric-style citation call-outs and typesets the contents of the abstract fields of bibliographic entries?
You seem to want a numeric
style, biblatex
offers some variations on your classical version, namely numeric-comp
and numeric-verb
.
The abstract
field is by default not included in the bibliography output, but we can easily add it using
\DeclareFieldFormat{abstract}{\par\small#1}
\renewbibmacro*{finentry}{\printfield{abstract}\finentry}
Where the first line takes care of a nice formatting.
MWE
\documentclass{article}
\usepackage[style=numeric]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareFieldFormat{abstract}{\par\small#1}
\renewbibmacro*{finentry}{\printfield{abstract}\finentry}
\begin{document}
\cite{sigfridsson,kastenholz}
\printbibliography
\end{document}
-
I wonder why the standard styles don't use the abstract field? ;-) Thanks for answering. – Johannes_B Jun 21 '15 at 14:38
I know it's fairly late now. I just want to tack on an 'improvement' to @moewe 's answer. This way nothing is done if the abstract field is undefined, say for a dictionary entry or something. It also puts a period (\finentrypunct
) at the end of the previous line before printing the abstract.
\DeclareFieldFormat{abstract}{\par\small\textbf{Abstract}: #1}
\renewbibmacro*{finentry}{%
\iffieldundef{abstract}
{%
\finentry
}
{%
\finentrypunct\printfield{abstract}\finentry
}
}
I use something like the above, including a new toggle coupled with \newcommand
to have the ability to selectivity to turn abstracts on for a particular bibliography, say personal publications in a thesis as an example, or turn it on globally at the package load with printabstract=true
.
\makeatletter
\newcommand\printabstractstrue{\settoggle{bbx:printabstract}{true}}
\newcommand\printabstractfalse{\settoggle{bbx:printabstract}{false}}
\makeatother
\newtoggle{bbx:printabstract}
\DeclareBibliographyOption{printabstract}[true]{%
\settoggle{bbx:printabstract}{#1}%
}
\DeclareFieldFormat{abstract}{\par\small\textbf{Abstract}: #1}
\renewbibmacro*{finentry}{%
\iffieldundef{abstract}
{%iffieldFALSE
\finentry
}
{%iffieldTRUE
\iftoggle{bbx:printabstract}
{%iftoggleTRUE
\finentrypunct\printfield{abstract}\finentry
}
{%iftoggleFALSE
\finentry
}
}
}
-
1You can additionally make
printabstract
an entry option (\DeclareEntryOption
). The logic infinentry
can be shortened using\ifboolexpr{ not test {\iffieldundef{abstract}} and togl {bbx:printabstract} }
(or something along those lines, I didn't test it) – moewe Nov 16 '15 at 6:58
style=numeric
and just adding\renewbibmacro*{finentry}{\printfield{abstract}\finentry}
to your preamble? – moewe Jun 9 '15 at 15:45