AAA-intro.ly

Introduction

This document shows examples from the LilyPond Snippet Repository.

In the web version of this document, you can click on the file name or figure for each example to see the corresponding input file.

[image of music]

blanking-staff-lines-using-the--whiteout-command.ly

The \whiteout command underlays a white box under a markup. Since staff lines are in a lower layer than most other grobs, this white box will not overlap any other grob.

[image of music]

creating-text-spanners.ly

The \startTextSpan and \stopTextSpan commands give you the ability to create text spanners as easily as pedals indications or octavations. Override some properties of the TextSpanner object to modify its output.

[image of music]

demonstrating-the-power-and-flexibility-of-the--markup-function.ly

Here are some examples of how various markup texts can be obtained with LilyPond syntax. You won't probably be needing all of them in a standard score, but hey, you never know...

[image of music]

embedding-native-postscript-in-a--markup-bloc.ly

he command \postscript allows you to insert PostScript code directly inside a \markup bloc.

(Beware: PostScript is a registred trademark by Adobe Systems Inc. LilyPond actually uses GNU/GhostScript to handle it.)

[image of music]

flat-and-sharp-symbols-in-text-markups.ly

If you want to use flat or sharp symbols in text, you may want to adjust the horizontal and vertical position of the \flat or \sharp.

[image of music]

font-family-override.ly

The default font families for text can be overridden with make-pango-font-tree.

[image of music]

how-to-avoid-spaces-when-using-the--char-function-in-a--markup-text.ly

When you need to enter special characters using the \char command, an unwanted space can appear before the character. You can avoid it by adding the \concat command.

In this snippet, we want to insert <più f> below the staff, using <\char #'249> to get the correct last character in piu, but there's a space between <pi> and <u>. Thanks to the \concat command, the space disappears.

[image of music]

how-to-bottom-align-texts-with-different-vertical-extents.ly

Some letters imply smaller vertical extents than the others; if you have, below your staff, two markups with different vertical extents (e.g. one text with letters "t,h,l and/or UPPER CASE" and one text with "a, c, e, n or m"), LilyPond will align them to the top by default, thus making it look a bit messy. Therefore, you need to add invisible ascender letters using the ransparent command to make it right.

[image of music]

markup-lines.ly

Text that can spread over pages is entered with the \markuplines command.

[image of music]

ordering-scripts-stack.ly

Scripts can be stacked. The order is determined by a priority field, but when objects have the same priority, the input order determines the order. Objects specified first are closest to the note.

You may also want to override the #'script-priority to give your Script or TextScript overall priority (if you do so, remember to use \once if you don't want the whole score to be affected).

[image of music]

printing-the-title-on-every-page-of-your-score.ly

With this trick, the title of your work will be printed in small on top of every page, using evenHeaderMarkup and oddHeaderMarkup.

[image of music]

rotating-a-text-object.ly

LilyPond gives you the ability to rotate any object you want, particularly markups as showed here. Alternatively, you can use the \column function to display your text vertically without rotating the letters.

[image of music]

the--fill-line-command.ly

The \fill-line command aligns and justifies markup text by setting as many columns as required, in a given space.

In this snippet we use numbers to (beautifully) show how the command works; but when using text beware to use quotes if you want your words to stay together:

\fill-line {The quick brown fox} results in something like:

The              quick                      brown                   fox

\fill-line {"The quick brown fox"} results in something like:

                        The quick brown fox

[image of music]

utf-8.ly

Various scripts may be used for texts (like titles and lyrics) introduced by entering them in UTF-8 encoding, and using a Pango based backend. Depending on the fonts installed, this fragment will render Bulgarian (Cyrillic), Hebrew, Japanese and Portuguese.

[image of music]

This page is for LilyPond-2.11.28 (development-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Your suggestions for the documentation are welcome.