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|,_}}|;_}}<!-- | ||
+ | -->}}._}}|_| }}<!-- | ||
-->{{#if:{{{file|}}}|[[:File:{{{file}}}|"{{{title}}}"]]<!-- | -->{{#if:{{{file|}}}|[[:File:{{{file}}}|"{{{title}}}"]]<!-- | ||
-->|{{#if:{{{url|}}}|[{{{url}}} "{{{title}}}"]|"{{{title}}}"}}}}<!-- | -->|{{#if:{{{url|}}}|[{{{url}}} "{{{title}}}"]|"{{{title}}}"}}}}<!-- | ||
− | -->{{# | + | -->{{#if:{{{cat|}}}| ({{{cat}}})}}<!-- |
− | + | -->{{#if:{{{pid|}}}|{{#switch:{{{publ|}}}<!-- | |
− | + | -->|AMD=, AMD Publ. #{{{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|}}}}}<!-- |