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

(Created page with "<includeonly><!-- Attn: date must be YYYY-MM-DD or YYYY-MM or YYYY or omitted. -->{{#if:{{{file|}}}|[[:File:{{{file}}}|"{{{title}}}"]]<!-- -->|{{#if:{{{url|}}}|[{{{url}}} "{{...")
 
(Author et al fix.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!-- Attn: date must be YYYY-MM-DD or YYYY-MM or YYYY or omitted.
+
<includeonly><!-- Attn: 'date' must be YYYY-MM-DD or YYYY-MM or YYYY or omitted.
 +
'authors' is expected to be name[; name; ...]
 +
where name is 'surname, first name middle names, suffix (affiliation), etc'.
 +
All parts of the name can be blank or omitted.
 +
-->{{#replace:{{#if:{{#arraymap:{{{authors|}}}|;|x|1|}}<!--
 +
-->|{{#ifexpr:{{#len:{{#arraymap:{{{authors|}}}|;|x|1|}}}}>4<!--
 +
-->|{{#explode:{{#arraymap:{{{authors|}}}|;|name<!-- first non-blank name only
 +
  -->|{{#arraymap:{{#explode:<!-- first three parts only, remove (..., cleanup
 +
    -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
 +
    -->|(}}|,|x|x|,_}}|;}}|;}} et al<!--
 +
-->|{{#arraymap:{{{authors|}}}|;|name|{{#arraymap:{{#explode:<!--
 +
    -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
 +
  -->|(}}|,|x|x|,_}}|;_}}<!--
 +
-->}}._}}|_|&#32;}}<!--
 
-->{{#if:{{{file|}}}|[[:File:{{{file}}}|"{{{title}}}"]]<!--
 
-->{{#if:{{{file|}}}|[[:File:{{{file}}}|"{{{title}}}"]]<!--
 
  -->|{{#if:{{{url|}}}|[{{{url}}} "{{{title}}}"]|"{{{title}}}"}}}}<!--
 
  -->|{{#if:{{{url|}}}|[{{{url}}} "{{{title}}}"]|"{{{title}}}"}}}}<!--
-->{{#switch:{{{publ|}}}<!--
+
-->{{#if:{{{cat|}}}|&#32;({{{cat}}})}}<!--
-->|={{#if:{{{pid|}}}, PID {{{pid}}}}}<!--
+
-->{{#if:{{{pid|}}}|{{#switch:{{{publ|}}}<!--
-->|AMD={{#if:{{{pid|}}}|, AMD Publ. #{{{pid}}}|, AMD Inc.}}<!--
+
  -->|AMD=, AMD Publ. #{{{pid}}}<!--
-->|Intel=, Intel Corp.{{#if:{{{pid|}}}|, Order Nr. {{{pid}}}}}<!--
+
  -->|DEC=, DEC Order Nr. {{{pid}}}<!--
  -->|, {{{publ}}}}}<!--
+
  -->|Intel=, Intel Order Nr. {{{pid}}}<!--
 +
  -->|MIPS=, MIPS Doc. Nr. {{{pid}}}<!--
 +
  -->|{{#if:{{{publ|}}}|, {{{publ}}}}}, PID {{{pid}}}}}<!--
 +
  -->|{{#if:{{{publ|}}}|, {{{publ}}}}}}}<!--
 
-->{{#if:{{{rev|}}}|, Rev. {{{rev}}}}}<!--
 
-->{{#if:{{{rev|}}}|, Rev. {{{rev}}}}}<!--
 
-->{{#switch:{{#len:{{{date|}}}}}<!--
 
-->{{#switch:{{#len:{{{date|}}}}}<!--

Latest revision as of 03:49, 2 April 2022