1

Comma sign in Bibliography

Last portion of above link contains both comma and and which is grammatically incorrect. How can i avoid comma?

3
  • 1
    This is called the Oxfor comma, and by all means, it is not gramatically incorrect in parts of the world.
    – Johannes_B
    May 3, 2016 at 7:37
  • 1
    Please provide a minimal working example that shows your exact setup for the bibliography.
    – Johannes_B
    May 3, 2016 at 7:38
  • 3
    That's an Oxford comma and is not grammatically incorrect. As this figure shows, the Oxford comma is even necessary in some cases to avoid confusion: With and without Oxford comma.
    – Thijs B.
    May 3, 2016 at 8:55

1 Answer 1

2

To avoid the comma you must modify the unsrt.bib as follows:

Replace the following code:

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
      nameptr #1 >
        { namesleft #1 >
            { ", " * t * }
            { numnames #2 >
              { "," * }
                'skip$
              if$
              t "others" =
                { " et~al." * }
                { " and " * t * }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

by the code:

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
      nameptr #1 >
        { namesleft #1 >
            { ", " * t * }
            { numnames #2 >
                { " " * } % modified { "," * }
                'skip$
              if$
              t "others" =
                { " et~al." * }
                { " and " * t * }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

A MWE is:

\documentclass{article}
   \begin{filecontents*}{test.bib}
     @article{A,
      archivePrefix = {arXiv},
      arxivId = {hep-th/9605032},
      author = {AuthorI, A. and AuthorII, B. and AuthorIII, C.},
      eprint = {9605032},
      journal = {Journal of Bla bla},
      pages = {12},
      primaryClass = {hep-th},
      title = {{Title of the paper A}},
      volume = {123},
      year = {2016}
        }
     @article{B,
      archivePrefix = {arXiv},      
      author = {AuthorA, A. and AuthorB, B. and AuthorC, C.},
      arxivId = {1512.00704},
      eprint = {1512.00704},
      journal = {Journal of bla bla},
      pages = {1233},
      title = {{Title of the paper B}},
      volume = {567},
      year = {2016}
        }
  \end{filecontents*}
  \begin{document}

   ~\nocite{*}

 %Bibleography

 \bibliographystyle{unsrt}
 \bibliography{test}
 \end{document}

which gives: enter image description here

1
  • 1
    If you modify parts of the latex distribution, you should save the modified files under a different name, for example unsrt_modified.bst in order to comply licence requirements. Jul 8, 2016 at 22:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .