[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to make a lilypond fragment without any notes in it?

From: Alex Hunsley
Subject: how to make a lilypond fragment without any notes in it?
Date: Mon, 10 Jan 2005 19:30:26 +0000
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

I'm writing what the lilypond docs call a 'musicological' document - a latex doc with lilypond rendered items inside it. I'm using lilypond-book for this task (the version of lilypond I'm using is 2.4.2 under cygwin on windows XP).

One of the lilypond items I want to render is a staff with a clef and a key signature on it. No notes required at all, as this part of the document is about key signatures.

So, following the example in the lilypond documentation, I have a file called lilypond.tex containing the following:


\key g \major

...and some text here.


To generate the results, I have a script that contains:


lilypond-book ../lilybook.tex
latex lilybook
dvips -Ppdf -u+lilypond -u+ec-mftrace lilybook

(also as suggested in the lilypond docs).
However, lilypond doesn't like the fact I have a \begin{lilypond} section that doesn't actually contain any notes: it complains "warning: Need music in a score" and falls over shortly after that.
The full output when I run the above helper script is:

$ ./
/usr/bin/lilypond-book (GNU LilyPond) 2.4.2
Reading ../lilybook.tex...
Writing snippets...
Running lilypond...GNU LilyPond 2.4.2
Processing `'
warning: Need music in a score  <------- problem
Processing `'
Interpreting music... [1]
Preprocessing graphical objects...
Calculating line breaks... [2]
warning: Could not find line breaking that satisfies constraints.
Layout output to `lily-1798158589.tex'...

Compiling lilybook.tex...

This is TeXk, Version 3.14159 (Web2C 7.4.5)
%&-line parsing enabled.
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
No file lilybook.aux.
! I can't find file `lily-796326636.tex'.
l.14 \input lily-796326636.tex

Please type another input file name:

If I add a single note to the lilypond section, like this:

\key g \major

... it's happy and my document gets generated (complete with a C note that I don't want to appear).

So, any hints on how to print a fragment without any notes in it? Any help gratefully received.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]