Hi,

I have been there already, but I can't find the corresponding email, and I don't recall if they actually contained a solution or only an explanation of the cause of the issue. So I have to start nes.

For the creation of music examples in a book I have written a function \compileScore which does a number of things like munging file names, cleaning up temporary files and particularly compiling different versions of the file.

One particular issue is that it includes appropriate style sheets according to the example type (which is expressed as a variable). The problem is that #(set-global-staff-size) doesn't work in that constellation, IISC because it's not a toplevel expression anymore.

The attached files show a very stripped-down version of the stuff and will probably not look very useful.

But my question is: How can I set the global staff size from within the included file?

Best
Urs
\version "2.19.6"

compileScore =
#(define-void-function (parser location score)(ly:score?)
   (let ((book
          #{
            \book {
              \include "example-styles.ily"
              \score { #score }
            }
          #}))
     (ly:book-process
        book
        #{ \paper {} #}
        #{ \layout{} #}
       (ly:parser-output-name parser))))

\compileScore
\score {
  \new Staff { c' }
}
\version "2.19.6"

#(set-global-staff-size 44)

#(ly:set-option 'preview #t)

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to