4

How to get a bibliography style that generates numeric-style citation call-outs and typesets the contents of the abstract fields of bibliographic entries?

  • Please give an MWE with one bib entry containing that abstract field. You should also write two sample lines: 1. how you are going to cite and 2. how you want the result to look like. Thank you. – LaRiFaRi Jun 09 '15 at 09:48
  • @LaRiFaRi What do you mean by MWE? – Bassam Awad Jun 09 '15 at 09:52
  • A minimal working example. Please see here: http://meta.tex.stackexchange.com/q/228 – LaRiFaRi Jun 09 '15 at 09:54
  • How about using style=numeric and just adding \renewbibmacro*{finentry}{\printfield{abstract}\finentry} to your preamble? – moewe Jun 09 '15 at 15:45
  • @moewe, thanks. Can I refer you to question 249312? That includes what i did in a MWE? – Bassam Awad Jun 10 '15 at 05:09
  • The piece of code you posted there does not use biblatex, but your question is tagged with biblatex. Some answers mention it though, are you planning on using biblatex and if so what style are you planning on using: In other words If you were to start writing a new document now with biblatex what would it look like, post that as MWE, please. – moewe Jun 10 '15 at 05:20
  • @moewe, thanks again. I use latex with no changes in the document code as you saw it. I really do not know what matters for biblatex or else. My only only is be able to include the abstracts of references in the reference list and refer to them as numbers in the paper body. – Bassam Awad Jun 10 '15 at 07:39
  • Well, if you did not change the code in the question you are not using biblatex. If you do use biblatex as suggested in the answers, please try my suggestion from above. If you don't want to use biblatex, retag the question so people don't get confused. – moewe Jun 10 '15 at 07:42
  • @moewe I would simply assume biblatex and write an answer, might be useful for others. Would you do that? – Johannes_B Jun 21 '15 at 09:37
  • @Johannes_B I'll do that then ... – moewe Jun 21 '15 at 14:32

2 Answers2

11

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}

enter image description here

moewe
  • 175,683
5

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
            }
      }
   }
tmgriffiths
  • 493
  • 4
  • 13
  • 2
    You can additionally make printabstract an entry option (\DeclareEntryOption). The logic in finentry 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 06:58