5

I need to use lncs format for my bibliography for a document class of book

When using

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

The output is given by

enter image description here

The indentation of the second line does not match the indentation of the authors surname. There is also an extra . before item 3, and if Jonesb is not referenced the extra . is not here any more.

@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},
}
  • 2
    There is github.com/gvdgdo/biblatex-lncs – moewe Nov 11 '18 at 14:24
  • For a long bibliography entry the line wraps and the indentation of the second line is not the same as the authors surname – Johan Nov 11 '18 at 14:30
  • If you have specific issues with that style I suggest you add an example document to your question that reproduces the undesired behaviour. I don't know the LNCS guidelines and so you have to be specific and explain what behaviour you would like to see. – moewe Nov 11 '18 at 14:32
  • 2
    Looks like biblatex-lncs doesn't cope particularly well with missing information. The symptom is quite weird, I don't have time to investigate it properly, but Jonesb is definitely missing required fields and it probably should not SHOUT. Re the weird indentation: At the moment my guess is that the indentation is correct and that some part of the code introduces an unwanted spurious space. If we can find it, the first line will start just a tad farther to the left and things should align. – moewe Nov 11 '18 at 17:23
5

The biblatex-lncs style leaves a lot to be desired. There are many problems with its internal implementation and I would be inclined to abandon it and start with one of the existing standard styles.

Having said that, we can work around the particular problems you ask about in your question.

The spacing issue is caused by a bug in \DeclareNameFormat{author} and \DeclareNameFormat{editor} in lncs.bbx. These two macros use the \ifblank test, but should use the \ifdefvoid test. The test gives the wrong result and an extra space is inserted.

The weird period at the start of entry number 3 is caused by punctuation left in the punctuation buffer when no other field is inserted after the title. As @moewe points out in the comments, you should fix this entry to include the right fields (and be the right type—it should be a book). But there is also a bug in the finentry macro in lncs.bbx. Final punctuation (\finentrypunct) should be inserted by this macro, but it isn't. We can fix this by redefining \finentrypunct and redefining the finentry macro.

Jensen1980 is also wrong because you have it as the wrong type. It should be inbook. Except biblatex-lncs does not support the inbook entry type. Aliasing inproceedings to inbook might give an approximation to the required output, but I don't really know.

But really these are just workarounds for a broken style. I wouldn't use it.

MWE

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

output

| improve this answer | |
  • did decide not to use the package – Johan Nov 12 '18 at 15:29
3

There is a fork https://github.com/NorwegianRockCat/biblatex-lncs that seems to fix many of these problems. Still, the misc entry type was missing. I've added it in my fork.

| improve this answer | |

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.