I tried the following inside the function, and all generate errors. I would like to use the value of rubricsWidthSU in this override.
\override #'(line-width . \rubricsWidthSU) \override #'(line-width . #rubricsWidthSU) \override #'(line-width . ,rubricsWidthSU) Many thanks, mattfong On Sat, Jan 6, 2024 at 3:21 PM Matthew Fong <[email protected]> wrote: > Hello everyone, > > I'm feeling somewhat confounded by LilyPond Scheme variables. > > I've created some global variables that I want to use in functions so I > change up some custom spacing only one (as these may vary with staff size) > > I defined the following > #(define kOneStaffUnitInInches 0.0761) > #(define kContentWidthInches 6.5) > > #(define halfInchSU (/ 0.5 kOneStaffUnitInInches)) > #(define contentWidthSU (/ kContentWidthInches kOneStaffUnitInInches)) > #(define rubricsWidthSU (/ (- kContentWidthInches 0.5) > kOneStaffUnitInInches)) > > And wrote this function: > rubricsTest = > #(define-scheme-function > (text) > (markup-list?) > #{ \markup > \line { > \hspace #halfInchSU > \override #'(line-width . 78.84) > \wordwrap #text > } > #} > ) > > \rubricsTest \markuplist { Although it is provided with its own Preface, > this Eucharistic Prayer may also be used with other Prefaces, especially > those that present an overall view of the mystery of salvation, such as the > Common Prefaces. } > > ----- > > I can get \hspace to happily use the variable halfInchSU. However, I > cannot seem to use the variable rubricsWidthSU with \override > #'(line-width . 78.84). > > I must be missing something very simple? > > > Many thanks, > mattfong > > > >
