There were actually two issues. The second was discovered after fixing the first. I intend to push as two separate commits explaining each.
http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py File python/book_snippets.py (left): http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py#oldcode184 python/book_snippets.py:184: line-width = #(- line-width (* mm %(padding_mm)f) (* mm 1)) Here was the first problem: line-width is being adjusted. This is written to the .ly file generated by lilypond-book, but it is not clear whether %(paper_string)s above will contain a definition for line-width. And for HTML, it does not. This gave an error while running lilypond, mentioned in the bug report. http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py#oldcode890 python/book_snippets.py:890: return result ...this part. http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py File python/book_snippets.py (right): http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py#newcode124 python/book_snippets.py:124: line-width = #(- line-width (* mm %(padding_mm)f) (* mm 1))''', This fixes the first problem by adjusting line-width directly where it is defined. http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py#newcode336 python/book_snippets.py:336: self.ext = '.ly' On 2012/01/21 18:32:05, Graham Percival wrote:
this
Here was the second problem, discovered after fixing the first: Somewhere in the HTML output, a filename and extension is needed. This was not defined for inline lilypond code. It gave a python error. http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py#newcode506 python/book_snippets.py:506: override['padding_mm'] = self.global_options.padding_mm This is needed for the line-width adjustement thingy with default settings otherwise python errors. http://codereview.appspot.com/5553056/diff/1/python/book_snippets.py#newcode662 python/book_snippets.py:662: result.append (base + self.ext) On 2012/01/21 18:32:05, Graham Percival wrote:
this
Just some clean up, simplification, with the same meaning as... http://codereview.appspot.com/5553056/ _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
