2

I'm using a modification of the plainyr BibTeX style. Although my bib-file contains all initials for some authors (e.g. B.D. McKay), I end up with just the first initial in my document (e.g. B. McKay). I thought about editing the BibTeX style myself, but after seeing the code, I decided against it. Maybe there are some people who are more knowledgeable in this area of expertise.

I want my final document to include the initials for all the names, and not just those of the first name.

This is the relevant code of the BibTeX style, or at least, I think it is the relevant code.

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{f.~}{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$
}
3
  • 2
    Do you have a space between the initials? BibTeX interprets B.D. as a single name, but B. D. as two initials. That is part of the format.name$ function, so you cannot alter this behaviour and must have it right in the database.
    – Joseph Wright
    Jun 14, 2012 at 8:35
  • Indeed, that fixes the problem. Thanks a bunch!
    – nvcleemp
    Jun 14, 2012 at 8:41
  • Btw, If you formulate that as an answer, I can mark it answered.
    – nvcleemp
    Jun 14, 2012 at 8:42

1 Answer 1

7

The BibTeX format.name$ function interprets B.D. as a single name, but B. D. as two initials. Thus you must have a space between each initial for BibTeX to correctly produce more than one initial in the output. Editing the database is the only way to sort this out.

You must log in to answer this question.

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