3.2.3 HTML

lilypond-book provides the following commands and environments to include music in HTML files:

In the input file, music is specified with any of the following commands:

<lilypond options go here>
  YOUR LILYPOND CODE
</lilypond>

<lilypond options go here: YOUR LILYPOND CODE />

<lilypondfile options go here>filename</lilypondfile>

<musicxmlfile options go here>filename</musicxmlfile>

For example, you can write

<lilypond fragment relative=2>
\key c \minor c4 es g2
</lilypond>

lilypond-book then produces an HTML file with appropriate image tags for the music fragments:

[image of music]

For inline pictures, use <lilypond … />, where the options are separated by a colon from the music, for example

Some music in <lilypond relative=2: a b c/> a line of text.

To include separate files, say

<lilypondfile option1 option2 …>filename</lilypondfile>

<musicxmlfile> uses the same syntax as <lilypondfile>, but simply references a MusicXML file rather than a LilyPond file.

For a list of options to use with the lilypond or lilypondfile tags, see Music fragment options.

Additionally, <lilypondversion/> displays the current version of lilypond.


Other languages: deutsch, español, français, italiano, 日本語.
About automatic language selection.

LilyPond — Usage v2.18.2 (stable-branch).