[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about Scheme's syntax
From: |
David Kastrup |
Subject: |
Re: Question about Scheme's syntax |
Date: |
Thu, 05 Sep 2024 21:34:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Paolo Prete <paolopr976@gmail.com> writes:
> 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?
You are again fixing only a single thing from all those I mention.
Other than that, my mistake for not looking up what \circle does.
Indeed, this has to be
\floating-markup 15 -60 \markup \circle 1
because 1 is supposed to be a markup, not a number. Sorry for that.
As for the other problems: I will not keep telling you them one by one.
--
David Kastrup