Template:PubDatePlace: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(Created page with "<includeonly>'''Publication date and place:''' {{#multireplace: {{{1|}}} | /(\d\d\d\d)/i={{Cat|$1 publications|$1}} }}{{{2|}}}<!-- -->{{#if: {{{3|}}}|{{#multireplace...")
 
m (Text replacement - "Category:Templates]]" to "Category:DPL templates]] Category:Templates")
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>'''Publication date and place:''' {{#multireplace:&#32; {{{1|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 publications|$1}} }}{{{2|}}}<!--
<includeonly>'''Publication date and place:''' {{#replaceset:&#32; {{{1|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 publications|$1}} }}{{{2|}}} {{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|Manuscript|{{#dplvar:set|mse|Yes}}|{{#dplvar:set|mse|No}}}}{{#ifeq:{{{3|}}}|&nbsp;|| – {{{3|}}}}}}}</includeonly><noinclude><!--
-->{{#if: {{{3|}}}|{{#multireplace:&#32; {{{3|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 works|$1}} }}{{{4|}}}}}<!--
-->{{#if: {{{5|}}}|{{#multireplace:&#32; {{{5|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 works|$1}} }}{{{6|}}}}}</includeonly><noinclude><!--
-->{{Doc|1=
-->{{Doc|1=
This template scans the text supplied at the '''PubDatePlace''' line for any four-digit year, and converts it into a link to  "category:YYYY publication". The page is simultaneously included in that category. Therefore, works that have a publication date are categorized accordingly.
This template is for use on <b>Music publication</b> pages; for <b>Work</b> pages, use the Template "Published".  


The template accepts up to six parameters, but only the odd-numbered parameters are scanned for year numbers. Even-numbered parameters are displayed as plain text. Sometimes, there are year numbers in the text that should not be converted into a category link. For these cases, break the text in smaller parts, so that these numbers will fall in a even-numbered parameter.
This template scans the text of the first parameter of '''PubDatePlace''' for any four-digit year, and converts it into a link to  "Category:YYYY publications". The page is simultaneously included in that category. Therefore, works that have a publication date are categorized accordingly.
 
The template accepts three parameters:
# A four digit date or substitute, such  as "0850" or "ca. 1550"
# Details about the publication, such as name of publisher and place of publication
# Manuscript (if appropriate), Edition, Volume, Revision
Please always include all three parameters; if the third parameter is not used, put <tt>&#38;nbsp;</code></tt> in its place nonetheless.


'''Syntax:'''
'''Syntax:'''
:{{tl|PubDatePlace|<text (scanned)>|<text (displayed as-is)>|<text (scanned)>|<text (displayed as-is)>|<text (scanned)>|<text (displayed as-is)>}}
:{{tl|PubDatePlace|<text (scanned)>|<text (displayed as-is)>|<text (displayed as-is)>}}
 
'''Examples:'''
*<tt><nowiki>{{PubDatePlace|1564|by Le Roy and Ballard in Paris|Volume 1}}</nowiki></tt> – '''Publication date and place:''' 1564 by Le Roy and Ballard in Paris – Volume 1
*<tt><nowiki>{{PubDatePlace|ca. 1450||Manuscript}}</nowiki></tt> – '''Publication date and place:''' ca. 1450 – Manuscript


}}
}}
[[Category:DPL templates]]
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 04:39, 5 January 2020

Documentation

This template is for use on Music publication pages; for Work pages, use the Template "Published".

This template scans the text of the first parameter of PubDatePlace for any four-digit year, and converts it into a link to "Category:YYYY publications". The page is simultaneously included in that category. Therefore, works that have a publication date are categorized accordingly.

The template accepts three parameters:

  1. A four digit date or substitute, such as "0850" or "ca. 1550"
  2. Details about the publication, such as name of publisher and place of publication
  3. Manuscript (if appropriate), Edition, Volume, Revision

Please always include all three parameters; if the third parameter is not used, put &nbsp; in its place nonetheless.

Syntax:

{{PubDatePlace|<text (scanned)>|<text (displayed as-is)>|<text (displayed as-is)>}}

Examples:

  • {{PubDatePlace|1564|by Le Roy and Ballard in Paris|Volume 1}}Publication date and place: 1564 by Le Roy and Ballard in Paris – Volume 1
  • {{PubDatePlace|ca. 1450||Manuscript}}Publication date and place: ca. 1450 – Manuscript