lilypond-user
[Top][All Lists]
Advanced

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

Re: Question about Scheme's syntax


From: Paolo Prete
Subject: Re: Question about Scheme's syntax
Date: Thu, 5 Sep 2024 19:14:57 +0200



On Thu, Sep 5, 2024 at 2:07 PM David Kastrup <dak@gnu.org> wrote:
Paolo Prete <paolopr976@gmail.com> writes:


Still scheme? instead of markup?

Still a scheme function instead of a markup command.

>                                   #{
>                                     \markup \with-dimensions #'(0 . 0) #'(0
> . 0){
>                                       \override #'(baseline-skip . 0)
>                                       \translate #(cons x y)
>                                       #obj
>                                     }
>                                   #})
>
>
> % GOOD
> \floating-markup 15 -60 "some string"
>
> % ERROR
> \floating-markup 15 -60 #{ \markup { \circle 1 } #}

I made a number of points.  Your "I see" only addressed a single one.

To wit, you are still putting a Scheme _expression_ instead of a LilyPond
_expression_ in a place only admitting LilyPond syntax.

The straightforward way of calling this as-is would be

\floating-markup 15 -60 \markup \circle #1



\version "2.24.1"

floating-markup = #(define-scheme-function (parser location x y obj) (number? number? scheme?)
                                  #{
                                    \markup \with-dimensions #'(0 . 0) #'(0 . 0){
                                      \override #'(baseline-skip . 0)
                                      \translate #(cons x y)
                                      #obj
                                    }
                                  #})


% GOOD
\floating-markup 15 -60 "some string"

% ERROR
\floating-markup 15 -60 \markup \circle #1

%%%%%%%%%%%

Doesn't seem to compile this way. Did I miss something?

Thanks


reply via email to

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