1

I've been trying to create a "custom" bibliography style with the full first name and only middle name initials. I copied plain.bst and tried modifying the format.names function, by changing ff~ to ff. and a few other options but it didn't work. I'm using the info from https://tex.stackexchange.com/a/36677/160651.

I assume I need to change more parts of the function, to check for the first and or second words in the first names, but I really can't understand how to do this...

Here's the format.names function for easy reference (from plain.bst)

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$
}
  • I think BibTeX treats all given names equally, whether first name or middle name, so I believe there is no built-in BibTeX solution for this. There are two approaches for biblatex in tex.stackexchange.com/q/187684/35864 and tex.stackexchange.com/q/126061/35864 that could in theory be ported to BibTeX (but I'm not going to attempt that). Since both of these rely on TeX parsing the string things could break with weird input. – moewe May 28 '18 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.