Difference between revisions of "Template:PrintAuthorsArrayLastNameCommaFirstName"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 8: Line 8:
 
-->{{#if: {{{authors|}}}<!--
 
-->{{#if: {{{authors|}}}<!--
 
  -->|{{#arraydefine:authorsArray |{{{authors|}}} }}<!--
 
  -->|{{#arraydefine:authorsArray |{{{authors|}}} }}<!--
   -->{{#ifexpr: {{#arraysize:authorsArray}} < 4 <!--
+
   -->{{#ifexpr: {{#arraysize:authorsArray}} < 4 |<!--
   -->|{{#arrayprint:authorsArray |;<nowiki> </nowiki>|@@@@|{{AuthorLastNameCommaFirstName|author=@@@@}}|print=pretty }}<!-- less than four authors
+
   -->{{#arrayprint:authorsArray |;<nowiki> </nowiki>|@@@@|{{AuthorLastNameCommaFirstName|author=@@@@}}|print=pretty }}<!-- less than four authors
 
   -->|{{AuthorLastNameCommaFirstName|author={{#arrayindex:authorsArray |0 }} }} ''et al.''<!-- more than three authors
 
   -->|{{AuthorLastNameCommaFirstName|author={{#arrayindex:authorsArray |0 }} }} ''et al.''<!-- more than three authors
 
   -->}}<!--ifexpr
 
   -->}}<!--ifexpr
 
-->}}<!--if
 
-->}}<!--if
 
--></includeonly>
 
--></includeonly>

Revision as of 02:14, 13 August 2016

This template is used to convert an array of author names like "Thomas Kuhn, Imre Lakatos, Larry Laudan" into "Kuhn, Thomas; Lakatos, Imre; Laudan, Larry". If there are more than three authors, the "Kuhn, Thomas et al. will be returned.

Parameters:

  • |authors= - a comma delimited list of authors.