There are currently two problems (alignment discussion notwithstanding and which I'm not ignoring, but would prefer to park temporarily) with my proposed incipit code. 1) If indent is not set explicitly in the \layout block, it throws an error; 2) If instrumentName is not set explicitly in the score containing the incipit, no incipit is output.
For 1), the optimum answer would apppear to be to check whether indent has been set, and if it hasn't, set it to the value of indent-default which is set in paper-defaults-init.ly as "indent-default = 15\mm". However, trying to access that variable fails: "test = \indent-default" results in "error: unknown escaped string: `\indent-default'". Does anyone know why this is and whether there's an alternative way to access that variable value? If it's not possible to get the value, we could set a variable to what we know its value to be, and then use that. The following code works: indent-incipit-default = 15\mm line-width = #(primitive-eval '(or (false-if-exception (* 1.0 indent)) (* 1.0 indent-incipit-default))) But all those (* 1.0 variable) lines aren't pretty, but I don't know better syntax. Would appreciate help here. For 2), the only solution I know is that we would have to add 'Note that instrumentName must be set in the music for the incipit to be produced. If no instrument name is required then use \set Staff.instrumentName = #""' in the documentation. Is there a better solution? _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
