lilypond-devel
[Top][All Lists]
Advanced

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

Re: lilypond-book problem


From: Han-Wen Nienhuys
Subject: Re: lilypond-book problem
Date: Mon, 22 Apr 2002 18:15:53 +0200

address@hidden writes:
> Laura Conrad <address@hidden> writes:
> 
> > The attached file works if I run ly2dvi, but not if I use it  with
> > lilypond-file and the attached lytex file.  The error message I get
> > from lilypond-book is:
> 
> Me too.  Try this patch (although I'm not sure why this fails, python
> > 1.5.2 has all kinds of pickynesses wrt regexps).
> 
> --- lilypond-book.py.~1.39.~  Thu Apr 11 11:14:31 2002
> +++ lilypond-book.py  Mon Apr 22 17:09:54 2002
> @@ -476,7 +476,7 @@ re_dict = {
>                 'preamble-end': r'(?P<code>\\begin{document})',
>                 'verbatim': 
> r"(?s)(?P<code>\\begin{verbatim}.*?\\end{verbatim})",
>                 'verb': r"(?P<code>\\verb(?P<del>.).*?(?P=del))",
> -               'lilypond-file': 
> r'(?m)^[^%\n]*?(?P<match>\\lilypondfile\s*(\[(?P<options>.*?)\])?\s*\{(?P<filename>.+)})',
> +               'lilypond-file': 
> r'(?m)^[^%\n]*?(?P<match>\\lilypondfile\s*(\[(?P<options>.*?)\])?\s*{(P<filename>[^}]+)})',

I think this is not the right solution.

        meddo:~/usr/src/lilypond$ grep lilypond  testscore.latex 
        \lilypondfile{susato-1.ly}

(the regexp will now only match strings like \lilypondfile{P<filename>})

I've tried a little more -- for some reason beyond my comprehension,
the regexps contain lots of instances of

    [...]*?

which confuse python.  Fix in CVS.





-- 

Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

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