Template:Pub: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{Prot-temp}}</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''' {{#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|}}}}}}}}}}}|{{#switch:{{#expr:{{{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>
<noinclude>{{Prot-temp}}</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; &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; &nbsp; '''2nd'''|3=&nbsp; &nbsp; '''3rd'''|21=&nbsp; &nbsp; '''21st'''|22=&nbsp; &nbsp; '''22nd'''|23=&nbsp; &nbsp; '''23rd'''|31=&nbsp; &nbsp; '''31st'''|32=&nbsp; &nbsp; '''32nd'''|33=&nbsp; &nbsp; '''33rd'''|41=&nbsp; &nbsp; '''41st'''|42=&nbsp; &nbsp; '''42nd'''|43=&nbsp; &nbsp; '''43rd'''|&nbsp; &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 {{{vol|}}}]]}}{{#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 data for a '''work'''. For publication data for a '''publication''', see {{tl|PubDatePlace}}.     
'''This template''' is to be used for publication data for a '''work'''. Data for a '''publication''' uses template {{tl|PubDatePlace}} instead.     


Parameters:
Parameters:
:1. Single-digit number, order of publication: 0 for manuscript or composed date, 1 for first publication, 2 for second, ''etc.'' (mandatory)
:1. Integer number, order of publication: 0 for manuscript or composed date, 1 for first publication, 2 for second, up to 50 (mandatory; should contain '''only''' an integer number)
:2. Four-digit year of publication (mandatory)
:2. Four-digit year of publication (mandatory;should contain a integer number, usually four digits, the year of publication. There may be a prefix, ''e.g.'' "ca.", "ante", or "post")
:3. Name and details of publication (optional)
 
Optional parameters:
:3. Name and details of publication (optional, text that can include templates or links)
:::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.
:–. {{para|vol}} Volume (or Edition or Part) and number (optional)
:–. {{para|vol}} Volume (or Edition or Part) and number (optional)
:::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.
:–. {{para|no}} Sequence of work in publication (optional)
:–. {{para|no}} Sequence of work in publication (optional)
:–. {{para|pg}} Page number of work in publication (optional)
:–. {{para|pg}} Page number of work in publication (optional)
:–. {{para|cmp}} One word, "Composed" or "Written" describing a non-publication event (optional)
:::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 B below.
:–. {{para|cmp}} One word, "Composed" or "Written" (or any other word) describing a non-publication event (optional)
:–. {{para|ms}} Any text, indicating that the publication cited is a manuscript
:–. {{para|ms}} Any text, indicating that the publication cited is a manuscript


*Parameter 1 should contain '''only''' a single-digit integer number.
<u>'''Syntax A. Normal publication (on paper or online), not manuscript'''</u>
*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.
 
<u>Syntax A. Normal publication, not composition or manuscript</u>
::<tt><nowiki>{{Pub|N|YYYY|in {{NoComp|<Publication>|<Composer>}}}}</nowiki></tt>
::<tt><nowiki>{{Pub|N|YYYY|in {{NoComp|<Publication>|<Composer>}}}}</nowiki></tt>
<u>Syntax B. Normal publication, not composition of manuscript, including page number and sequence number</u>
<u>'''Syntax B. Normal publication (on paper or online), not manuscript, including page number and sequence number'''</u>
::<tt><nowiki>{{Pub|N|YYYY|in {{NoComp|<Publication>|<Composer>}}|no=NN|pg=PP}}</nowiki></tt>
::<tt><nowiki>{{Pub|N|YYYY|in {{NoComp|<Publication>|<Composer>}}|no=NN|pg=PP}}</nowiki></tt>
<u>Syntax C. Notice of date of writing (or composition)</u>
<u>'''Syntax C. When date of writing (or composition) is known'''</u>
::<tt><nowiki>{{Pub|0|YYYY||cmp=Composed}}</nowiki></tt> – note zero for parameter 1, parameter 3 blank (not relevant)
::<tt><nowiki>{{Pub|0|YYYY||cmp=Composed}}</nowiki></tt> – note zero for parameter 1, parameter 3 usually blank – put details in '''Description'''
<u>Syntax D. Manuscript publication</u>
<u>'''Syntax D. Manuscript publication'''</u>
::<tt><nowiki>{{Pub|0|YYYY|in {{NoComp|<Publication>|<Composer>}}|ms=ms}}</nowiki></tt> – note zero for parameter 1
::<tt><nowiki>{{Pub|0|YYYY|in {{NoComp|<Publication>|<Composer>}}|ms=ms}}</nowiki></tt> – note zero for parameter 1


<!--
<u><b>Example 1.</b></u>
<tt><nowiki>{{Pub|1|1770|in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''}}</nowiki></tt> yields
:<tt><nowiki>{{Pub|0|1752|in Weimar|cmp=Composed}}</nowiki></tt>
:'''First published:''' {{CiteCat|1770 works|1770}} in ''{{NoComp|The New-England Psalm-Singer|William Billings}}''.
:<tt><nowiki>{{Pub|1|1755|in {{NoComp|First book of motets|James Lyon}}|pg=28}}</nowiki></tt>
 
:<tt><nowiki>{{Pub|2|1787|in ''[[Compilation of sacred music and poetry]]''|no=657}}</nowiki></tt>
<tt><nowiki>{{Pub|2|1779|in ''{{NoComp|Music in Miniature|William Billings}}'', no. 22, p. 32}}</nowiki></tt> yields  
:::''yields''
:'''2nd published:''' {{CiteCat|1779 works|1779}} in ''{{NoComp|Music in Miniature|William Billings}}'', no. 22, p. 32.
:&nbsp;&nbsp;'''Composed''' 1752 in Weimar<br>
:'''First published''' <font color=blue>1755</font> in ''<font color=blue>First book of motets</font>'', p. 28<br>
:&nbsp;&nbsp;'''Second published''' <font color=blue>1787</font> in ''<font color=blue>Compilation of sacred music and poetry</font>'', no. 657<br>


<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.


<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:DPL templates]]
[[Category:Templates]]
[[Category:Templates]]


(Version 5)
(Version 5d)
</noinclude>
</noinclude>

Latest revision as of 15:10, 15 November 2022

Documentation

This template is to be used for publication data for a work. Data for a publication uses template {{PubDatePlace}} instead.

Parameters:

1. Integer number, order of publication: 0 for manuscript or composed date, 1 for first publication, 2 for second, up to 50 (mandatory; should contain only an integer number)
2. Four-digit year of publication (mandatory;should contain a integer number, usually four digits, the year of publication. There may be a prefix, e.g. "ca.", "ante", or "post")

Optional parameters:

3. Name and details of publication (optional, text that can include templates or links)
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.
–. |vol= Volume (or Edition or Part) and number (optional)
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.
–. |no= Sequence of work in publication (optional)
–. |pg= Page number of work in publication (optional)
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 B below.
–. |cmp= One word, "Composed" or "Written" (or any other word) describing a non-publication event (optional)
–. |ms= Any text, indicating that the publication cited is a manuscript

Syntax A. Normal publication (on paper or online), not manuscript

{{Pub|N|YYYY|in {{NoComp|<Publication>|<Composer>}}}}

Syntax B. Normal publication (on paper or online), not manuscript, including page number and sequence number

{{Pub|N|YYYY|in {{NoComp|<Publication>|<Composer>}}|no=NN|pg=PP}}

Syntax C. When date of writing (or composition) is known

{{Pub|0|YYYY||cmp=Composed}} – note zero for parameter 1, parameter 3 usually blank – put details in Description

Syntax D. Manuscript publication

{{Pub|0|YYYY|in {{NoComp|<Publication>|<Composer>}}|ms=ms}} – note zero for parameter 1

Example 1.

{{Pub|0|1752|in Weimar|cmp=Composed}}
{{Pub|1|1755|in {{NoComp|First book of motets|James Lyon}}|pg=28}}
{{Pub|2|1787|in ''[[Compilation of sacred music and poetry]]''|no=657}}
yields
  Composed 1752 in Weimar
First published 1755 in First book of motets, p. 28
  Second published 1787 in Compilation of sacred music and poetry, no. 657

(Version 5d)