A comment is a remark for the human reader of the music input; it is
ignored while parsing, so it has no effect on the printed output.
There are two types of comments. The percent symbol %
introduces a line comment; after %
the rest of the line is
ignored. A block comment marks a whole section of music
input. Anything that is enclosed in %{
and %}
is
ignored. The following fragment shows possible uses for comments
% notes for twinkle twinkle follow c4 c g' g a a g2 %{ This line, and the notes below are ignored, since they are in a block comment. g g f f e e d d c2 %}
There is a special statement that is a kind of comment. The \version
statement marks for which version of LilyPond the file was written.
To mark a file for version 2.4.0, use
\version "2.4.0"
These annotations make future upgrades of LilyPond go more
smoothly. Changes in the syntax are handled with a special program,
convert-ly (see Invoking convert-ly), and it uses
\version
to determine what rules to apply.
This page is for LilyPond-2.5.11 (development-branch).