Le 10/01/2023 à 19:11, Timothy Lanfear a écrit :
The function ly:command-line-options returns a string with all the -d
options. The backend option is set to svg when when generating svg
output and absent by default.
\version "2.22.0"
#(let* ((options (ly:command-line-options))
(svg (string-contains options "(backend . svg)")))
(if (integer? svg) (ly:message "svg") (ly:message "not svg")))
{
c''1
}
In recent versions, this is not always true: if you compile with the Cairo backend, using -dbackend=cairo, the 'backend option is set to 'cairo regardless of the output format. In fact, in the Cairo backend, you can generate PDF and SVG in the same LilyPond invocation. Therefore, I think it's best to use either environment variables, or the -e / --evaluate option described here: https://lilypond.org/doc/v2.24/Documentation/usage/command_002dline-usage#basic-command-line-options-for-lilypond Best, Jean
OpenPGP_signature
Description: OpenPGP digital signature
