lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Using Scheme inside header markup


From: Sven Axelsson
Subject: RE: Using Scheme inside header markup
Date: Tue, 12 Jul 2005 17:17:17 +0200

> From: Nicolas Sceaux [mailto:address@hidden 
> Subject: Re: Using Scheme inside header markup
> 
> "Sven Axelsson" <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]