2

I am trying to add abstracts to my bibliography, I found these questions for help:

  1. Bibliography Style with abstract and numbered references
  2. What is wrong with the "abstract" field?

But after trying, I noticed the paragraph is not indented or justified then I recurred to the questions:

  1. Indenting a whole paragraph
  2. How can one set full justification within left-justified (\raggedright) text?

However, after building it on my code, I got an extra dot appended at the end of each bibliography and the text still not justifying.

enter image description here

The bibliography entry must to be justified because it will certainly throw badboxes warnings, however, the abstract paragraph will certainly not, then they can be fully justified.

This is the minimal code which I build based on these others questions. It should be justifying the abstract and not producing and extra dot between bibliographies entries. Is it fixable?

\RequirePackage{filecontents}

\begin{filecontents*}{references.bib}
@book{koma-scrguien,
  author        = {Markus Kohm},
  edition       = {2017-04-13},
  howpublished  = {\url{http://mirrors.ibiblio.org/CTAN/.../scrguien.pdf}},
  publisher     = {Online Material; \url{https://www.ctan.org/pkg/koma-script}},
  title         = {The Guide KOMA -Script},
  urlaccessdate = {2017-08-28},
  year          = {2017},
  abstract      = {Software complexity is growing, so is the demand for software verification. Soon, perhaps within a decade, wide deployment of software verification tools will be indispensable or even mandatory to ensure software reliability in a large number of application domains, including but not restricted to safety and security critical systems. To adequately respond to the demand we need to eliminate tedious aspects of software verifier development, while providing support for the accomplishment of creative aspects.}
}

@inproceedings{annotationAssistant,
    title     = {An Annotation Assistant for Interactive Debugging of Programs with Common Synchronization Idioms},
    author    = {Elmas, Tayfun and Sezgin, Ali and Tasiran, Serdar and Qadeer, Shaz},
    booktitle = {Proceedings of the 7th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging},
    series    = {PADTAD '09},
    year      = {2009},
    isbn      = {978-1-60558-655-7},
    location  = {Chicago, Illinois},
    pages     = {10:1--10:11},
    articleno = {10},
    numpages  = {11},
    url       = {http://doi.acm.org/10.1145/1639622.1639632},
    doi       = {10.1145/1639622.1639632},
    acmid     = {1639632},
    publisher = {ACM},
    address   = {New York, NY, USA},
    keywords  = {atomicity, concurrent programs, synchronization idioms},
  abstract  = {Software complexity is growing, so is the demand for software verification. Soon, perhaps within a decade, wide deployment of software verification tools will be indispensable or even mandatory to ensure software reliability in a large number of application domains, including but not restricted to safety and security critical systems. To adequately respond to the demand we need to eliminate tedious aspects of software verifier development, while providing support for the accomplishment of creative aspects.}
}
\end{filecontents*}

\PassOptionsToPackage{brazil,main=english}{babel}
\documentclass[10pt,a5paper,twoside]{abntex2}
\pdfstringdefDisableCommands{\let\uppercase\relax}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[style=abnt,language=english,backref=true,backend=biber,citecounter=true]{biblatex}
\addbibresource{references.bib}

\usepackage{changepage}
\usepackage{ragged2e}

\makeatletter
\newcommand{\justified}{%
  \rightskip\z@skip%
  \leftskip\z@skip}
\makeatother

\DeclareFieldFormat{abstract}{\begin{adjustwidth}{1cm}{}{\justified\textbf{Abstract:} #1}\par\end{adjustwidth}}
\renewbibmacro*{finentry}{\printfield{abstract}\finentry}

\usepackage{csquotes}
\hypersetup{colorlinks=true}

\begin{document}

    Citing \cite[p. 47-52 and 135]{koma-scrguien}

    Citing \cite{annotationAssistant}

    \printbibliography

\end{document}
5

A quick solution is

\DeclareFieldFormat{abstract}{%
  \par\justifying
  \begin{adjustwidth}{1cm}{}
    \textbf{\bibsentence\bibstring{abstract}:} #1
  \end{adjustwidth}}

\renewbibmacro*{finentry}{%
  \iffieldundef{abstract}
    {\finentry}
    {\finentrypunct
     \printfield{abstract}%
     \renewcommand*{\finentrypunct}{}%
     \finentry}}
  • For the punctuation, couldn't one just add \setunit before \finentry instead of redefining \finentrypunct? – Alan Munn Oct 29 '17 at 19:23
  • @AlanMunn Do you mean an empty \setunit? \finentry sets \finentrypunct not via \setunit, but directly, so I'm not sure if that works. – moewe Oct 29 '17 at 19:26
  • It does work. :) Whether by accident or not, I'm not sure, which is why I asked. – Alan Munn Oct 29 '17 at 19:30
  • @AlanMunn Huh? It does not for me. At least when I simply took the original MWE and added \setunit{} before \finentry the unwanted full stop is still there. A few other things I tried didn't work either. What did you try? – moewe Oct 29 '17 at 19:36
  • I used \setunit\finentry No {}. – Alan Munn Oct 29 '17 at 19:38
2

Only part of an answer. This deals with the justification of the abstract-field. For this I changed the definition inside \DeclareFieldFormat{abstract}.

\RequirePackage{filecontents}

\begin{filecontents*}{references.bib}
@book{koma-scrguien,
  author        = {Markus Kohm},
  edition       = {2017-04-13},
  howpublished  = {\url{http://mirrors.ibiblio.org/CTAN/.../scrguien.pdf}},
  publisher     = {Online Material; \url{https://www.ctan.org/pkg/koma-script}},
  title         = {The Guide KOMA -Script},
  urlaccessdate = {2017-08-28},
  year          = {2017},
  abstract      = {Software complexity is growing, so is the demand for software verification. Soon, perhaps within a decade, wide deployment of software verification tools will be indispensable or even mandatory to ensure software reliability in a large number of application domains, including but not restricted to safety and security critical systems. To adequately respond to the demand we need to eliminate tedious aspects of software verifier development, while providing support for the accomplishment of creative aspects.}
}

@inproceedings{annotationAssistant,
    title     = {An Annotation Assistant for Interactive Debugging of Programs with Common Synchronization Idioms},
    author    = {Elmas, Tayfun and Sezgin, Ali and Tasiran, Serdar and Qadeer, Shaz},
    booktitle = {Proceedings of the 7th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging},
    series    = {PADTAD '09},
    year      = {2009},
    isbn      = {978-1-60558-655-7},
    location  = {Chicago, Illinois},
    pages     = {10:1--10:11},
    articleno = {10},
    numpages  = {11},
    url       = {http://doi.acm.org/10.1145/1639622.1639632},
    doi       = {10.1145/1639622.1639632},
    acmid     = {1639632},
    publisher = {ACM},
    address   = {New York, NY, USA},
    keywords  = {atomicity, concurrent programs, synchronization idioms},
  abstract  = {Software complexity is growing, so is the demand for software verification. Soon, perhaps within a decade, wide deployment of software verification tools will be indispensable or even mandatory to ensure software reliability in a large number of application domains, including but not restricted to safety and security critical systems. To adequately respond to the demand we need to eliminate tedious aspects of software verifier development, while providing support for the accomplishment of creative aspects.}
}
\end{filecontents*}

\PassOptionsToPackage{brazil,main=english}{babel}
\documentclass[10pt,a5paper,twoside]{abntex2}
\pdfstringdefDisableCommands{\let\uppercase\relax}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[style=abnt,language=english,backref=true,backend=biber,citecounter=true]{biblatex}
\addbibresource{references.bib}

\usepackage{changepage}
\usepackage{ragged2e}

\makeatletter
\newcommand{\justified}{%
  \rightskip\z@skip%
  \leftskip\z@skip}
\makeatother

\DeclareFieldFormat{abstract}{{\justify\begin{adjustwidth}{1cm}{}{\textbf{Abstract:}
#1}\par\end{adjustwidth}}}
\renewbibmacro*{finentry}{\printfield{abstract}\finentry}

\usepackage{csquotes}
\hypersetup{colorlinks=true}

\begin{document}

    Citing \cite[p. 47-52 and 135]{koma-scrguien}

    Citing \cite{annotationAssistant}

    \printbibliography

\end{document}

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.