bug-lilypond
[Top][All Lists]
Advanced

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

Re: lilypond-book


From: Mats Bengtsson
Subject: Re: lilypond-book
Date: Mon, 11 Oct 2004 17:59:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Of course, I should have cross-posted already the previous email to
bug-lilypond.

I just came to think of yet another possible solution, namely to
mimic the \verb command in LaTeX and let the user himself find a
character to use as start and end of the example that's not included
in the LilyPond snippet. Simply take the first character after
\lilypond as the delimiter. Examples that would work then:
\lilypond+\relative c'{c d e f}+
\lilypond' c^+ d e f '
\lilypond{c d e f{

Of course, the final example looks ridiculous, but it's kind of logical
anyway, once you've grasped the main idea.

  /Mats

Mats Bengtsson wrote:
If you change it to
 \lilypond[fragment,relative]{c4 d e f}
it seems to work (apart from the bugs I've already reported).

However, it seems that you have found yet another bug, namely that
lilypond-book strips of all right braces from within the
\lilypond{...} in the generated lily-*.ly files.
Of course, this is a classical parsing problem, since lilypond-book
has to realize which right brace belongs to the example and which
is the end of the example. Since there's no way to describe arbitrarily
deeply nested pairs of braces in a regular expression, I don't see an
easy way to handle the situation, unless we start escaping right braces
within \lilypond{...} or introducing some extra conventions that the final right brace should end the line and the full \lilypond{...} should
be on a single line, or so. At least this limitation should be
documented.

   /Mats

Erik Sandberg wrote:

Hi,

Using 2.3.22, how do I use \lilypond in a .lytex file?

I tried the following file, it gives me errors. If I replace \lilypond{...} with \begin{lilypond}...\end{lilypond}, it all works fine. Is this a bug?

\documentclass[letterpaper]{article}
\begin{document}
\lilypond{\relative c' {c4 d e f} }
\end{document}


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user



--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
        Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================




reply via email to

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