Daniel Thompson <[email protected]> writes:

> Hi Folks
>
> I am trying to modify an shared include file the allow it to switch
> the score that uses it between A4 "normal" mode and an cut-down A5
> form (for an e-book reader).
>
> I can make set-paper-size conditional using a $(if construct but can't
> find a way to conditionally set the margins. I've constructed a tiny
> example showing what I have trouble with (it no longer shows my motive
> but does show my problem).
>
> --- cut here ---
> \version "2.16.2"
> \paper {
> $(if (ly:get-option 'binder-margins) #{
>   left-margin = 20
>   line-width = 180
> #})
> }

Well, inside of #{ ... #} there is music by default.  If you want to
have an output block, you need to place it there.  For me,

\version "2.16.2"
\paper {
$(if (ly:get-option 'binder-margins) #{
  \paper {
    left-margin = 20
    line-width = 5
  }
#})
}
\score { \relative { c4 d e f g a b c } }

appears to do the trick.

-- 
David Kastrup


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to