|
From: | Aaron Hill |
Subject: | Re: Markup-Command shortcut |
Date: | Thu, 09 Apr 2020 11:15:19 -0700 |
User-agent: | Roundcube Webmail/1.4.2 |
On 2020-04-09 11:09 am, foxfanfare wrote:
Hi all,Quick question, I made the following shortcut which draw an arrow of customlenght: #(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 commandand 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
[Prev in Thread] | Current Thread | [Next in Thread] |