[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: function does not replicate \markup?
From: |
David Kastrup |
Subject: |
Re: function does not replicate \markup? |
Date: |
Sun, 24 Jun 2012 12:36:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
"address@hidden" <address@hidden> writes:
> On 2012-06-24 11:19, David Kastrup wrote:
>
> You make overrides for a TextScript but still use a mark here.
>
> I see what your are saying, but ...
> In my function I need a command?
> \mark is the only one I have found that output a text, but obviously
> it's not the correct command!
> So what is the command I should use??
>
> Still double-spaced.
>
> Ok, will try something else...
> fN = #(define-music-function (parser location fretp ) (string?)
> #{
> \once \override TextScript #'self-alignment-X = #RIGHT
> \once \override TextScript #'direction = #DOWN
> \mark \markup { \box \italic \small $fretp }
> #}
> )
Thunderbird does not really seem to like quoting code... This now was a
mixed HTML/plain text mail. The plain text version looked actually
fine, so it is not quite clear why you would need a combined mail just
to get the correct plain text version out. The HTML rendition here used
non-breakable spaces...
> Anyway, you ask why different things look different. It is because
> they are different things. There is not really more to it than
> that. The real question is why this poses a problem for you, and
> what it is you are actually trying to achieve.
>
> Sorry I thought I had explained this. I want the first result. Where
> the number is located directly under the note or chord.
Then you should not be using a mark. If you want to be using a
textscript, this is actually more fun to do with current versions of
LilyPond (2.15.not-too-old). It would look something like
fN = #(define-event-function (parser location fretp ) (string?)
#{
_\markup { \box \italic \small #fretp }
#})
The closest you can get with 2.14 is something like
fN = #(define-music-function (parser location fretp ) (string?)
(make-music 'TextScriptEvent
'text (markup #:box #:italic #:small $fretp)
'direction DOWN))
if you are lucky, and even then you will have to use it as
-\fN "whatever"
rather than just \fN "whatever".
--
David Kastrup