Thanks for that solution. It is helpful to know that I can get things to work in this way. However, I do wish I understood why this works and my version doesn't - bearing in mind that my version does work until I introduce /bookpart, yet the error messages produced by Lilypond don't obviously relate to that.
What is also curious is this. I understand that introducing Scheme code with '#' or '$' affects at what point the code is run. Your version works in both cases. My version works in neither case, although only the '$' version produces the error messages. Using the '#' version there are no errors apparently, but still no output file is produced. Molto misterioso! David On Tue, 2016-12-20 at 22:36 +0000, Timothy Lanfear wrote: > How about this? > > \version "2.19.48" > > \language "english" > > printScore = ##t > printMvtOne = ##t > printMvtTwo = ##t > > #(if > (and printScore > (or printMvtOne printMvtTwo)) > (ly:parser-include-string "\\include \"testprint.ily\"")) > > > On 20/12/16 21:57, David Sumbler wrote: > > > > I am still experimenting with constructing a file structure which > > makes > > sense to me for more complex works. I have come quite a long way > > with > > it and discovered some interesting things. > > > > But \bookpart seems to cause problems. > > > > The following works: > > > > File: test.ly > > %%%%% > > \version "2.19.48" > > > > \language "english" > > > > printScore = ##t > > printMvtOne = ##t > > printMvtTwo = ##t > > > > $(if > > (and printScore > > (or printMvtOne printMvtTwo)) > > #{ \include "testprint.ily" #} ) > > %%%%% > > > > File: testprint.ily > > %%%%% > > \version "2.19.48" > > > > \book { > > \score { c } > > } > > %%%%% > > > > Modify the second file thus: > > > > File: testprint.ily > > %%%%% > > \version "2.19.48" > > > > \book { > > \bookpart { > > \score { c } > > } > > } > > %%%%% > > > > This no longer works, but gives the following error messages: > > > > Parsing.../usr/local/lilypond/usr/share/lilypond/current/scm/lily- > > library.scm:243:5: In procedure ly:book-process in expression > > (process-procedure book paper ...): > > /usr/local/lilypond/usr/share/lilypond/current/scm/lily- > > library.scm:243:5: Wrong type (expecting real number): #<undefined> > > > > Once again I am finding that the use of \bookpart is giving > > problems. I don't know if this is once again somehow connected > > with the fact that bookparts have no variable scope, but it's a > > damn nuisance anyway! > > > > Any suggestions? > > > > David > > > > > > _______________________________________________ > > 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