如何在我的参考书目中正确插入和调整摘要段落?

如何在我的参考书目中正确插入和调整摘要段落?

我正在尝试将摘要添加到我的参考书目中,我发现这些问题很有帮助:

  1. 带有摘要和编号参考文献的书目样式
  2. “抽象”字段有什么问题?

但尝试之后,我注意到该段落没有缩进或对齐,然后我再次提出以下问题:

  1. 缩进整个段落
  2. 如何在左对齐(\raggedright)文本中设置完全对齐?

然而,在我的代码上构建它之后,每个参考书目的末尾都附加了一个额外的点,并且文本仍然没有对齐。

enter image description here

参考书目条目肯定不应该被证明,因为它肯定会抛出 badboxes 警告,然而摘要段落肯定不会,那么它们就可以完全证明。

这是我根据其他问题构建的最小代码。它应该能够证明摘要的合理性,而不会在参考书目条目之间产生额外的点。可以修复吗?

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

答案1

一个快速的解决方案是

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

答案2

答案仅部分如此。这涉及抽象字段的论证。为此,我更改了内部定义\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}

相关内容