Last names in small capital

Hi,

In OS 3.4, how to show only the last names in small caps?

Thank you,


Anas

Hi @aghrab,

Can you provide more details about what you’re trying to do here? Perhaps share a screenshot and highlight what you’d like to appear as small caps?

-Roger
PKP Team

I would like to get the only the last names, not the given names (or forenames) in small capital. I have added this in the css:

.authors {
    font-variant: small-caps;
}

Which gave the result in the screenshot.

So how to format only one part of the fullName of an author ?

Thanks,


Anas

You would have to modify all the templates that extract the author name and instead extract family and given names separately and assign classes to each.

However, if you have a multijournal platform, you should be aware that all journals are affected if you change the central templates.

2 Likes

Hi Anas,

I wrote half this reply yesterday and you’ve gotten some good responses since then, I’ll just add a couple things:

  • While givenName and familyName do show up as separate fields in the OJS database, or if you do an XML export of an article, based on this template templates\frontend\objects\article_details.tpl the site pulls the full name for display purposes. You’d have to change that in order to be able to style different parts of the name separately (which is a pretty significant deviation from the standard OJS template).

  • Depending on your theme, names may be styled as different things or in different ways depending on where they are, e.g. table of contents vs. article view page. You’d have to check for everywhere the names/authors show up.

  • I found this other forum post about some changes to the way OJS handles names to make it friendlier for multilingual contexts so I’d be wary of deviating too far for those reasons as well… it also doesn’t require all the name fields to be filled so you might run into trouble depending on the kinds of names your authors have now or in the future. Names get complicated fast!
    Configure "Author name conventions"

All the best with your journal!

1 Like