Music: Practice & Theory Stack Exchange is a question and answer site for musicians, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have LilyPond lead sheets for which I would like to be able to choose some display tweaks at compile time, primarily in order to tailor the sheet for the preferred transposition (e.g. for B-flat instruments) and clef of the musician to whom I'm handing it.

I believe style sheets and \include will give me a good way of handling this, but I would like a way to specify the name of the style sheet I'd like to select right from the lilypond command line invocation. What would be the best way to do this? Alternatively, is there another, better way to accomplish the goal?

share|improve this question
up vote 6 down vote accepted

Please read the magnificent documentation at specifically:

#(use-modules (guile-user))
#(format #t "Using style sheet: ~a\n" style-sheet)
\include #style-sheet
\relative { c' d e }

style-default.ily: % style defs

Then run,

lilypond -e '(define-public style-sheet "style-default.ily")'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.