]> git.donarmstrong.com Git - lilypond.git/commitdiff
(make_lilypond_file): convert
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 22 Mar 2003 00:34:28 +0000 (00:34 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 22 Mar 2003 00:34:28 +0000 (00:34 +0000)
lilypond-file to lilypond block directly, without going through
begin/end lilypond text.

ChangeLog
buildscripts/mf-to-table.py
scripts/lilypond-book.py

index 7aa98f67d9f2e5992f5d48377dcd38e31ed74a6b..4206a6986f2f7c5d2c71f5a7019cc1cf87730294 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-22  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * scripts/lilypond-book.py (make_lilypond_file): convert
+       lilypond-file to lilypond block directly, without going through
+       begin/end lilypond text.
+       
 
 2003-03-21  Juergen Reuter  <reuter@ipd.uka.de>
 
index d11bb5ce90cc30224a35257e0f109c803079f5b2..0de6e06d59225795a34327b56c611e674ac66ff6 100644 (file)
@@ -161,7 +161,7 @@ def write_fontlist (file, global_info, charmetrics):
 """)
        for m in charmetrics:
                escapedname=re.sub('_','\\\\\\\\_', m['name'])
-               file.write ('s^\\markup { \\musicglyph #"%s" "%s" }\n' % (m['name'], escapedname))
+               file.write ('  s^\\markup { \\char #%d "%s" }\n' % (m['code'], escapedname))
        file.write (r"""
 }
   \paper{
index 3cc1fe3495dd0a9eed171d843436736ad8778caf..362df5df451821bbee661f367bf5f6ebbf2bcc80 100644 (file)
@@ -341,9 +341,6 @@ output_dict= {
 
        'html' : {
 
-               'output-lilypond': '''<lilypond%s>
-%s
-</lilypond>''',
                'output-filename' : r'''
 <!-- %s >
 <a href="%s">
@@ -388,10 +385,7 @@ output_dict= {
 %% %s
 %% %s
 ''',
-               'output-lilypond': r'''\begin[%s]{lilypond}
-%s
-\end{lilypond}
-''',
+
                # verbatim text is always finished with \n
                'output-verbatim': r'''\begin{verbatim}
 %s\end{verbatim}
@@ -420,10 +414,7 @@ output_dict= {
 
        'texi' : {
 
-               'output-lilypond': '''@lilypond[%s]
-%s
-@end lilypond
-''',
+
                'output-filename' : r'''@ifnothtml
 @file{%s}:@*
 @end ifnothtml
@@ -567,7 +558,7 @@ re_dict = {
                'verb': r'''(?P<code>@code{.*?})''',
                'lilypond-file': '(?m)^(?P<match>@lilypondfile(\[(?P<options>[^]]*)\])?{(?P<filename>[^}]+)})',
                'lilypond' : '(?m)^(?P<match>@lilypond(\[(?P<options>[^]]*)\])?{(?P<code>.*?)})',
-               'lilypond-block': r'''(?ms)^(?P<match>@lilypond(\[(?P<options>[^]]*)\])?\s(?P<code>.*?)@end +lilypond)\s''',
+               'lilypond-block': r'''(?ms)^(?P<match>@lilypond(\[(?P<options>[^]]*)\])?\s(?P<code>.*?)@end lilypond)\s''',
                'option-sep' : ',\s*',
                'intertext': r',?\s*intertext=\".*?\"',
                'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
@@ -897,14 +888,13 @@ def make_lilypond_file (m):
        '''
 
        if m.group ('options'):
-               options = m.group ('options')
+               options = get_re ('option-sep').split (m.group ('options'))
        else:
-               options = ''
+               options = []
        (content, nm) = find_file (m.group ('filename'))
-       options = "filename=%s," % nm + options
+       options.append ("filename=%s" % nm)
 
-       return [('input', get_output ('output-lilypond') %
-                       (options, content))]
+       return [('lilypond', content, options)]
 
 def make_ly2dvi_block (m):
        '''