我需要使用 lncs 格式来记录我的参考书目,用于以下文档类别book
使用时
\documentclass[12pt,a4paper,oneside]{book}
\usepackage[
doi=false
,isbn=false
,url=false
,backend=biber
,style=lncs
]{biblatex}
\renewcommand*{\postnotedelim}{}
\DeclareFieldFormat{postnote}{\mkbibparens{\mkpageprefix[pagination] [\mknormrange]{#1}}}
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}%
\bibopenbracket}
{\usebibmacro{citeindex}%
\ifnumgreater{\value{citecount}}{1}
{\bibopenbracket}
{}%
\usebibmacro{cite}}
{\bibclosebracket\multicitedelim}
{\bibclosebracket
\usebibmacro{postnote}}
\addbibresource{./msc_cs.bib}
\begin{document}
\nocite{Steyn2017,Paar2011,Jensen1980,Jonesb}
\printbibliography
\end{document}
输出为
第二行的缩进与作者姓氏的缩进不一致。第 3 项之前还有一个额外内容.
,如果Jonesb
没有引用,则.
这里不再有额外内容。
@Article{Jonesb,
author = {Jones, Cliff B.},
title = {SYSTEMATIC SOFTWARE DEVELOPMENT USING VDM SECOND EDITION},
}
@Article{Jensen1980,
author = {Kurt Jensen},
title = {{Coloured Petri Nets}},
year = {1980},
pages = {248--299},
doi = {10.1007/978-3-540-47919-2_10},
booktitle = {Petri Nets: Central Models and Their Properties},
publisher = {Springer Berlin Heidelberg},
}
@InProceedings{Steyn2017,
author = {Theunis J. Steyn and Stefan Gruner},
title = {A new optional parallelism operator in {CSP} for wireless sensor networks},
booktitle = {Proceedings of the South African Institute of Computer Scientists and Information Technologists on - {SAICSIT} {\textquotesingle}17},
year = {2017},
publisher = {{ACM} Press},
doi = {10.1145/3129416.3129431},
}
@InProceedings{Paar2011,
author = {Alexander Paar and Stefan Gruner},
title = {Static typing with value space-based subtyping},
booktitle = {Proceedings of the South African Institute of Computer Scientists and Information Technologists Conference on Knowledge, Innovation and Leadership in a Diverse, Multidisciplinary Environment - {SAICSIT} {\textquotesingle}11},
year = {2011},
publisher = {{ACM} Press},
doi = {10.1145/2072221.2072242},
}
答案1
这种biblatex-lncs
风格还有很多不足之处。其内部实现存在很多问题,我倾向于放弃它,从现有的标准风格开始。
话虽如此,我们可以解决您在问题中询问的具体问题。
\DeclareNameFormat{author}
空格问题是由和\DeclareNameFormat{editor}
中的错误引起的lncs.bbx
。这两个宏使用了\ifblank
测试,但应该使用\ifdefvoid
测试。测试给出了错误的结果,并插入了一个额外的空格。
条目 3 开头的奇怪句号是由于在 之后没有插入其他字段时标点符号留在标点符号缓冲区中而导致的title
。正如 @moewe 在评论中指出的那样,您应该修复此条目以包含正确的字段(并且是正确的类型 - 它应该是)。但是中的宏book
也有一个错误。最终的标点符号()应该由此宏插入,但事实并非如此。我们可以通过重新定义和重新定义宏来解决这个问题。finentry
lncs.bbx
\finentrypunct
\finentrypunct
finentry
Jensen1980
也是错误的,因为你把它当作了错误的类型。它应该是inbook
。但biblatex-lncs
不支持inbook
条目类型。别名inproceedings
为inbook
可能给出所需输出的近似值,但我确实不知道。
但实际上这些只是一种解决糟糕风格的变通方法。我不会使用它。
平均能量损失
\documentclass[12pt,a4paper,oneside]{book}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Jonesb,
author = {Jones, Cliff B.},
title = {Systematic Software Development Using {VDM} (2nd ed.)},
year = {1990},
publisher = {Prentice-Hall},
address = {Upper Saddle River, NJ},
}
@Article{Jensen1980,
author = {Kurt Jensen},
title = {{Coloured Petri Nets}},
year = {1980},
pages = {248--299},
doi = {10.1007/978-3-540-47919-2_10},
booktitle = {Petri Nets: Central Models and Their Properties},
publisher = {Springer Berlin Heidelberg},
}
@InProceedings{Steyn2017,
author = {Theunis J. Steyn and Stefan Gruner},
title = {A new optional parallelism operator in {CSP} for wireless sensor networks},
booktitle = {Proceedings of the South African Institute of Computer Scientists and Information Technologists on - {SAICSIT} {\textquotesingle}17},
year = {2017},
publisher = {{ACM} Press},
doi = {10.1145/3129416.3129431},
}
@InProceedings{Paar2011,
author = {Alexander Paar and Stefan Gruner},
title = {Static typing with value space-based subtyping},
booktitle = {Proceedings of the South African Institute of Computer Scientists and Information Technologists Conference on Knowledge, Innovation and Leadership in a Diverse, Multidisciplinary Environment - {SAICSIT} {\textquotesingle}11},
year = {2011},
publisher = {{ACM} Press},
doi = {10.1145/2072221.2072242},
}
\end{filecontents}
\usepackage[
doi=false
,isbn=false
,url=false
,backend=biber
,style=lncs
]{biblatex}
% FIXES FOR BROKEN lncs.bbx
\DeclareNameFormat{author}{%
\ifdefvoid{\namepartprefix}{}{\namepartprefix\space}\namepartfamily, \namepartgiveni%
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}%
{}%
}
\DeclareNameFormat{editor}{%
\ifdefvoid{\namepartprefix}{}{\namepartprefix\space}\namepartfamily, \namepartgiveni%
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}%
{\space\ifthenelse{\value{listcount}>1}
{(\bibstring{editors})}
{(\bibstring{editor})}}%
}
\renewcommand*{\finentrypunct}{}
\renewbibmacro{finentry}{\settoggle{lncs:lncs}{false}\finentry}
\DeclareBibliographyAlias{inbook}{inproceedings}
\DeclareFieldFormat[inbook]{title}{#1}
% END FIXES FOR BROKEN lncs.bbx
\renewcommand*{\postnotedelim}{}
\DeclareFieldFormat{postnote}{\mkbibparens{\mkpageprefix[pagination] [\mknormrange]{#1}}}
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}%
\bibopenbracket}
{\usebibmacro{citeindex}%
\ifnumgreater{\value{citecount}}{1}
{\bibopenbracket}
{}%
\usebibmacro{cite}}
{\bibclosebracket\multicitedelim}
{\bibclosebracket
\usebibmacro{postnote}}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{Steyn2017,Paar2011,Jensen1980,Jonesb}
\printbibliography
\end{document}
答案2
有一个叉子https://github.com/NorwegianRockCat/biblatex-lncs这似乎解决了许多问题。但misc
缺少条目类型。我已将其添加到我的叉子。