I've worked up a little cleaner way. It is done by hacking molecule.scm
and new-markup.scm. The diffs are attached. By applying these you can
just use the markup "\box" and you get a box around a portion of your
markup.
On Thu, 2003-07-03 at 11:47, David Raleigh Arnold wrote:
> I found a way to do this just now. I can't figure out
> what I did with the original post. You just have to
> find \framebox instead of \box* or \textbox or any of the
> other obvious suspects.
>
> Again, the "Not So Short Introduction to LaTeX2e" is online and
> free for the downloading and indispensible.
>
> a'^" "^"$\\!\\!\\!\\!$\\huge{\\framebox{Frame this!}}"
>
> DaveA
--
Dick Schoeller
mailto:[EMAIL PROTECTED]
http://schoeller.ne.client2.attbi.com/
781.449.5476
"Er ist ein Narr, der meint, es sei nicht schad, das Kind
auszusch�tten mit dem Bad" - Thomas Murner 1512
*** new-markup.scm.1.7.23 2003-07-03 12:19:01.000000000 -0400
--- new-markup.scm 2003-07-03 12:35:08.000000000 -0400
***************
*** 380,385 ****
--- 380,396 ----
(car rest))
))
+ (define-public (box-markup grob props . rest)
+ "Syntax: \\box MARKUP"
+ (let*
+ (
+ (th 0.1)
+ (pad 0.2)
+ (m (interpret-markup grob props (car rest)))
+ )
+ (boxify-molecule m th pad)
+ ))
+
(define (markup-signature-to-keyword sig)
" (A B C) -> a0-b1-c2 "
***************
*** 538,543 ****
--- 549,556 ----
(cons raise-markup (list number? markup?))
(cons magnify-markup (list number? markup?))
(cons fontsize-markup (list number? markup?))
+
+ (cons box-markup (list markup?))
)
)
*** molecule.scm.1.7.23 2003-07-03 12:35:46.000000000 -0400
--- molecule.scm 2003-07-03 06:52:58.000000000 -0400
***************
*** 45,50 ****
--- 45,69 ----
mol
))
+ (define-public (boxify-molecule mol thick padding)
+ "Add a box around MOL, producing a new molecule."
+ (let*
+ (
+ (x-ext (widen-interval (ly:molecule-get-extent mol 0) padding))
+ (y-ext (widen-interval (ly:molecule-get-extent mol 1) padding))
+ (x-rule (box-molecule (widen-interval x-ext thick)
+ (cons 0 thick)))
+ (y-rule (box-molecule (cons 0 thick) y-ext))
+ )
+
+ (set! mol (ly:molecule-combine-at-edge mol 0 1 y-rule (* 0.5 padding)))
+ (set! mol (ly:molecule-combine-at-edge mol 0 -1 y-rule (* 0.5 padding)))
+ (set! mol (ly:molecule-combine-at-edge mol 1 1 x-rule 0.0))
+ (set! mol (ly:molecule-combine-at-edge mol 1 -1 x-rule 0.0))
+
+ mol
+ ))
+
(define-public (box-molecule xext yext)
"Make a filled box."
_______________________________________________
Lilypond-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-devel