From: Thibaut Cuvelier Date: Wed, 29 Sep 2021 00:26:29 +0000 (+0200) Subject: DocBook: update links to LilyPond bugs. X-Git-Tag: 2.4-beta2~1129 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=73a63822c2104a3479169d42a009e9ceb1945362;p=lyx.git DocBook: update links to LilyPond bugs. Also updates the test so that it matches the next version of LilyPond. --- diff --git a/autotests/export/docbook/LilyPond_Book.xml b/autotests/export/docbook/LilyPond_Book.xml index 43df8e100f..17ea6e5374 100644 --- a/autotests/export/docbook/LilyPond_Book.xml +++ b/autotests/export/docbook/LilyPond_Book.xml @@ -3,13 +3,17 @@ See https://www.lyx.org/ for more information -->
LilyPond-book and LyX - - -\relative c'' { g a b c} - + + - + + + +\relative c'' { g a b c} + + +
\ No newline at end of file diff --git a/lib/scripts/docbook_copy.py b/lib/scripts/docbook_copy.py index d2e4fe0058..5b5a3f400e 100644 --- a/lib/scripts/docbook_copy.py +++ b/lib/scripts/docbook_copy.py @@ -61,8 +61,9 @@ class DocBookCopier: def preprocess_input_for_lilypond(self): # LilyPond requires that its input file has the .lyxml extension. Due to a bug in LilyPond, # use " instead of ' to encode XML attributes. - # https://lists.gnu.org/archive/html/bug-lilypond/2021-09/msg00039.html + # Bug report: https://gitlab.com/lilypond/lilypond/-/issues/6185 # Typical transformation: + # Fixed by 2.23.4. # FROM: language='lilypond' role='fragment verbatim staffsize=16 ragged-right relative=2' # TO: language="lilypond" role="fragment verbatim staffsize=16 ragged-right relative=2" with open(self.in_file, 'r', encoding='utf-8') as f, open(self.in_lily_file, 'w', encoding='utf-8') as f_lily: @@ -77,15 +78,12 @@ class DocBookCopier: os.unlink(self.in_file) def postprocess_output_for_lilypond(self): + # Major problem: LilyPond used to output the LilyPond code outside the image, which is then always displayed + # before the image (instead of only the generated image). + # Bug report: https://gitlab.com/lilypond/lilypond/-/issues/6186 + # No more necessary with the new version of LilyPond (2.23.4). No efficient way to decide how to post-process + # for previous versions of LilyPond. Basically, it does not make sense to post-process. pass - # # Erase the that LilyPond left behind in the XML. - # in_file_before = self.in_file + '.tmp' - # shutil.move(self.in_file, in_file_before) - # with open(in_file_before, 'r', encoding='utf-8') as f_before, open(self.in_file, 'w', encoding='utf-8') as f_after: - # looking_for_end_programlisting = False - # for line in f_before: - # # TODO: find an efficient way to distinguish those left-overs. - # https://lists.gnu.org/archive/html/bug-lilypond/2021-09/msg00040.html def call_lilypond(self): # LilyPond requires that its input file has the .lyxml extension (plus bugs in LilyPond).