From WikiChip
Difference between revisions of "Template:cite techdoc"

(Added authors parameter.)
(Author et al fix.)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
where name is 'surname, first name middle names, suffix (affiliation), etc'.
 
where name is 'surname, first name middle names, suffix (affiliation), etc'.
 
All parts of the name can be blank or omitted.
 
All parts of the name can be blank or omitted.
-->{{#if:{{#arraymap:{{{authors|}}}|;|x|1|}}<!--
+
-->{{#replace:{{#if:{{#arraymap:{{{authors|}}}|;|x|1|}}<!--
 
-->|{{#ifexpr:{{#len:{{#arraymap:{{{authors|}}}|;|x|1|}}}}>4<!--
 
-->|{{#ifexpr:{{#len:{{#arraymap:{{{authors|}}}|;|x|1|}}}}>4<!--
 
  -->|{{#explode:{{#arraymap:{{{authors|}}}|;|name<!-- first non-blank name only
 
  -->|{{#explode:{{#arraymap:{{{authors|}}}|;|name<!-- first non-blank name only
 
   -->|{{#arraymap:{{#explode:<!-- first three parts only, remove (..., cleanup
 
   -->|{{#arraymap:{{#explode:<!-- first three parts only, remove (..., cleanup
 
     -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
 
     -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
     -->|(}}|,|x|x|,\s}}|;}}|;}} et al.<!--
+
     -->|(}}|,|x|x|,_}}|;}}|;}} et al<!--
 
  -->|{{#arraymap:{{{authors|}}}|;|name|{{#arraymap:{{#explode:<!--
 
  -->|{{#arraymap:{{{authors|}}}|;|name|{{#arraymap:{{#explode:<!--
 
     -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
 
     -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
   -->|(}}|,|x|x|,\s}}|;\s}}<!--
+
   -->|(}}|,|x|x|,_}}|;_}}<!--
  -->}}.&#32;}}<!--
+
  -->}}._}}|_|&#32;}}<!--
 
-->{{#if:{{{file|}}}|[[:File:{{{file}}}|"{{{title}}}"]]<!--
 
-->{{#if:{{{file|}}}|[[:File:{{{file}}}|"{{{title}}}"]]<!--
 
  -->|{{#if:{{{url|}}}|[{{{url}}} "{{{title}}}"]|"{{{title}}}"}}}}<!--
 
  -->|{{#if:{{{url|}}}|[{{{url}}} "{{{title}}}"]|"{{{title}}}"}}}}<!--

Latest revision as of 03:49, 2 April 2022