[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
markup->string and user markup commands
From: |
Jérôme Plût |
Subject: |
markup->string and user markup commands |
Date: |
Thu, 8 Nov 2018 20:59:45 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
#(begin
; after http://lsr.di.unimi.it/LSR/Snippet?id=969
(define-markup-command (with-background layout props color arg) (color? markup?)
(let* ((stencil (interpret-markup layout props arg))
(X-ext (ly:stencil-extent stencil X))
(Y-ext (ly:stencil-extent stencil Y)))
(ly:stencil-add (ly:make-stencil
(list 'color color
(ly:stencil-expr (ly:round-filled-box X-ext Y-ext 0))
X-ext Y-ext)) stencil)))
(display "\"")
(display (markup->string (markup #:with-background `(1. 0. 0.) "something")))
(display "\"")
)
This should display "something". However it displays an empty string.
How could I fix this?
(I tried to manually debug markup->string (in scm/markup.scm): as I
understand it, the problem is likely that with-background does not
belong to the 'lily module. However, I am completely unfamiliar with
guile's module system, so I don't have the slightest idea about how to
fix this).
Thanks,
--
Jérôme
- markup->string and user markup commands,
Jérôme Plût <=