lilypond-user
[Top][All Lists]
Advanced

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

Re: Trouble defining markup functiion


From: Carl Sorensen
Subject: Re: Trouble defining markup functiion
Date: Thu, 17 Jan 2019 19:57:48 +0000
User-agent: Microsoft-MacOutlook/10.10.5.181209

On 1/17/19, 8:02 AM, "David Kastrup" <address@hidden> wrote:

    >
    > I've used displayScheme to get the representation of the markup
    > function.  I've found that is uses #:line so that I have to use
    > make-line-markup.
    
    #:sans is garbage outside of the markup macro.  Also make-line-markup
    requires a list as its argument.

That's what I thought, but I couldn't find it documented.
    
    Your original
    \markup{\sans{\fontsize #10 "C"}}
    
    contains two levels of spurious braces.  Those generate spurious markup
    lists causing LilyPond to intersperse a \line call for converting back
    to a single markup.

I thought I copied that code from the NR, but I can't find it, so I must not 
have.
    
    Any reason you don't use #{ \markup ... #} for constructing your markup?
    That way you don't need to replace LilyPond's expertise for constructing
    markups with your own.
    
Only because of ignorance.  The last time I spent serious time writing markup 
functions, #{ ... #} wasn't available.  Thanks for pointing it out to me, and 
again reminding me how much your work has improved the usability of LilyPond!

On 1/17/19, 8:05 AM, "Aaron Hill" <address@hidden> wrote:

    
    I would sidestep trying to do the markup in pure Scheme and use #{ #} 
    instead:
    
    %%%%
    #(define-markup-command  (chord-name-markup layout props chord-name) 
    (markup?)
        "Display a chord name in the desired formatting"
        (interpret-markup layout props
          #{ \markup \sans \fontsize #10 $chord-name #}))
    %%%%

Thanks for the help, Aaron.  As both you and David mentioned, that was the 
right way to go about it.

Thanks,

Carl
        


reply via email to

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