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}}} "{{...")
 
(Added authors parameter.)
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.
 +
-->{{#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|,\s}}|;}}|;}} et al.<!--
 +
-->|{{#arraymap:{{{authors|}}}|;|name|{{#arraymap:{{#explode:<!--
 +
    -->{{#explode:name|,}},{{#explode:name|,|1}},{{#explode:name|,|2}}<!--
 +
  -->|(}}|,|x|x|,\s}}|;\s}}<!--
 +
-->}}.&#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|}}}}}<!--

Revision as of 02:05, 20 March 2022