> From: Nicolas Sceaux [mailto:[EMAIL PROTECTED] > Subject: Re: Using Scheme inside header markup > > "Sven Axelsson" <[EMAIL PROTECTED]> writes: > > > Lilypond 2.6.0 Windows > > > myCond = ##t > > \paper { > > bookTitleMarkup = \markup { > > \column { > > \fill-line { > > \large \bold \fromproperty #'header:title > > \fromproperty #'header:meter > > \line { \fromproperty #'header:composer " " \italic > > \fromproperty #'header:arranger } > > } > > #(if myCond ( #{\line { \fromproperty > #'header:comment } #} )) > > } > > } > > } > > > [...] but it always gives me a "unknown escaped string" for all the > > backslash expressions at the point right after \header, and > > "unexpected SCM_T" at the #(if statement. > > #{ ... #} is for entering music expressions inside Scheme. > What you want > here is to enter markup expressions. You can do that using the > 'markup' macro. See the LilyPond manual: > http://lilypond.org/doc/v2.6/Documentation/user/out-www/lilypo > nd/Markup-construction-in-Scheme.html
Great. Now it works that far. What I acually want to do here is to detect if Lilypond has been called with the --preview flag and then turn off my comment field in the header. I asked that question some days ago and got this answer from Han-Wen: > You could use -dno-verbose-header and then read the > result with ly:get-option. So I thought I just could do #(ly:export (if (ly:get-option 'preview) (markup ...))) but that doesn't work. I get an error "Unknown global option". Obviously only a few options are transfered from main.cc and preview is not one of them. Han-Wen, how should I do this? Thanks -- Sven Axelsson _______________________________________________ lilypond-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-user
