Difference between revisions of "Template:PrintAuthorsArrayLastNameCommaFirstName"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> 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 ther...")
 
Line 6: Line 6:
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
-->{{#arraydefine:author |{{{authors|}}} }}<!--
+
-->{{#if: {{{authors|}}}<!--
-->{{#if: author|<!--
+
-->|{{#arraydefine:authorsArray |{{{authors|}}} }}<!--
-->|{{#ifexpr: {{#arraysize:author}} < 4 <!--
+
  -->{{#ifexpr: {{#arraysize:authorsArray}} < 4 <!--
   -->|{{#arrayprint:author |;<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:author |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:10, 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.