Template:LilyPond source

Category:Main message boxes
Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:LilyPond source/doc.

This template is used to display the LilyPond source of images or Midi files in a semi-standardized way.

The template automatically sets the following categories: Category:MIDI files created with GNU LilyPond or Category:GNU LilyPond images

Usage


{{LilyPond source}}

Or use the shorthand
{{LilyPond|… parameters as described …}}

Add the following code right after the template inclusion line: <syntaxhighlight lang="latex" copy="copy"> LilyPond source code here </syntaxhighlight>

Note that the template generates its own top-level heading.

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Category:Templates using TemplateData

This template is used to display the LilyPond source of images or Midi files in a semi-standardized way.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
midimidi

Must be set to "1" if the template is used on the description page of a MIDI file.

Auto value
0
Booleanoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

Placement: In the "Source" parameter of the {{Information}} template (or the respective parameter of similar templates) or just below this template

Examples

{{LilyPond source|}}

renders as:

LilyPond source


{{LilyPond source|midi=1}}

renders as:

LilyPond source

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)

Category:Templates using LangSwitch for internationalisation Category:Source templates#LilyPond%20source
Category:Main message boxes Category:Source templates