On Jan 5, 2015, at 4:01, Jan David Hauck wrote:

> Hello, 
> 
> I am trying to create a template with full firstnames of authors and am 
> running into trouble with authors that have a middle name initial listed with 
> a fullstop. I don't want the fullstop after their middle name initial to 
> create two consecutive fullstops in the output. 
> 
> In my bibliography some of the authors are listed as 
> Lastname, Firstname
> some as 
> Lastname, Firstname M.
> others 
> Lastname, F. M. (if they go by their initials)
> 
> They should render as 
> Lastname, Firstname. 1990. Title
> Lastname, Firstname M. 1990. Title
> Lastname, F. M. 1990. Title
> 
> For the last two cases I'm getting 
> Lastname, Firstname M.. 1990. Title
> Lastname, F. M.. 1990. Title
> 
> Is there anything that would achieve something like a modifier 
> stringByAppendingFullStopUnlessFullstopAlreadyPresent ... ;)
> 
> Basically something that only places a full stop somewhere if the preceding 
> character is not a full stop.
>  
> Or any other suggestion of a workaround?
> 
> Thanks!!
> 
> Jan

You could do something like 

<$authors.normalizedName.@componentsJoinedByCommaAndAnd.stringByAppendingFullStopIfNotEmpty/>

This will not add the period when there already was one at the end.

Christiaan

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to