Template:cite pu: Difference between revisions
Content deleted Content added
No edit summary |
added language parameter and more documentation |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{short|}}}|{{pu}}, {{pp|{{{page|{{{1}}}}}}}}.|{{cite book|author=[[jan Sonja|Lang, Sonja]]|date= |
<includeonly>{{#ifeq:{{{2|}}}|eo|{{#if:{{{short|}}}|{{pu}} ({{ISO|eo}}), {{pp|{{{page|{{{1}}}}}}}}.|{{cite book|author=[[jan Sonja|Lang, Sonja]]|date=1 October 2022|title={{pu|eo}}|translator=[[jan Pensa|Spencer van der Meulen]]|isbn=978-94-6437-609-8|page={{{page|{{{1|}}}}}}|quote={{{quote|}}}}}}}|{{#ifeq:{{{2|}}}|de|{{#if:{{{short|}}}|{{pu}} ({{ISO|de}}), {{pp|{{{page|{{{1}}}}}}}}.|{{cite book|author=[[jan Sonja|Lang, Sonja]]|date=1 December 2021|title={{pu|de}}|translator=[[jan Juli|Julius Strake]]|isbn=979-8-7707-5525-1|page={{{page|{{{1|}}}}}}|quote={{{quote|}}}}}}}|{{#ifeq:{{{2|}}}|fr|{{#if:{{{short|}}}|{{pu}} ({{ISO|fr}}), {{pp|{{{page|{{{1}}}}}}}}.|{{cite book|author=[[jan Sonja|Lang, Sonja]]|date=24 April 2016|title={{pu|fr}}|translator=Sonja Lang|publisher=Tawhid|isbn=978-0-9782923-5-5|page={{{page|{{{1|}}}}}}|quote={{{quote|}}}}}}}|{{#if:{{{short|}}}|{{pu}}, {{pp|{{{page|{{{1}}}}}}}}.|{{cite book|author=[[jan Sonja|Lang, Sonja]]|date=25 May 2014|title={{pu|en}}|publisher=Tawhid|isbn=978-0978292300|oclc=921253340|page={{{page|{{{1|}}}}}}|quote={{{quote|}}}}}}}}}}}}}</includeonly><noinclude>{{tp title|pu}} |
||
==Documentation== |
==Documentation== |
||
<templatedata> |
|||
{ |
|||
"params": { |
|||
"1": { |
|||
"label": "Page", |
|||
"description": "The page(s) of pu that are referenced", |
|||
"type": "string", |
|||
"required": true |
|||
}, |
|||
"2": { |
|||
"label": "Language", |
|||
"description": "Language of desired pu edition (2- or 3-letter language code)", |
|||
"suggestedvalues": [ |
|||
"en", |
|||
"fr", |
|||
"de", |
|||
"eo" |
|||
], |
|||
"default": "en", |
|||
"suggested": true, |
|||
"type": "string" |
|||
}, |
|||
"short": { |
|||
"label": "Short reference", |
|||
"description": "Turns it into a summarized reference. Set to any value to show the new versions.", |
|||
"example": "y", |
|||
"type": "boolean", |
|||
"suggested": true |
|||
}, |
|||
"quote": { |
|||
"label": "Quote", |
|||
"description": "Can be used to quote a specific passage from the book.", |
|||
"type": "string" |
|||
} |
|||
}, |
|||
"description": "Returns a citation of pu.", |
|||
"paramOrder": [ |
|||
"1", |
|||
"2", |
|||
"short", |
|||
"quote" |
|||
], |
|||
"format": "inline" |
|||
} |
|||
</templatedata> |
|||
=== Examples === |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! style="width:50%;"|Code |
! style="width:50%;"|Code |
||
Line 19: | Line 65: | ||
| |
| |
||
Lorem ipsum.<ref>{{cite pu|20}}</ref> |
Lorem ipsum.<ref>{{cite pu|20}}</ref> |
||
<references /> |
|||
|- |
|||
| |
|||
<syntaxhighlight lang="xml"> |
|||
Lorem ipsum.<ref>{{cite pu|20|quote=An adjective is a word that describes a noun.}}</ref> |
|||
</syntaxhighlight> |
|||
| |
|||
Lorem ipsum.<ref>{{cite pu|20|quote=An adjective is a word that describes a noun.}}</ref> |
|||
<references /> |
<references /> |
||
|- |
|- |
||
Line 27: | Line 81: | ||
| |
| |
||
Lorem ipsum.<ref>{{cite pu|20|short=yes}}</ref> |
Lorem ipsum.<ref>{{cite pu|20|short=yes}}</ref> |
||
<references /> |
|||
|- style="border-top:3px solid darkgray;" |
|||
| |
|||
<syntaxhighlight lang="xml"> |
|||
Lorem ipsum.<ref>{{cite pu||fr}}</ref> |
|||
</syntaxhighlight> |
|||
| |
|||
Lorem ipsum.<ref>{{cite pu||fr}}</ref> |
|||
<references /> |
|||
|- |
|||
| |
|||
<syntaxhighlight lang="xml"> |
|||
Lorem ipsum.<ref>{{cite pu|22|fr|quote=L'adjectif est un mot qui décrit un nom.}}</ref> |
|||
</syntaxhighlight> |
|||
| |
|||
Lorem ipsum.<ref>{{cite pu|22|fr|quote=L'adjectif est un mot qui décrit un nom.}}</ref> |
|||
<references /> |
|||
|- |
|||
| |
|||
<syntaxhighlight lang="xml"> |
|||
Lorem ipsum.<ref>{{cite pu|22|fr|short=yes}}</ref> |
|||
</syntaxhighlight> |
|||
| |
|||
Lorem ipsum.<ref>{{cite pu|22|fr|short=yes}}</ref> |
|||
<references /> |
<references /> |
||
|} |
|} |
||
[[Category:Citation templates]] |
[[Category:Citation templates]] |
||
</noinclude> |
</noinclude> |
||
<includeonly>[[Category:cite pu]]</includeonly> |