[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hbracket question
From: |
Thomas Morley |
Subject: |
Re: hbracket question |
Date: |
Fri, 15 Feb 2019 00:35:52 +0100 |
Am Fr., 15. Feb. 2019 um 00:11 Uhr schrieb Ben <address@hidden>:
>
> Hi all,
>
> Is it possible to adjust the length of the shorter vertical line of \hbracket
> when you use it as markup?
No, it's all hardcoded.
But you can redefine it:
#(define-markup-command (hbracket-harm layout props arg)
(markup?)
#:category graphic
#:properties ((thickness 1)
(height 0.25))
"
@cindex placing horizontal brackets around text
Draw horizontal brackets around @var{arg}.
@lilypond[verbatim,quote]
\\markup {
\\hbracket {
\\line {
one two three
}
}
}
@end lilypond"
(let ((th (* (ly:output-def-lookup layout 'line-thickness)
thickness))
(m (interpret-markup layout props arg)))
(bracketify-stencil m X th height th)))
\relative c' {
R1*3
c1^\markup {
\override #'(thickness . 2)
\override #'(height . 1)
\hbracket-harm {
\line \pad-around #0.2 {
My markup
}
}
}
}
Probably rename it ;)
Best,
Harm