2.1.4 How to read the manual

LilyPond input must be surrounded by { } marks or a \relative c'' { ... }, as we saw in Working on input files. For the rest of this manual, most examples will omit this. To replicate the examples, you may copy and paste the displayed input, but you must add the \relative c'' { } like this:

\relative c'' {
  ... example goes here...

Why omit the braces? Most examples in this manual can be inserted into the middle of a longer piece of music. For these examples, it does not make sense to add \relative c'' { } – you should not place a \relative inside another \relative! If we included \relative c'' { } around every example, you would not be able to copy a small documentation example and paste it inside a longer piece of your own. Most people want to add material to an existing piece, so we format the manual this way.

Clickable examples

Many people learn programs by trying and fiddling around with the program. This is also possible with LilyPond. If you click on a picture in the HTML version of this manual, you will see the exact LilyPond input that was used to generate that image. Try it on this image:

[image of music]

By cutting and pasting everything in the “ly snippet” section, you have a starting template for experiments. To see exactly the same output (line-width and all), copy everything from “Start cut-&-pastable section” to the bottom of the file.

See also

There are more tips for constructing input files in Suggestions for writing LilyPond input files. But it might be best to read through the rest of the tutorial first.

Other languages: français, español, deutsch.

Learning Manual