[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dynamic + text aligned: BEST solution?
From: |
Xavier Scheuer |
Subject: |
Dynamic + text aligned: BEST solution? |
Date: |
Sun, 19 Jun 2011 23:30:25 +0200 |
Hi,
There are currently different "tricks" in order to align text and a
dynamic (with the dynamic correctly aligned centered below the attached
note).
The following snippets are providing different solutions (some with
important drawbacks) to this issue/request (useful in many cases!):
http://lsr.dsi.unimi.it/LSR/Item?id=393
http://lsr.dsi.unimi.it/LSR/Item?id=739
but there is also Graham's "make-dynamic-extra" (see below) and IIRC
Valentin has a pending PATCH for implementing this.
I do not understand what means the Scheme code in each of these, could
someone have a look and tell me which one seems the best (i.e. with
the least possible drawbacks for an implementation)?
Many thanks in advance!
%%% This function was provided by Graham Percival.
#(define (make-dynamic-extra dynamic string)
(make-music
'AbsoluteDynamicEvent
'tweaks
;; calculate centering for text
(list (cons (quote X-offset)
(+ -0.5 (* -0.5 (string-length dynamic)))))
'text
(markup #:whiteout
#:line (
dynamic
#:hspace -0.3
#:normal-text #:italic string))
))
ffdolce = #(make-dynamic-extra "ff" "dolce")
{ a1 a\ffdolce a }
%%%%%%%%%%%%%%
Cheers,
Xavier
--
Xavier Scheuer <address@hidden>
- Dynamic + text aligned: BEST solution?,
Xavier Scheuer <=