Difference between revisions of "Template:PrintAuthorLastNameCommaFirstName"
Jump to navigation
Jump to search
m (HakobBarseghyan moved page Template:AuthorLastNameCommaFirstName to Template:PrintAuthorLastNameCommaFirstName without leaving a redirect) |
|||
Line 9: | Line 9: | ||
</noinclude><includeonly><!-- | </noinclude><includeonly><!-- | ||
-->{{#if: {{{author|}}}|<!-- | -->{{#if: {{{author|}}}|<!-- | ||
− | -->{{#show: {{{author|}}}| ?Last Name}}, {{#show: {{{author|}}}| ?First Name}}<!-- | + | --><!-- |
+ | --><!-- check if the author has a last name | ||
+ | -->{{#vardefine: varLastName|{{#show: {{{author|}}}| ?Last Name}}|}}<!-- | ||
+ | --><!-- | ||
+ | -->{{#if: {{var: varLastName}}<!-- | ||
+ | -->|{{var: varLastName}}, {{#show: {{{author|}}}| ?First Name}}<!-- | ||
+ | -->|{{#show: {{{author|}}}| ?First Name}}<!-- | ||
+ | -->}}<!-- if | ||
-->}}<!-- | -->}}<!-- | ||
--></includeonly> | --></includeonly> |
Revision as of 15:06, 6 July 2017
Use this template to format the name of the author as "Last Name, First Name", i.e. to turn, for instance "Imre Lakatos" to "Lakatos, Imre". This is useful when formatting bibliographic records.
NOTE: As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
Parameters:
|author=
- the author's full name as stated on the author's page title.