Our university reference style DEMANDS!! the following format:
author={Els, Daniel Nicolaas and de Klerk, Nico-Ben}
-> Els, D.N. & de Klerk, N.-B. (no spaces between initials)
From merlin.mbs of the makebst bundle I got the following:
"{vv~}{ll}{, jj}{, f{}}" format.name$ -> Els, DN & de Klerk, NB
"{vv~}{ll}{, jj}{, f{.}.}" format.name$ -> Els, D.N. & de Klerk, N.B.
"{vv~}{ll}{, jj}{, f.}" format.name$ -> Els, D. N. & de Klerk, N.-B.
I can not get it to eliminate the space and still write double name
initials with the hyphen. Is there a way to get around this. (Even the
stuff from makebst eats up the hyphen)
I hope someone can help.
Danie Els
(change the first name to initials DNJ in e-address)
Take a look at the article "Designing BibTeX Styles", which is distributed
as btxhak.*. You may already have that on your system. If not, then you
can download it from CTAN.
-- Scott
I fought with this for a long time too and even mentioned it in some list or
other, with no reply. I came to the conclusion that the only way is the
nasty way:
STRINGS {z}
FUNCTION {remove.spaces}
{ 'z :=
""
{ z empty$ not }
{ z #1 #1 substring$
z #2 global.max$ substring$ 'z :=
duplicate$ "~" =
'pop$
{ duplicate$ " " =
'pop$
{ * }
if$
}
if$
}
while$
}
INTEGERS { nameptr namesleft numnames }
FUNCTION {forname.format.string}
{ "{f.}" }
FUNCTION {surname.format.string}
{ "{vv~}{ll}" }
FUNCTION {jnrname.format.string}
{ "{, jj}" }
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr forname.format.string format.name$ remove.spaces
duplicate$ empty$ 'skip$ { "~" * } if$
s nameptr surname.format.string format.name$ *
s nameptr jnrname.format.string format.name$ *
't :=
nameptr #1 >
{ namesleft max.authors.biblio <
{ namesleft #1 >
{ ", " * t * }
{ t "others" =
{ " " * etal * }
{ " and " * t * }
if$
}
if$
}
{ #0 'namesleft :=
" " * etal *
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
This may not do exactly what you want in terms of order etc., but it does
solve the basic problem via the remove.spaces function, which does simply
that.
Hope this helps.
Cheers, Phil Ratcliffe