"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/lilypond/Markup-construction-in-Scheme.html

\version "2.7.0"
#(define my-cond #f)

\paper {
  bookTitleMarkup = \markup {
    \column {
      \fill-line {
        \large \bold \fromproperty #'header:title
        \fromproperty #'header:meter
        \line { \fromproperty #'header:composer " " 
                \italic \fromproperty #'header:arranger } 
      }
      #(ly:export (if my-cond 
                      (markup #:fromproperty 'header:comment) 
                      (markup)))
    }
  }
}

\header {
    title = "Title"
    meter = "Meter"
    composer = "Composer"
    comment = "Comment"
}

\relative c'' { a b c d }


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

Reply via email to