|
From: | Germain G. Ivanoff-Trinadtzaty |
Subject: | Re: alias, procedures, macros |
Date: | Wed, 27 Jun 2007 19:24:14 +0200 |
Hi, I want to define new commands (without arguments): \sansbis : would be an exact alias to the call \sans \myfont : would be a modified version of \sansI can't figure out the way to define these, though I've read a couple of scheme snippets.Any idea ? Thanks, Germain
I still can't make a new command like \sans or \tiny to be applied in a \markup block.
Following (broken) code shows you some attempts I've made to define \myfont. Could you please show me the right way ? Thank you very much, Germain %%%%%%%%%%%%%%%%%%%%%%% \version "2.11.26" fontA = \override #'(font-family . sans) fontB = \override #'(font-name . "arial") fontC = #(define-music-function (parser location) () #{ \sans #} (make-music 'SequentialMusic 'void #t)) fontD = #(define-music-function (parser location) () ( #{ \set #'font-family = sans #} )) fontE = #(define-music-function (parser location markp) (string?) (parser location markp) (string?)) fontF = #(define-markup-command ( layout props ) #{ ( \sans ) #}) fontG= #{\sans#} fontH = \markup {\sans} (define-syntax fontJ #{ (ly:sans) #} ) fontK = \sans %%%%%%%%%%%%%%%%%%%%%%% myfont = \fontA \markup { \myfont "azerty" } %%%%%%%%%%%%%%%%%%%%%%%
[Prev in Thread] | Current Thread | [Next in Thread] |