Am 12.11.2014 um 20:09 schrieb Marc Hohl:
Am 12.11.2014 um 13:35 schrieb Werner LEMBERG:

Well, I was about to answer, but somehow ...

:-)

I defined some \abs-... markup commands myself

Ha!  Where are they?  I guess this would have saved me many hours of
wading through obscure LilyPond Scheme code...

D'oh. A closer look into the sources of my old project dates 2011, and I
did not use \abs-... but \...-mm instead and gave all dimensions in
millimetres.

Anyway, here are the definitions, in case they might be useful for
somebody:
[..]

I forgot

#(define-markup-command (with-dimensions-mm layout props x y arg)
  (number-pair? number-pair? markup?)
  (let* ((m (interpret-markup layout props arg))
         (o-s (ly:output-def-lookup layout 'output-scale))
         (x1 (/ (car x) o-s))
         (x2 (/ (cdr x) o-s))
         (y1 (/ (car y) o-s))
         (y2 (/ (cdr y) o-s))
         (scaled-x (cons x1 x2))
         (scaled-y (cons y1 y2)))
    (ly:make-stencil (ly:stencil-expr m) scaled-x scaled-y)))

Marc




_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to