On 1/17/19, 8:02 AM, "David Kastrup" <[email protected]> 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" <[email protected]> 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
        

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

Reply via email to