]> git.donarmstrong.com Git - lilypond.git/commitdiff
Convert miscellaneous description elements to texidoc items.
authorJohn Gourlay <john@weathervanefarm.net>
Wed, 23 Mar 2016 02:00:27 +0000 (22:00 -0400)
committerJohn Gourlay <john@weathervanefarm.net>
Wed, 23 Mar 2016 02:00:27 +0000 (22:00 -0400)
python/musicexp.py
scripts/musicxml2ly.py

index 8997b1674ccae7c14f7d4989f7469d2c354e286a..0efd7c54b4b641b20de919a2f747d64225161017 100644 (file)
@@ -826,8 +826,9 @@ class Header:
 
         # If a header item contains a line break, it is segmented. The
         # substrings are formatted with the help of \markup, using
-        # \column and \line.
-        if '\n' in value:
+        # \column and \line. An exception, however, are texidoc items,
+        # which should not contain LilyPond formatting commands.
+        if (key != 'texidoc') and ('\n' in value):
             value = value.replace('"', '')
             printer.dump(r'\markup \column {')
             substrings = value.split('\n')
index 0990ff124baa00d6010ca816bb4a43690c1b4e92..172f1a8d3e44b5e36bd07141c6e7db899f9052d4 100644 (file)
@@ -229,7 +229,10 @@ def extract_score_information(tree):
         set_if_exists('encoder', ids.get_encoding_person())
         set_if_exists('encodingdescription', ids.get_encoding_description())
         set_if_exists('source', ids.get_source())
-        set_if_exists('miscellaneous', ids.get_file_description());
+
+        # <miscellaneous><miscellaneous-field name="description"> ... becomes
+        # \header { texidoc = ...
+        set_if_exists('texidoc', ids.get_file_description());
 
         # Finally, apply the required compatibility modes
         # Some applications created wrong MusicXML files, so we need to