Conditional spacing between initials

Jul 29, 2009 at 3:34 AM
Edited Jul 29, 2009 at 3:35 AM

I'm trying to create a bibliography style that looks like this:

Smith, A.B., C. Jones and J.Q. Public, Title here, Some Journal, 42, 210-212, 1999.

I got as far as:

Smith, A.B., C.Jones and J.Q. Public, Title here, Some Journal, 42, 210-212, 1999.

Note the lack of a space between C.Jones.  My namelists formatting lines are:

<first_person>{%Last|First|Middle%{, %First:adp|Middle:adp%{%Middle:adp%}}}</first_person>
<other_persons>{%First:adp|Middle|Last%{%Middle:adp|Last%{ %Last%}}}</other_persons>

 

I get that the space is missing because there is no middle initial, so the last condition ({ %Last%}) never executes.  But I have tried in vain to insert a space in the second condition that will apply only to the last name, and not to the middle initial.  Anyone know how to do this?

Coordinator
Jul 29, 2009 at 7:40 AM
Edited Jul 29, 2009 at 7:43 AM

You could reverse your conditional logic:

1)First display the last name, and if that is not available, fall back to first or middle name.

{%Last|First|Middle%}

2)Now display the first and middle name in front of it.

{{%Middle:adp|First:adp%} %Last|First|Middle%}

3)Finally, display the first name in front if not yet displayed/used.

{{{%First:adp%}%Middle:adp|First:adp%} %Last|First|Middle%}

Alternatively, you can simplify this logic to:

{{%First:adp%}{%Middle:adp%} %Last|First|Middle%}.

Note that BibWord cleans up unwanted spaces. So if a name would only consists of a last name, you would not get a double space.