Le 30/08/2022 à 00:41, K. Blum a écrit :
Hi Jean,

Am 29.08.2022 um 22:17 schrieb Jean Abou Samra:
Could you clarify this for me? What does not work with
lilypond-book-preamble.ly in SVG output?

The Cairo backend has many advantages for SVG, but I didn't expect one
of this kind.

This seems to be a limitation of the svg backend that has been there
ever since. "lilypond-book-preamble.ly" explicitely switches to the eps
backend and does not workd (i.e. create cropped images) with the svg
backend.
Sorry, I cannot describe it more deeply, but it has been discussed here:
https://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00133.html



With this code:

\version "2.23.12"
\include "lilypond-book-preamble.ly"
{ c' }


Compiling the file as

lilypond --svg file.ly

I get cropped SVG output.

What you are describing used to be a limitation of lilypond-book-preamble.ly,
but no longer is. It got waived at some point in Han-Wen's heavy backend
refactorings (removing the eps backend among others). Well, it's true that
the primary motivation for these refactorings was better Cairo support.

So the limitation is gone now, even without Cairo. That being said, for the
other reasons I mentioned earlier, it is still a very good idea to use Cairo
for SVG output.

Best,
Jean


Reply via email to