Quantcast

Question for templates

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Question for templates

Jan David Hauck
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





------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question for templates

Christiaan Hofman

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 


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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Loading...