In general it's best practice to keep includes at the top of the file, so I 
would do it like this:

%file custom.ly
varA = %letter paper; can't check syntax on my ipod so not going to try
varB = %ragged right

%your file
\version "2.18.0"
\include "custom.ly"
\paper{ \varB }
etc.


On Jan 2, 2014, at 9:11 PM, Jay Anderson <horndud...@gmail.com> wrote:

> On Thu, Jan 2, 2014 at 6:55 PM, guocuozuoduo <brian777...@hotmail.com> wrote:
>> I would like to know how to use the \include command for only part of a 
>> score.
>> It is not described in the manual.
> 
> sectionA.ily:
> \relative c' {\time 4/4 c1 |}
> 
> sectionB.ily:
> \relative c' {e1 |}
> 
> score.ly:
> \score {
>  \new Staff {
>    \include "sectionA.ily"
>    \include "sectionB.ily"
>  }
> }
> 
> (I haven't tested the above, but this shows the idea.)
> 
> Alternatively you could assign the sections to variables and use those
> instead of using \include directly:
> 
> 
> sectionA.ily:
> sectionA = \relative c' {\time 4/4 c1 |}
> 
> sectionB.ily:
> sectionB = \relative c' {e1 |}
> 
> score.ly:
> \include "sectionA.ily"
> \include "sectionB.ily"
> 
> \score {
>  \new Staff {
>    \sectionA
>    \sectionB
>  }
> }
> 
> -----Jay
> 
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

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

Reply via email to