ISBN 换行符会生成超额警告

ISBN 换行符会生成超额警告

问题在于 ISBN 号的截断方式会导致过长。让我们看看 mwe:

\documentclass[]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{csquotes}

\usepackage[
backend=biber,
hyperref=true,
url=false,
eprint=false,
style=numeric-comp,
bibencoding=utf8,
sorting=none,
%citereset=chapter,
maxbibnames=10,
]{biblatex}

\begin{filecontents}{mwe.bib}
@InProceedings{iwann2017,
author="Gal{\'a}n-Prado, Fabio
and Rossell{\'o}, Josep L.",
editor="Rojas, Ignacio
and Joya, Gonzalo
and Catala, Andreu",
author+an={1=highlight},
title="Smart Hardware Implementation of Spiking Neural Networks",
booktitle="Advances in Computational Intelligence",
year="2017",
publisher="Springer International Publishing",
address="Cham",
pages="560--568",
abstract="During last years a lot of attention have been focused to the hardware implementation of Artificial Neural Networks (ANN) to efficiently exploit the inherent parallelism associated to these systems. From the different types of ANN, the Spiking Neural Networks (SNN) arise as a promising bio-inspired model that is able to emulate the expected neural behavior with a high confidence. Many works are centered in using analog circuitry to reproduce SNN with a high degree of precision, while minimizing the area and the energy costs. Nevertheless, the reliability and flexibility of these systems is lower if compared with digital implementations. In this paper we present a new, low-cost bio-inspired digital neural model for SNN along with an auxiliary Computer Aided Design (CAD) tool for the efficient implementation of high-volume SNN.",
isbn="978-3-319-59153-7"
}
\end{filecontents}

\addbibresource{mwe.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

得出以下结果:

描述

我希望有一个 biblatex 计数器用于 ISBN,就像“biburlnumpenalty”用于 URL 和 DOI 一样。有人知道如何修复它吗?

谢谢。

答案1

我认为在你的例子中打破这个 ISBN 的唯一合理选择是

978-3-319-59153-7

978-3-319-59153-
7

我不会尝试将其分解为一组数字。不幸的是,这两种明智的选择都会让你得到不满意的结果:

第一个选项会导致箱子未满,第二个选项会导致箱子过满。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=numeric-comp]{biblatex}

\begin{filecontents}{\jobname.bib}
@InProceedings{iwann2017,
  author    = {Galán-Prado, Fabio and Rosselló, Josep L.},
  author+an = {1=highlight},
  title     = {Smart Hardware Implementation of Spiking Neural Networks},
  editor    = {Rojas, Ignacio and Joya, Gonzalo and Catala, Andreu},
  booktitle = {Advances in Computational Intelligence},
  year      = {2017},
  publisher = {Springer International Publishing},
  address   = {Cham},
  pages     = {560-568},
  isbn      = {978-3-319-59153-7},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

不均匀的虚线


有一些尝试改进换行的通用方法,请见如何调整参考书目的断行?

那里描述的最温和的方法,loading microtype,在这里也有效。事实上,它彻底改变了条目中的换行方式。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=numeric-comp]{biblatex}

\usepackage{microtype}

\begin{filecontents}{\jobname.bib}
@InProceedings{iwann2017,
  author    = {Galán-Prado, Fabio and Rosselló, Josep L.},
  author+an = {1=highlight},
  title     = {Smart Hardware Implementation of Spiking Neural Networks},
  editor    = {Rojas, Ignacio and Joya, Gonzalo and Catala, Andreu},
  booktitle = {Advances in Computational Intelligence},
  year      = {2017},
  publisher = {Springer International Publishing},
  address   = {Cham},
  pages     = {560-568},
  isbn      = {978-3-319-59153-7},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

优美的断线。

您可以在链接中查看其他解决方案。


如果您坚持要求采用允许数字后中断的解决方案,这里有一个简单的解决方案,它应该足以满足 ISBN 的要求,但如果您随意输入,可能会出现问题。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=numeric-comp]{biblatex}

\usepackage{etoolbox}

\makeatletter
\newcommand*{\isbnbreaker}[1]{\isbnb@isbnbreaker#1\isbnb@end}
\newcommand*{\isbnb@isbnbreaker}{}
\def\isbnb@isbnbreaker#1#2\isbnb@end{%
  \ifblank{#2}
    {#1}
    {\ifstrequal{#1}{-}
       {-}
       {#1\penalty\hyphenpenalty}%
     \isbnb@isbnbreaker#2\isbnb@end}}
\makeatother

\DeclareFieldFormat{isbn}{\mkbibacro{ISBN}\addcolon\space\isbnbreaker{#1}}

\begin{filecontents}{\jobname.bib}
@InProceedings{iwann2017,
  author    = {Galán-Prado, Fabio and Rosselló, Josep L.},
  author+an = {1=highlight},
  title     = {Smart Hardware Implementation of Spiking Neural Networks},
  editor    = {Rojas, Ignacio and Joya, Gonzalo and Catala, Andreu},
  booktitle = {Advances in Computational Intelligence},
  year      = {2017},
  publisher = {Springer International Publishing},
  address   = {Cham},
  pages     = {560-568},
  isbn      = {978-3-319-59153-7},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

损坏的 ISBN。

相关内容