Next: , Previous: Advanced rhythmic commands, Up: Tutorial


2.12 Commenting input files

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.6.0, use

\version "2.6.0"

These annotations make future upgrades of LilyPond go more smoothly. Changes in the syntax are handled with a special program, convert-ly (see Updating files with convert-ly), and it uses \version to determine what rules to apply.

This page is for LilyPond-2.6.3 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.