Template:LilyPond source
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}}
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
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 TemplateData • Commons-specific information
This template is used to display the LilyPond source of images or Midi files in a semi-standardized way.
Parameter | Description | Type | Status | |
---|---|---|---|---|
midi | midi | Must be set to "1" if the template is used on the description page of a MIDI file.
| Boolean | optional |
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)