[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extended mensuration signs in markup via Scheme
From: |
David Kastrup |
Subject: |
Re: Extended mensuration signs in markup via Scheme |
Date: |
Tue, 10 Sep 2013 04:39:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Graham King <address@hidden> writes:
> But when I try to move all the complicated Scheme stuff into a function,
> it gives an impenetrable thicket of errors:
>
> \version "2.16.2"
>
> mensSign = #(define-scheme-function (parser location name)
> (string?)
> (case name
> (("C") (#(markup #:number
>
> (#:line ((markup (#:musicglyph
> "timesig.mensural64"))
> (#:fontsize -4 #:column ("3"
> "2")))))))
>
>
> )
> )
>
> music = \relative c' {
> \time 3/4
> c8 b c d e f g4
> \mark \markup { \mensSign #"C" }
> g g g4 a8 g f e d2. \bar "|."
> }
>
> \score { \music }
Inside of markups, you can't use functions defined with
define-scheme-function (their argument parsing is just not compatible
with markup mode). Check out define-markup-command instead.
As a note aside: case can't be used with strings as (eqv? "x" "x") => #f
--
David Kastrup