lilypond-user
[Top][All Lists]
Advanced

[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:41:37 +0000
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

(apologies if this has appeared twice - I sent it once before I had completely subscribed successfully, and so presume that that email won't appear)


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:

\documentclass[a4paper]{article}
\begin{document}


\begin{lilypond}
{
\key g \major
}
\end{lilypond}

...and some text here.

\end{document}


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

#!/usr/bin/bash

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


(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:

------------8<------------
$ ./makeBook.sh
/usr/bin/lilypond-book (GNU LilyPond) 2.4.2
Reading ../lilybook.tex...
Dissecting...
Writing snippets...
Processing...
Running lilypond...GNU LilyPond 2.4.2
Processing `lily-796326636.ly'
Parsing...
warning: Need music in a score  <------- problem
Processing `lily-1798158589.ly'
Parsing...
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.
(./lilybook.tex
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german,
ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
No file lilybook.aux.
! I can't find file `lily-796326636.tex'.
l.14 \input lily-796326636.tex

Please type another input file name:
------------8<------------

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

\begin{lilypond}
{
\key g \major
 c
}

... 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.

cheers,
alex







reply via email to

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