Template:MIA citation/special: Difference between revisions
Harrystein (talk | contribs) mNo edit summary |
Harrystein (talk | contribs) (attempt to add switch function that converts arabic numerals to roman in the hyperlink) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 29: | Line 29: | ||
1.3: Hyperlink. Essentially builds a hyperlink if none is found. Special cases accounted for are Volume II chs. 20 & 21. | 1.3: Hyperlink. Essentially builds a hyperlink if none is found. Special cases accounted for are Volume II chs. 20 & 21. | ||
-->[{{if then show|{{{link|{{{4|}}}}}}|https://www.marxists.org/archive/marx/works/{{tarray|get|1867-c1,1885-c2,1894-c3|,|{{{volume|{{{2|}}}}}}}}/ch{{#switch: {{{volume|{{{2|}}}}}}{{{chapter|{{{3|}}}}}} | 220 | 221 = {{{chapter|{{{3|}}}}}}_01 | {{#ifexpr: {{{chapter|{{{3|}}}}}} > 9 | {{{chapter|{{{3|}}}}}} | 0{{{chapter|{{{3|}}}}}}}}}}.htm}} Available online] | -->[{{if then show|{{{link|{{{4|}}}}}}|https://www.marxists.org/archive/marx/works/{{tarray|get|1867-c1,1885-c2,1894-c3|,|{{{volume|{{{2|}}}}}}}}/ch{{#switch: {{{volume|{{{2|}}}}}}{{{chapter|{{{3|}}}}}} | 220 | 221 = {{{chapter|{{{3|}}}}}}_01 | {{#ifexpr: {{{chapter|{{{3|}}}}}} > 9 | {{{chapter|{{{3|}}}}}} | 0{{{chapter|{{{3|}}}}}}}}}}.htm}} Available online]<!-- | ||
2. What Is To Be Done | 2. What Is To Be Done | ||
-->| witbd = [[Vladimir Lenin|Lenin, V. I.]] (1901). ''[[What Is to be Done?|What Is To Be Done? Burning Questions of Our Movement]]''. <!-- | -->| witbd = [[Vladimir Lenin|Lenin, V. I.]] (1901). ''[[What Is to be Done?|What Is To Be Done? Burning Questions of Our Movement]]''. <!-- | ||
-->{{#switch: {{{chapter|{{{3|}}}}}} | -->{{#switch: {{{chapter|{{{3|}}}}}} | ||
| preface = Preface | | preface = Preface. | ||
| i | 1 = Chapter I: "Dogmatism And 'Freedom of Criticism'" | | i | 1 = Chapter I: "Dogmatism And 'Freedom of Criticism'." | ||
| ii | 2 = Chapter II: "The Spontaneity of the Masses and the Consciousness of the Social-Democrats" | | ii | 2 = Chapter II: "The Spontaneity of the Masses and the Consciousness of the Social-Democrats." | ||
| iii | 3 = Chapter III: "Trade-Unionist Politics And Social-Democratic Politics" | | iii | 3 = Chapter III: "Trade-Unionist Politics And Social-Democratic Politics." | ||
| iv | 4 = Chapter IV: "The Primitiveness of the Economists and the Organization of the Revolutionaries" | | iv | 4 = Chapter IV: "The Primitiveness of the Economists and the Organization of the Revolutionaries." | ||
| v | 5 = Chapter V: "The 'Plan' For an All-Russia Political Newspaper" | | v | 5 = Chapter V: "The 'Plan' For an All-Russia Political Newspaper." | ||
| concl | conclusion = Conclusion | | concl | conclusion = Conclusion. | ||
| appendix = Appendix: The Attempt to Unite ''Iskra'' With ''Rabocheye Dyelo'' | | appendix = Appendix: The Attempt to Unite ''Iskra'' With ''Rabocheye Dyelo'' | ||
| correctn = Correction | | correctn | correction = Correction | ||
| fail | | fail | ||
}}.<!-- | }} <!-- | ||
https://www.marxists.org/archive/lenin/works/1901/witbd/i.htm | |||
2.?: Hyperlink. Essentially builds a hyperlink if none is found. Converts Arabic numerals into roman numerals etc. to make it fit the hyperlink format. | |||
-->[{{if then show|{{{link|{{{4|}}}}}}|https://www.marxists.org/archive/lenin/works/witbd/{{#switch: {{{chapter|{{{3|}}}}}} | 1 = i | 2 = ii | 3 = iii | 4 = iv | 5 = v | conclusion = concl | correction = correctn | {{{chapter|{{{3|}}}}}}}}.htm}} Available online]<!-- | |||
Other works: | Other works: | ||
-->| | -->| | ||
}} | }} |
Revision as of 00:17, 14 June 2024
Special case citer. Primarily intended for sub-template use by forthcoming MIA cite template, but will definitely come in handy for being called directly, e.g.:
{{MIA citation/special|capital|3|13}}
Producing:
- Marx, Karl & Engels, Friedrich (1894). Capital, Volume III. Chapter 13: "The Law as Such." Available online
In this way, one can cite a given MIA text without having to grab the link, providing an option that some may find to be a time-saver. However, i have no idea whether creating several sub-templates is a resource issue versus putting them under the regular MIA citation template as "special cases"; as such, i will leave SUS and Manifesto there for now even though they would be immensely handy, and editing them like this - without having to deal with endless sub-curly-brackets and functions and whatnot - would be probably easier. -Harry 6/6/24
1 = work e.g. capital 2 = volume e.g. 1 3 = chapter e.g. 3 4 = link e.g. https:// etc. etc.
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.: |"."]] Expression error: Unexpected > operator..htm Available online