I have a question about manipulating a bst file to remove a period after a middle initial. Assume the following .bib file entry:
@BOOK{author1999book,
title = {Very Informative and Handsome Book},
publisher = {College Town, ST: College University Press},
year = {1999},
author = {First M. Last},
}
I've been working with the apa.bst
file on some various hacks to create a bst file that speaks well with a particular journal. One of the things they demand is that middle initials do not have periods after them. Thus, their style for the bibliography section looks like:
Last, First M (1999) Very informative and handsome book. College Town, ST: College University Press.
I already modified the apa.bst
file to address the other peculiarities of formatting (parentheses around the years, capitalization of titles). What's left is the issue of periods after middle initials.
Now, I can get this by simply removing the period after the middle initial in the .bib file entry. What I would like to do, though, is find a way to do that in the *.bst file. Can I? The reason I ask is that several bst styles will actually include that period if it's not there in the *.bib file. What I would like to do is get the bst file to remove the period from the middle initial if it is there in the *.bib file. I didn't know if that was possible and, if so, how I could do it.
Best Answer
The function which format the list of names inside the
bst
file is the one calledformat.names
. For example, for theapa.bst
file, this function has the following code:For full details about the syntax used in
bst
files and in this function in particular, refer to the document Taming the beast (pag. 35).The line which we have to modify in this case is the one containing the string:
This string specifies the required format for the name of each author.
vv
represents the "von" part (if it exists)ll
is the full last name,jj
is the "junior" part of the name (if it exists) and finallyff
would be the full first name, whilef
is the initial of the first name. Commas and dots are literals and are added in the output.Removing the dot after the
f
produces the result you want, or almost:Note that, since we used
f
instead offf
, both the first and middle names are abbreviated. But usingff
we will have both expanded. Apparently BibTeX does not have a notion of "middle name", all what is not last name is considered first name.If you need the first name "fully expanded" but the middle name abbreviated and without dot, then this is beyond my bibtex abilities. I don't even know if that would be possible.