[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rationale for LaTeX lilypond-book syntax?
From: |
David Kastrup |
Subject: |
Re: Rationale for LaTeX lilypond-book syntax? |
Date: |
Mon, 19 Apr 2010 09:52:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) |
David Kastrup <address@hidden> writes:
> Carl Sorensen <address@hidden> writes:
>
>> Actually, [c16 d e f] is *not* valid lilypond. The first brace needs to
>> come after the c16:
>
>> So I don't think there's a problem with the options coming after the
>> {lilypond}.
>
> Oh right. Wow.
Took a look at lilypond-book.py. Did one change and am just now
recompiling.
The change is fairly obvious (hope it works):
diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py
index b4bd319..da13ab9 100644
--- a/scripts/lilypond-book.py
+++ b/scripts/lilypond-book.py
@@ -467,7 +467,10 @@ snippet_res = {
\\begin\s*(
\[
\s*(?P<options>.*?)\s*
- \])?\s*{lilypond}
+ \])?\s*{lilypond}(?(options)|(\s*
+ \[
+ \s*(?P<options>.*?)\s*
+ \])?)
(?P<code>.*?)
^[^%\n]*?
\\end\s*{lilypond})''',
However, I am doing this more or less pattern-based without any
knowledge of the program structure, and lilypond-book.py _also_ contains
FILTER: r'''\begin{lilypond}[%(options)s]
%(code)s
\end{lilypond}''',
which already _has_ the normal LaTeX order for some reason. So what
gives?
--
David Kastrup
- Rationale for LaTeX lilypond-book syntax?, David Kastrup, 2010/04/18
- Re: Rationale for LaTeX lilypond-book syntax?, Francisco Vila, 2010/04/18
- Re: Rationale for LaTeX lilypond-book syntax?, Werner LEMBERG, 2010/04/18
- Re: Rationale for LaTeX lilypond-book syntax?, David Kastrup, 2010/04/18
- Re: Rationale for LaTeX lilypond-book syntax?, Carl Sorensen, 2010/04/18
- Re: Rationale for LaTeX lilypond-book syntax?, David Kastrup, 2010/04/19
- Re: Rationale for LaTeX lilypond-book syntax?,
David Kastrup <=
- Patch for LaTeX lilypond-syntax change (was: Rationale for LaTeX lilypond-book syntax?), David Kastrup, 2010/04/19
- Re: Patch for LaTeX lilypond-syntax change (was: Rationale for LaTeX lilypond-book syntax?), Graham Percival, 2010/04/19
- Re: Patch for LaTeX lilypond-syntax change, David Kastrup, 2010/04/19
- Re: Patch for LaTeX lilypond-syntax change, Graham Percival, 2010/04/19
- Re: Patch for LaTeX lilypond-syntax change, Carl Sorensen, 2010/04/19
- Re: Patch for LaTeX lilypond-syntax change, Graham Percival, 2010/04/19
- Re: Patch for LaTeX lilypond-syntax change, David Kastrup, 2010/04/20
- Re: Patch for LaTeX lilypond-syntax change, Graham Percival, 2010/04/20
- Re: Patch for LaTeX lilypond-syntax change, David Kastrup, 2010/04/20
- Re: Patch for LaTeX lilypond-syntax change, Graham Percival, 2010/04/20