Template:Pub2: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
No edit summary
m (Text replacement - "Category:Experimental templates]]" to "Category:DPL templates]] Category:Experimental templates")
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr:{{{1|}}}<26|{{#dplvar:set|pno|0}}{{#if:{{{cmp|}}}|{{#dplvar:set|pno|-1}}{{#ifexpr:{{{1|}}}=1|'''{{{cmp|}}}'''&nbsp;{{{2|}}}{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}}}|{{#if:{{{ms}}}|{{#dplvar:set|pno|-1}}{{#ifexpr:{{{1|}}}=1|'''Manuscript'''&nbsp;{{{2|}}}{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}}}|{{#switch:{{#expr:{{{1|}}}+{{#dplvar:pno}}}}|1='''First'''|2=&nbsp; '''2nd'''|3=&nbsp; '''3rd'''|21=&nbsp; '''21st'''|22=&nbsp; '''22nd'''|23=&nbsp; '''23rd'''|&nbsp; '''{{{1|}}}th'''}}{{#if:{{{2|}}}|&nbsp;'''published:''' {{#multireplace:{{{2|}}}| /^(.*)?(\d\d\d\d)/=$1{{Cat|$2 works|$2}}}}{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}|&nbsp;'''published:'''{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}}}{{#if:{{{vol|}}}|, {{#ifeq:{{#sub:{{{vol|}}}|-1}}|.|{{#sub:{{{vol|}}}|0|{{#expr:{{#len:{{{vol|}}}}}-1}}}}|{{{vol|}}}}}[[Category:Works in Volume {{#explode:{{{vol|}}}| |1}}]]}}{{#if:{{{no|}}}|, no. {{#ifeq:{{#sub:{{{no|}}}|-1}}|.|{{#sub:{{{no|}}}|0|{{#expr:{{#len:{{{no|}}}}}-1}}}}|{{{no|}}}}}}}{{#if:{{{pg|}}}|, p. {{#ifeq:{{#sub:{{{pg|}}}|-1}}|.|{{#sub:{{{pg|}}}|0|{{#expr:{{#len:{{{pg|}}}}}-1}}}}|{{{pg|}}}}}}}}}<br>}}</includeonly><noinclude>
<includeonly>{{#ifexpr:{{{1|}}}<50|{{#ifexpr:{{{1|}}}=0|{{#if:{{{cmp|}}}|'''{{{cmp|}}}'''&nbsp;{{{2|}}}{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}|{{#if:{{{ms|}}}|&nbsp;'''Manuscript''' {{#replaceset:{{{2|}}}| /^(.*)?(\d\d\d\d)/=$1{{Cat|$2 works|$2}}}}{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}}}}}|{{#switch:{{#expr:{{{1|}}}}}|1='''First'''|2=&nbsp; '''2nd'''|3=&nbsp; '''3rd'''|21=&nbsp; '''21st'''|22=&nbsp; '''22nd'''|23=&nbsp; '''23rd'''|&nbsp; '''{{{1|}}}th'''}}&nbsp;'''published:''' {{#if:{{{2|}}}|{{#replaceset:{{{2|}}}| /^(.*)?(\d\d\d\d)/=$1{{Cat|$2 works|$2}}}}{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}}}|&nbsp;'''published:'''{{#if:{{{3|}}}|&nbsp;{{#ifeq:{{#sub:{{{3|}}}|-1}}|.|{{#sub:{{{3|}}}|0|{{#expr:{{#len:{{{3|}}}}}-1}}}}|{{{3|}}}}}}}}}{{#if:{{{vol|}}}|, {{#ifeq:{{#sub:{{{vol|}}}|-1}}|.|{{#sub:{{{vol|}}}|0|{{#expr:{{#len:{{{vol|}}}}}-1}}}}|{{{vol|}}}}}[[Category:Works in Volume {{#explode:{{{vol|}}}| |1}}]]}}{{#if:{{{no|}}}|, no. {{#ifeq:{{#sub:{{{no|}}}|-1}}|.|{{#sub:{{{no|}}}|0|{{#expr:{{#len:{{{no|}}}}}-1}}}}|{{{no|}}}}}}}{{#if:{{{pg|}}}|, p. {{#ifeq:{{#sub:{{{pg|}}}|-1}}|.|{{#sub:{{{pg|}}}|0|{{#expr:{{#len:{{{pg|}}}}}-1}}}}|{{{pg|}}}}}}}}}<br></includeonly><noinclude>EXPERIMENTAL TEMPLATE
EXPERIMENTAL TEMPLATE


'''New Features in Bold (proposed, yet to be implemented)'''
'''New Features in Bold (proposed, yet to be implemented)'''


Syntax:
Syntax:
<tt><nowiki>{{Pub|N|YYYY|in <Publication Name>|no=S|pg=P|vol=Volname N|</nowiki>'''ed{{eq}}E{{!}}arr{{eq}}A{{!}}ms{{eq}}<any>{{!}}cps{{eq}}<any>'''<nowiki>}}</nowiki></tt>
<tt><nowiki>{{Pub|N|YYYY|in <Publication Name>|no=S|pg=P|vol=Volname N|</nowiki>'''ed{{eq}}E{{!}}arr{{eq}}A'''{{!}}ms{{eq}}<any>{{!}}cmp{{eq}}<any><nowiki>}}</nowiki></tt>


<u>Ordered Parameters:</u>
<u>Ordered Parameters:</u>
Line 20: Line 19:
* Page number in publication (pg{{eq}}<integer>, or at least starting with an integer)
* Page number in publication (pg{{eq}}<integer>, or at least starting with an integer)
* '''Edition number (ed{{eq}}E), where E is the edition designation: could be a number (''e.g.'', 1, 2, 7) or text (''e.b.'', III, 2B, 3Suppl.)'''
* '''Edition number (ed{{eq}}E), where E is the edition designation: could be a number (''e.g.'', 1, 2, 7) or text (''e.b.'', III, 2B, 3Suppl.)'''
* '''Arranger name (arr{{eq}}Arranger), where "Arranger" is the full name of the arranger, spelled exactly as the person's page. This is used ONLY if there is more than one arranger for a work.''' If arr is not specified, defaults to all people in <nowiki>{{Arranger}}</nowiki> on the page.
* '''Arranger name (arr{{eq}}Arranger), where "Arranger" is the full name of the arranger, spelled exactly as the person's page. This is used ONLY if there is more than one arranger for a work. If arr is not specified, defaults to all people in <nowiki>{{Arranger}}</nowiki> on the page.'''
* '''Manuscript (ms{{eq}}<any text>), which would result in "[First] Manuscript <year>" rather than "[First] Published <year>" to be displayed. If ms is not specified, defaults to "[First] Published <year>".'''
* Manuscript <tt><nowiki>{{Pub|0|YYYY|<Text1>|ms=<any text>}}</nowiki></tt>, which would result in " Manuscript YYYY" rather than "[First] Published YYYY" to be displayed; Text1 would be added if it exists. Work automatically added to Category:YYYY works.
* '''Composed (or written) (cpd{{eq}}<text>), which would result in "First <text> <year>" rather than "First Published <year>" to be displayed. Usually only appropriate for the first line of this template. If cpd is not specified, defaults to "[First] Published <year>".'''
* Composed (or written) <tt><nowiki>{{Pub|0|YYYY|<Text1>|(cmp=<Text2>}}</nowiki></tt>, which would result in "<Text2> YYYY" rather than "First Published YYYY" to be displayed; Text1 would be added if it exists. Usually appropriate for the first line of this template. Work <u>not</u> added to Category:YYYY works.


[[Category:DPL templates]]
[[Category:Experimental templates]]
[[Category:Experimental templates]]
</noinclude>
</noinclude>

Latest revision as of 04:28, 5 January 2020

EXPERIMENTAL TEMPLATE

New Features in Bold (proposed, yet to be implemented)

Syntax: {{Pub|N|YYYY|in <Publication Name>|no=S|pg=P|vol=Volname N|ed=E|arr=A|ms=<any>|cmp=<any>}}

Ordered Parameters:

  1. Publication sequence (integer)
  2. Publication year (four-digit integer, sometimes with prefix such as "ante" or "ca."). Automatically added to Category:YYYY works
  3. Publication name (optional)
Option 1
Option 2
Option 3

Unordered Parameters (all optional):

  • Volume (or Part) number (vol=<type><space><integer>), for example "Volume 1" or "Part 3"). For "type" and "integer" please use the same spelling and capitalization as appears in the {{Volumes}} template on the publication page.
  • Sequence in publication (no=<integer>, or at least starting with an integer)
  • Page number in publication (pg=<integer>, or at least starting with an integer)
  • Edition number (ed=E), where E is the edition designation: could be a number (e.g., 1, 2, 7) or text (e.b., III, 2B, 3Suppl.)
  • Arranger name (arr=Arranger), where "Arranger" is the full name of the arranger, spelled exactly as the person's page. This is used ONLY if there is more than one arranger for a work. If arr is not specified, defaults to all people in {{Arranger}} on the page.
  • Manuscript {{Pub|0|YYYY|<Text1>|ms=<any text>}}, which would result in " Manuscript YYYY" rather than "[First] Published YYYY" to be displayed; Text1 would be added if it exists. Work automatically added to Category:YYYY works.
  • Composed (or written) {{Pub|0|YYYY|<Text1>|(cmp=<Text2>}}, which would result in "<Text2> YYYY" rather than "First Published YYYY" to be displayed; Text1 would be added if it exists. Usually appropriate for the first line of this template. Work not added to Category:YYYY works.