Closed rpspringuel closed 1 month ago
@rpspringuel Thank you very much for this PR. May you please test with the small change I just pushed, which restricts the change to LilyPond >= 2.24?
I don't have an earlier version of LilyPond installed to check that behavior, but with 2.24.3 your change doesn't stop the fix from working for me.
Thank you very much again!
LilyPond 2.24 introduced a change to the way the eps and pdf files are produced. In particular, when using the lilypond-book preamble (a version of which is used in this package) to produce separate files for each system, the pdf file that included all the music contained one page per system while the eps file that include all music was a single page. This meant that if the first line of the score was significantly different from the subsequent lines (e.g., a header with material flushed right instead of a music stave), then scores would get placed in unexpected positions. This was the result of the eps bounding box and the pdf bounding box being based on different parts of the music (the whole score in the former case, and only the first line in the latter).
By adding the
-dtall-page-formats=pdf
option to the LilyPond compilation, the pdf containing all the music will put all the music on a single page, thus matching the eps file and allowing the bounding box calculations to be use more comparable values.Fixes #307