Difference between revisions of "Template:Pub"

From ChoralWiki
Jump to: navigation, search
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr:{{{1|}}}<26|{{#switch:{{{1|}}}|1='''First'''|2=&nbsp; '''2nd'''|3=&nbsp; '''3rd'''|&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:{{{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>
+
<noinclude>{{Prot-temp}}</noinclude><includeonly>{{#ifexpr:{{{1|}}}<26|{{#switch:{{{1|}}}|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>
 
{{Doc|1=
 
{{Doc|1=
 
'''This template''' is to be used for a publication of a work. This template is to be used if '''any''' of its works have more than one publication cited. This template, {{tl|Pub}} is used in conjunction with {{tl|MultiPubList}}. If '''none''' of the works have more than one citation, then use template {{tl|Published}} on the work pages and {{tl|PubList}} on the publication page.   
 
'''This template''' is to be used for a publication of a work. This template is to be used if '''any''' of its works have more than one publication cited. This template, {{tl|Pub}} is used in conjunction with {{tl|MultiPubList}}. If '''none''' of the works have more than one citation, then use template {{tl|Published}} on the work pages and {{tl|PubList}} on the publication page.   
 +
 +
Parameters:
 +
:1. Single-digit number, order of publication: 1 for first publication, 2 for second, ''etc.'' (mandatory)
 +
:2. Four-digit year of publication (mandatory)
 +
:3. Name and details of publication (optional)
 +
:–. {{para|vol}} Volume (or Edition or Part) and number (optional)
 +
:–. {{para|no}} Sequence of work in publication (optional)
 +
:–. {{para|pg}} Page number of work in publication (optional)
 +
 +
*Parameter 1 should contain '''only''' a single-digit integer number.
 +
*Parameter 2 should contain a integer number, usually four digits, the year of publication. There may be a prefix, ''e.g.'' "ca." or "ante"
 +
*Parameter 3 should contain a '''link''' to a publication page to which this work is linked. The link should use the template {{tl|NoComp}} (or double brackets <tt><nowiki>[[ ]]</nowiki></tt>); use {{tl|NoCo}} ''only'' if all the works in the publication have the same composer.
 +
*Optionally, the sequence number or page in that publication can be specified; if you intend for these parameters (sequence or page number) to appear in the table generated by the template {{tl|MultiPubList}}, they should be declared as parameters, as in Syntax 3 below.
 +
*Optionally, the volume (or edition or part) can be specified, in the format <tt>vol{{eq}}<type> <number></tt>, for example "Volume 2" or "Part 1" or "Heft 5"; the words and numbers must be the same as in the template {{tl|Volumes}} on the publication page, and there must be a space between.
  
 
Syntax:<br>
 
Syntax:<br>
Line 7: Line 21:
 
#<tt><nowiki>{{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}, no. N, p. P}}</nowiki></tt> (no sequence or page numbers appear in {{tl|MultiPubList}})
 
#<tt><nowiki>{{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}, no. N, p. P}}</nowiki></tt> (no sequence or page numbers appear in {{tl|MultiPubList}})
 
#<tt><nowiki>{{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}|no=N|pg=P}}</nowiki></tt> (if you wish sequence or page numbers to appear in {{tl|MultiPubList}})
 
#<tt><nowiki>{{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}|no=N|pg=P}}</nowiki></tt> (if you wish sequence or page numbers to appear in {{tl|MultiPubList}})
 +
#<tt><nowiki>{{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}|vol=<Type> VN|no=N|pg=P}}</nowiki></tt> (for publications with multiple volumes or parts)
  
Parameters:
 
:1. Single-digit number, order of publication: 1 for first publication, 2 for second, ''etc.'' (mandatory)
 
:2. Four-digit year of publication (mandatory)
 
:3. Name and details of publication
 
:4. {{para|no}} Sequence of work in publication (optional)
 
:5. {{para|pg}} Page number of work in publication (optional)
 
 
Parameter 1 should contain '''only''' a single-digit integer number. Parameter 2 should contain '''only''' a integer number, usually four digits, the year of publication. Parameter 3 should contain a '''link''' to a publication page to which this work is linked. The link should use the template {{tl|NoComp}}, for example <tt><nowiki>{{NoComp|Music in Miniature|William Billings}}</nowiki></tt>. Optionally, the sequence number or page in that publication can be specified; if you intend for these parameters (sequence or page number) to appear in the table generated by the template {{tl|MultiPubList}}, they should be declared as parameters, as in Syntax 3 above.
 
  
 
<tt><nowiki>{{Pub|1|1770|in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''}}</nowiki></tt> yields  
 
<tt><nowiki>{{Pub|1|1770|in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''}}</nowiki></tt> yields  
Line 21: Line 28:
  
 
<tt><nowiki>{{Pub|2|1779|in ''{{NoComp|Music in Miniature|William Billings}}'', no. 22, p. 32}}</nowiki></tt> yields  
 
<tt><nowiki>{{Pub|2|1779|in ''{{NoComp|Music in Miniature|William Billings}}'', no. 22, p. 32}}</nowiki></tt> yields  
::'''2nd published:''' {{CiteCat|1779 works|1779}} in ''{{NoComp|Music in Miniature|William Billings}}'', no. 22, p. 32.
+
:'''2nd published:''' {{CiteCat|1779 works|1779}} in ''{{NoComp|Music in Miniature|William Billings}}'', no. 22, p. 32.
  
 
<tt><nowiki>{{Pub|1|1770|in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''|no=118|pg=90}}</nowiki></tt> yields  
 
<tt><nowiki>{{Pub|1|1770|in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''|no=118|pg=90}}</nowiki></tt> yields  
 
:'''First published:''' {{CiteCat|1770 works|1770}} in ''{{NoComp|The New-England Psalm-Singer|William Billings}}'', no. 118, p. 90.
 
:'''First published:''' {{CiteCat|1770 works|1770}} in ''{{NoComp|The New-England Psalm-Singer|William Billings}}'', no. 118, p. 90.
 +
 +
<tt><nowiki>{{Pub|3|1979|in ''[[Complete Works (William Billings)]]''|vol=Volume 1|no=5|pg=34}}</nowiki></tt> yields
 +
:'''3rd Published:''' <font color=blue>1979</font> in <font color=red>''Complete Works (William Billings)''</font>, Volume 1, no. 5, p. 34.
 
}}
 
}}
 
 
[[Category:Templates]]
 
[[Category:Templates]]
  
 
</noinclude>
 
</noinclude>

Revision as of 03:17, 15 October 2019

Documentation

This template is to be used for a publication of a work. This template is to be used if any of its works have more than one publication cited. This template, {{Pub}} is used in conjunction with {{MultiPubList}}. If none of the works have more than one citation, then use template {{Published}} on the work pages and {{PubList}} on the publication page.

Parameters:

1. Single-digit number, order of publication: 1 for first publication, 2 for second, etc. (mandatory)
2. Four-digit year of publication (mandatory)
3. Name and details of publication (optional)
–. |vol= Volume (or Edition or Part) and number (optional)
–. |no= Sequence of work in publication (optional)
–. |pg= Page number of work in publication (optional)
  • Parameter 1 should contain only a single-digit integer number.
  • Parameter 2 should contain a integer number, usually four digits, the year of publication. There may be a prefix, e.g. "ca." or "ante"
  • Parameter 3 should contain a link to a publication page to which this work is linked. The link should use the template {{NoComp}} (or double brackets [[ ]]); use {{NoCo}} only if all the works in the publication have the same composer.
  • Optionally, the sequence number or page in that publication can be specified; if you intend for these parameters (sequence or page number) to appear in the table generated by the template {{MultiPubList}}, they should be declared as parameters, as in Syntax 3 below.
  • Optionally, the volume (or edition or part) can be specified, in the format vol=<type> <number>, for example "Volume 2" or "Part 1" or "Heft 5"; the words and numbers must be the same as in the template {{Volumes}} on the publication page, and there must be a space between.

Syntax:

  1. {{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}}}
  2. {{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}, no. N, p. P}} (no sequence or page numbers appear in {{MultiPubList}})
  3. {{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}|no=N|pg=P}} (if you wish sequence or page numbers to appear in {{MultiPubList}})
  4. {{Pub|L|YYYY|in {{NoComp|<Publication>|<Composer>}}|vol=<Type> VN|no=N|pg=P}} (for publications with multiple volumes or parts)


{{Pub|1|1770|in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''}} yields

First published: 1770 in The New-England Psalm-Singer.

{{Pub|2|1779|in ''{{NoComp|Music in Miniature|William Billings}}'', no. 22, p. 32}} yields

2nd published: 1779 in Music in Miniature, no. 22, p. 32.

{{Pub|1|1770|in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''|no=118|pg=90}} yields

First published: 1770 in The New-England Psalm-Singer, no. 118, p. 90.

{{Pub|3|1979|in ''[[Complete Works (William Billings)]]''|vol=Volume 1|no=5|pg=34}} yields

3rd Published: 1979 in Complete Works (William Billings), Volume 1, no. 5, p. 34.