I am using biblatex with the biber backend and the chem-acs style.
For journals and inproceedings, the author list is printed followed by the title; however, for books and book chapters, there is a comma after the last author. I'd like to get rid of that extra comma.
For an MWE, please see below.
So far, I read some solutions to similar questions.
Both remove comma after the last author and Need to remove comma after last author (only) seem to work on manually created .bst files, and I would like to use the chem-acs style.
In the question Colon (:) instead of period (.) after author with biblatex, alphabetic, a quite nice solution is given by
\renewcommand{\labelnamepunct}{\addcolon\space}
However, it seems that this only applies to journals and not to my "problematic" book types.
One solution seems to be to complete redefine the bibliograpy driver for book, but I'd like to circumvent that, because I only want to remove a single comma.
I had a look into the chem-acs.bbx
file, and found the following definition:
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+title}%
(...)
}
I noticed that if I comment out the line \setunit{\labelnamepunct}\newblock
, the comma stays. So I think it is defined somewhere inside the bibmacro for author/translator+others
. However, I have no clue how to redefine that macro in a reasonable fashion, and to my best knowledge it is also not possible to redefine it only for types other than journal.
Here the MWE:
.tex file:
\documentclass{standalone}
\usepackage[style=chem-acs,articletitle,chaptertitle,backend=biber]{biblatex}
\addbibresource{mwe.bib}
\begin{document}
Some journals: \cite{Agrafiotis2000,Agrafiotis2003}
A book, chapter, and inproceeding: \cite{Ozgur2005,Alpaydin2010,Joachims1999}
\printbibliography
\end{document}
.bib file:
@INPROCEEDINGS{Ozgur2005,
author = {{\"O}zg{\"u}r, Arzucan and {\"O}zg{\"u}r, Levent and G{\"u}ng{\"o}r,
Tunga},
title = {{Text Categorization with Class-Based and Corpus-Based Keyword Selection}},
booktitle = {Proceedings of the 20th International Conference on Computer and
Information Sciences},
year = {2005},
pages = {606-615},
}
@ARTICLE{Agrafiotis2000,
author = {Dimitris K. Agrafiotis and Victor S. Lobanov},
title = {{Nonlinear Mapping Networks}},
journal = {Journal of Chemical Information and Computer Sciences},
year = {2000},
volume = {40},
number = {6},
pages = {1356-1362},
}
@ARTICLE{Agrafiotis2003,
author = {Dimitris K. Agrafiotis and Huafeng Xu},
title = {{A Geodesic Framework for Analyzing Molecular Similarities}},
journal = {Journal of Chemical Information and Computer Sciences},
year = {2003},
volume = {43},
number = {2},
pages = {475-484},
}
@BOOK{Alpaydin2010,
title = {{Introduction to Machine Learning}},
publisher = {MIT Press},
year = {2010},
author = {Ethem Alpaydin},
edition = {2nd},
}
@INBOOK{Joachims1999,
chapter = {{Making Large-Scale Support Vector Machine Learning Practical}},
pages = {169-184},
title = {{Advances in Kernel Methods}},
publisher = {MIT Press},
year = {1999},
editor = {Sch{\"o}lkopf, Bernhard and Burges, Christopher J. C. and Smola,
Alexander J.},
author = {Joachims, Thorsten},
}
Best Answer
In the
chem-acs
style the\newunitpunct
macro is defined as\addcomma\addspace
so whenever you start a new unit you are going to get a comma. Forbook
entries the unit is being started by themaintitle+title
bibmacro while forinbook
entries it is being started by the driver itself. While you could globally set\newunitpunct
, this will have effects all over the place. Instead, I would use thexpatch
package to patch the bibmacro and driver more locally and use\setunit
to locally control the punctuation.