Template:PubDatePlace: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|Manuscript|{{#dplvar:set|mse|Yes}}|{{#dplvar:set|mse|No}}}}}}{{#ifeq:{{{format|}}}|invert| Published {{#replaceset:&#32; {{{1|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 publications|'''$1'''}}}}{{#if:{{{2|}}}| – {{{2|}}}}}|'''Publication date and place:''' {{#replaceset:&#32; {{{1|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 publications|$1}} }}{{{2|}}}{{#ifeq:{{#sub:{{{2|}}}|-1}}|.||.}} {{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|&nbsp;|| – {{{3|}}}}}}}}}</includeonly><noinclude>
<includeonly>{{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|Manuscript|{{#dplvar:set|mse|Yes}}|{{#dplvar:set|mse|No}}}}}}{{#ifeq:{{{format|}}}|invert| Published {{#replaceset:&#32; {{{1|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 publications|'''$1'''}}}}{{#if:{{{2|}}}| – {{{2|}}}}}|'''Publication date and place:''' {{#replaceset:&#32; {{{1|}}} &#32;| /(\d\d\d\d)/i={{Cat|$1 publications|$1}} }}{{{2|}}}{{#ifeq:{{#sub:{{{2|}}}|-1}}|.||.}} {{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|&nbsp;|| – {{{3|}}}}}}}}}
<!--
</includeonly><noinclude><!--
-->{{Doc|1=
-->{{Doc|1=
This template is for use on <b>Music publication</b> pages; for <b>Work</b> pages, use the Template "Published".  
This template is for use on <b>Music publication</b> pages; for <b>Work</b> pages, use the Template "Published".  

Revision as of 15:50, 22 March 2021

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 four parameters:

  1. A four digit date or substitute, such as "0850" or "ca. 1550"; text is scanned for four-digit year
  2. Details about the publication, such as name of publisher and place of publication
  3. Manuscript (if appropriate), Edition, Volume, Revision
  4. format= (optional) – "invert" for inverted display; default is normal display.

Please always include the first 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
  • {{PubDatePlace|1720|by George Halman in London, 278 pp., nos. 121-195|Volume 2a|format=invert}}
2a – Published 1720 by George Halman in London, 278 pp., nos. 121-195.


This template sets a variable, "mse", to yes or no, depending on whether the third parameter is "Manuscript"; the variable is used by Template:MultiPubList later on the same page.