User:Harrystein/sandbox/template/MIA citation/5: Difference between revisions

From Leftypedia
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{#tag:ref|<!--
<noinclude>
-->[[Karl Marx|Marx, Karl]]{{#ifeq:{{{volume|}}}|1||{{nbsp}}&{{nbsp}}[[Friedrich Engels|Engels, Friedrich]]}} ({{trim|{{array|get|1867,1885,1894|,|{{{volume|}}}}}}}). ''[[Das Kapital, Volume {{trim|{{array|get|I,II,III|,|{{{volume|}}}}}}}|Capital, Volume {{trim|{{array|get|I,II,III|,|{{{volume|}}}}}}}]]'', Chapter {{{chapter|}}}: [[Das Kapital, Volume {{trim|{{array|get|I,II,III|,|{{{volume|}}}}}}}, Chapter <!--
Primarily intended for sub-template use by forthcoming MIA cite template, but also may come in handy when called directly.
Next: Capitalize e.g. Twenty-eight to Twenty-Eight.
1 = work e.g. capital
2 = volume e.g. 1
3 = chapter e.g. 3
 
</noinclude>{{#switch:|{{{work|{{{1|}}}}}}<!--
 
1. Capital
-->| capital = [[Karl Marx|Marx, Karl]]{{#ifeq:{{{volume|}}}|1||{{nbsp}}&{{nbsp}}[[Friedrich Engels|Engels, Friedrich]]}} ({{trim|{{array|get|1867,1885,1894|,|{{{volume|}}}}}}}). ''[[Das Kapital, Volume {{trim|{{array|get|I,II,III|,|{{{volume|}}}}}}}|Capital, Volume {{trim|{{array|get|I,II,III|,|{{{volume|}}}}}}}]]'', Chapter {{{chapter|}}}: [[Das Kapital, Volume {{trim|{{array|get|I,II,III|,|{{{volume|}}}}}}}, Chapter <!--
 
1.1: Next: Capitalize e.g. Twenty-eight to Twenty-Eight.
-->{{#if: {{switch by pattern|_input={{{chapter|}}}|true=[^1][1-9]|_default=}}
-->{{#if: {{switch by pattern|_input={{{chapter|}}}|true=[^1][1-9]|_default=}}
| {{ucfirst:{{string split|{{number to word|{{{chapter|}}}}}|-}}}}-{{ucfirst:{{string split|{{number to word|{{{chapter|}}}}}|-|2}}}}
  | {{ucfirst:{{string split|{{number to word|{{{chapter|}}}}}|-}}}}-{{ucfirst:{{string split|{{number to word|{{{chapter|}}}}}|-|2}}}}
| {{ucfirst:{{number to word|{{{chapter|}}}}}}}
  | {{ucfirst:{{number to word|{{{chapter|}}}}}}}
}}<!--
  }}<!--
Rest of the wikilink, i.e. the chapter title in the link target, plus the alias (chapter title).
 
-->: {{user:Harrystein/sandbox/template/MIA citation/4|{{{volume|}}}|{{{chapter|}}}}}|"{{user:Harrystein/sandbox/template/MIA citation/4|{{{volume|}}}|{{{chapter|}}}}}."]]
1.2: Rest of the wikilink, i.e. the chapter title in the link target, plus the alias (chapter title).
}}
-->: {{user:Harrystein/sandbox/template/MIA citation/4|{{{volume|}}}|{{{chapter|}}}}}|"{{user:Harrystein/sandbox/template/MIA citation/4|{{{volume|}}}|{{{chapter|}}}}}."]]  
|
|
}}

Revision as of 00:46, 2 June 2024

Primarily intended for sub-template use by forthcoming MIA cite template, but also may come in handy when called directly.

1 = work e.g. capital
2 = volume e.g. 1
3 = chapter e.g. 3

Marx, Karl & Engels, Friedrich (1867). Capital, Volume I, Chapter : [[Das Kapital, Volume I, Chapter Lua error in Module:ConvertNumeric at line 576: Invalid decimal numeral.: |"."]]