On 2020-04-09 11:09 am, foxfanfare wrote:
Hi all,
Quick question, I made the following shortcut which draw an arrow of
custom
lenght:
#(define-markup-command (arrow layout props size) (number?)
(interpret-markup layout props
(markup
#:line
(#:fontsize 3
(#:general-align 0 -1
(#:override (cons (quote thickness) 2)
(#:combine
(#:draw-line (cons 0 size))
(#:arrow-head 1 -1 #f))))))))
\relative c' {
c1^\markup \arrow #2
}
---
I wonder, is it possible to skip the \markup declaration before the
command
and just have to write something like c1^\arrow #1 ?
Yes:
%%%%
\version "2.20.0"
#(define-markup-command (arrow layout props size) (number?)
(interpret-markup layout props
(markup
#:line
(#:fontsize 3
(#:general-align 0 -1
(#:override (cons (quote thickness) 2)
(#:combine
(#:draw-line (cons 0 size))
(#:arrow-head 1 -1 #f))))))))
arrow = -\markup \arrow \etc
\relative c' {
c1^\markup \arrow #2
c1^\arrow #2
}
%%%%
-- Aaron Hill