Citation extractors have problem with hyphenated first name

This is related to an unsolved issue in an old post: https://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=11631

It should be easy to fix if I know how to write PHP.

What I need is to modify this piece of code in the citationFormat tpl file

{$firstName|escape|truncate:1:"":true}

Can anyone help modify the code to allow it to extract the first name “Zong-Tong” into “ZT” instead of “Z”?

Thank you.

Hi @newbies,

Unfortunately I can’t help with the specifics of a customization. Part of the problem here will be coming up with a good ruleset for hyphenation of names, and this can be more complicated than you’d expect – see e.g. http://stackoverflow.com/questions/275160/regex-for-names for some discussion.

Regards,
Alec Smecher
Public Knowledge Project Team