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

(Undo revision 102518 by 2A00:23C6:1EA9:3C01:6D07:1FDB:63B0:9EF0 (talk).)
 
Line 1: Line 1:
<cite style="font-style:normal">{{#if:
+
<includeonly><!--
  {{{last{{{author|}}}}}}
+
-->{{#replace:{{#if:{{#arraymap:{{{authors|}}}|;|x|1|}}<!--
  |{{#if:
+
-->|{{#ifexpr:{{#len:{{#arraymap:{{{authors|}}}|;|x|1|}}}}>4<!--
    {{{authorlink|}}}
+
-->|{{#explode:{{#arraymap:{{{authors|}}}|;|name<!-- first non-blank name only
    |[[{{{authorlink}}}|{{{author|{{{last}}}{{#if:{{{first|}}}|, {{{first}}}}}}}}]]
+
  -->|{{#arraymap:{{#explode:<!-- first three parts only, remove (..., cleanup
    |{{{author|{{{last}}}{{#if:{{{first|}}}|, {{{first}}}}}}}}
+
    -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
  }}{{#if:
+
    -->|(}}|,|x|x|,_}}|;}}|;}} et al{{#if:{{{date|}}}|.}}<!--
    {{{last2|{{{author2|}}}}}}
+
-->|{{#arraymap:{{{authors|}}}|;|name|{{#arraymap:{{#explode:<!--
    |{{#if:
+
    -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
        {{{author3|{{{last3|}}}}}}
+
  -->|(}}|,|x|x|,_}}|;_}}<!--
        |,&#32;
+
-->}}{{#if:{{{date|}}}|_({{#time:Y|{{{date}}}}})}}._}}|_|&#32;}}<!--
        |&#32;&amp;&#32;
+
--><cite>{{#if:{{{file|}}}|[[:File:{{{file}}}|{{{title}}}]]<!--
      }}{{#if:
+
-->|{{#if:{{{url|}}}|[{{{url}}} {{{title}}}]|{{{title}}}}}}}</cite><!--
        {{{authorlink2|}}}
+
-->{{#if:{{{conference|}}}|. {{{conference}}}<!--
        |[[{{{authorlink2}}}|{{{author2|{{#if:{{{first2|}}}|{{{first2}}}&#32;}}{{{last2|}}}}}}]]
+
-->{{#if:{{{pages|}}}|. {{#if:{{#pos:{{{pages}}}|-}}|pp|p}}. {{{pages}}}}}<!--
        |{{{author2|{{#if:{{{first2|}}}|{{{first2}}}&#32;}}{{{last2|}}}}}}
+
-->|{{#if:{{{journal|}}}|. {{{journal}}}. {{#if:{{{volume|}}}|{{{volume}}} ({{{issue}}})|{{{issue}}}}}<!--
      }}{{#if:
+
-->{{#if:{{{pages|}}}|&#58; {{{pages}}}}}}}}}<!--
        {{{last3|{{{author3|}}}}}}
+
-->{{doi link|{{{doi|}}}|prefix=.&#32;}}</includeonly>
        |&#32;&amp; {{#if:
 
          {{{authorlink3|}}}
 
          |[[{{{authorlink3}}}|{{{author3|{{#if:{{{first3|}}}|{{{first3}}}&#32;}}{{{last3|}}}}}}]]
 
          |{{{author3|{{#if:{{{first3|}}}|{{{first3}}}&#32;}}{{{last3|}}}}}}
 
        }}{{#if:
 
          {{{last4|{{{author4|}}}}}}
 
          |, et al.
 
        }}
 
      }}
 
  }}
 
  |
 
}} ({{{year}}}){{#if:
 
  {{{journal|}}}
 
  |{{#if:
 
      {{{title|}}}
 
      |, {{link|1={{{url|}}}|2="{{{title}}}"}}
 
    }}, ''{{{journal}}}''{{#if:
 
      {{{volume|}}}
 
      |, vol. {{{volume}}}
 
    }}{{#if:
 
      {{{issue|}}}
 
      |, no. {{{issue}}}
 
    }}{{#if:
 
      {{{pages|}}}
 
      |, pp. {{{pages}}}
 
      |{{#if:
 
          {{{page|}}}
 
          |, p. {{{page}}}
 
        }}
 
    }}
 
  |{{#if:
 
      {{{chapter|}}}
 
      |, {{link|1={{{url|}}}|2="{{{chapter}}}"}} in {{#if:
 
            {{{editor|}}}
 
            |{{{editor}}}, ed.,&#32;
 
          }}''{{{title}}}''{{#if:
 
              {{{edition|}}}
 
              |&#32;({{{edition}}} ed.)
 
          }}{{#if:
 
              {{{publisher|}}}
 
              |, {{{publisher}}}
 
          }}{{#if:
 
              {{{place|}}}
 
              |, {{{place}}}
 
          }}{{#if:
 
              {{{ISBN|{{{id|}}}}}}
 
              |, {{{id|ISBN {{{ISBN}}}}}}
 
          }}{{#if:
 
            {{{pages|}}}
 
            |, pp. {{{pages}}}
 
            |{{#if:
 
              {{{page|}}}
 
              |, p. {{{page}}}
 
            }}
 
          }}
 
      |{{#if:
 
            {{{title|}}}
 
            |, {{link|1={{{url|}}}|2=''{{{title}}}''}}
 
          }}{{#if:
 
              {{{edition|}}}
 
              |&#32;({{{edition}}} ed.)
 
          }}{{#if:
 
              {{{publisher|}}}
 
              |, {{{publisher}}}
 
          }}{{#if:
 
              {{{place|}}}
 
              |, {{{place}}}
 
          }}{{#if:
 
              {{{ISBN|{{{id|}}}}}}
 
              |, {{{id|ISBN {{{ISBN}}}}}}
 
          }}
 
    }}
 
}}{{#if:
 
    {{{accessdate|}}}
 
    |&#32;<nowiki>[</nowiki>{{{accessdate}}}<nowiki>]</nowiki>
 
}}</cite><noinclude>
 
[[Category:Citation templates|{{PAGENAME}}]]
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
 
</noinclude>
 

Latest revision as of 13:14, 6 September 2024