[frogs] Re: Add option to indicate frets by letters in tablature(issue164063) |
[ Thread Index | Date Index | More lilynet.net/frogs Archives ]
Carl Sorensen wrote Monday, December 07, 2009 7:17 PM
On 12/7/09 11:11 AM, "Trevor Daniels" <t.daniels@xxxxxxxxxxx> wrote:Carl Sorensen wrote Monday, December 07, 2009 2:18 PMI don't think there's anything special to do in terms of mixing strings or markups in a property. The property is just a list. Actually, as I read the code, you don't need to do anything, because make-vcenter-markup just does interpret-markup on its argument (see scm/define-markup-commands.scm and search for vcenter to see how thisworks). So interpret-markup will operate on the argument (eithera string or a markup) and create a stencil.The thing that bugging me is how do I code the fretLabels property?I've tried every way I can think of to enter markup so make-vcenter-markup is happy to receive it, but they all fail in one way or another. I think I must be missing something obvious. As examples, fretLabels = ("a" "b" "c") works fine, of course. fretLabels = ("a" "b" "\markup { \italic c } ") fails with syntax error, unexpected ( (after the =) fretLabels = ("a" "b" \markup { \italic c } ) fails with invalid markup in position 1. expect markup found \markupYou need to use a Scheme markup, not a lilypond markup.
Thanks Carl. I had tried that earlier, and that didn't work either. The thing I was missing was an eval-string function to cause the Scheme string to be evaluated. So, I've now got it working, but the format is a bit convoluted. The markup has to be in scheme brackets in a string, which means strings inside have to be escaped, like this: fretLabels = #'("a" "b" "(markup #:italic #:smaller \"c\")") Unless you can suggest a better way this is what we shall have to go with. We can still simply specify the required font as an override to TabNoteHead, so maybe markup like this will be required only in pretty exceptional circumstances. I'll post the new patch-set tomorrow after I've checked it out more carefully. Trevor --- ---- Join the Frogs!
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |