Re: define-markup-command

2023-04-08 Thread Jean Abou Samra
#}) { fis4^\mymk 215 } ``` Note that this is a regular syntax function returning a markup (defined with define-scheme-function) rather than a markup command, but you can also define a markup command if you wish: ``` \version "2.24.1" #(define-markup-command (mymk layout props se

define-markup-command

2023-04-07 Thread Ken Ledeen
Hi All, Thanks to Jean Abou Samra I can now create \markup that goes to a place in a youtube video. These are of the form: fis4^\markup \with-url#"https://youtu.be...?t=SEC"; {ref} where "SEC" is replaced with the number of seconds in from the start. I would like to create a function to simplif

Re: How to use optional arguments / parameters in a define-markup-command

2019-11-05 Thread Urs Liska
5. November 2019 11:19, "Thomas Morley" schrieb: > Am Di., 5. Nov. 2019 um 09:14 Uhr schrieb Karsten Reincke > : > >> On Mon, 2019-11-04 at 23:06 +0100, Thomas Morley wrote: >> Am Mo., 4. Nov. 2019 um 18:00 Uhr schrieb Karsten Reincke >> : >> [...] >> Let me quote another part of my reply: >>

Re: How to use optional arguments / parameters in a define-markup-command

2019-11-05 Thread Thomas Morley
Am Di., 5. Nov. 2019 um 09:14 Uhr schrieb Karsten Reincke : > > On Mon, 2019-11-04 at 23:06 +0100, Thomas Morley wrote: > > Am Mo., 4. Nov. 2019 um 18:00 Uhr schrieb Karsten Reincke > > : > > [...] > > Let me quote another part of my reply: > > > > Am Fr., 1. Nov. 2019 um 16:01 Uhr schrieb Thomas

Re: How to use optional arguments / parameters in a define-markup-command

2019-11-05 Thread Karsten Reincke
alPair (cdr localPair) defaultValue) ) ) % 2.) we define a markup function using a flexible variable % parameter list: % a) At the beginning we define the local parameter variables % and let them be instantiated by our assign function. % b) Then we manipulate the given values in any wa

Re: How to use optional arguments / parameters in a define-markup-command

2019-11-05 Thread Karsten Reincke
On Mon, 2019-11-04 at 23:06 +0100, Thomas Morley wrote: > Am Mo., 4. Nov. 2019 um 18:00 Uhr schrieb Karsten Reincke > : > [...] > Let me quote another part of my reply: > > Am Fr., 1. Nov. 2019 um 16:01 Uhr schrieb Thomas Morley > : > > > For variable amount of args I'd go for list? (or the like

Re: How to use optional arguments / parameters in a define-markup-command

2019-11-04 Thread Urs Liska
Hi Karsten, 4. November 2019 17:59, "Karsten Reincke" schrieb: > Dear friends > > A few days ago, I asked whether anyone knows how one can use variable > parameter > lists = optional arguments = flexible argumentlists in a markup function. I > was > told that such an opportunity does not exis

Re: How to use optional arguments / parameters in a define-markup-command

2019-11-04 Thread Thomas Morley
Am Mo., 4. Nov. 2019 um 18:00 Uhr schrieb Karsten Reincke : > > Dear friends > > A few days ago, I asked whether anyone knows how one can use variable > parameter > lists = optional arguments = flexible argumentlists in a markup function. I > was > told that such an opportunity does not exist (Th

How to use optional arguments / parameters in a define-markup-command

2019-11-04 Thread Karsten Reincke
gn function. Then we manipulate the given values in any way. And finally we return - as a markup 'object' - a box containing the result of our manipulation: #(define-markup-command (mybox layout props AL) (list?) (let* ( (la (assign ka AL dva)) (lb (assign kb AL dvb

Re: define-markup-command with variable number of arguments

2019-11-02 Thread Urs Liska
Am 01.11.19 um 16:01 schrieb Thomas Morley: Am Fr., 1. Nov. 2019 um 15:34 Uhr schrieb Karsten Reincke : does anyone has / know about an example of a define-markup-command implementation using a variable number of arguments / parameters? Nope, optional arguments are not possible using

Re: define-markup-command with variable number of arguments

2019-11-01 Thread Thomas Morley
Am Fr., 1. Nov. 2019 um 15:34 Uhr schrieb Karsten Reincke : > does anyone has / know about an example of a define-markup-command > implementation > using a variable number of arguments / parameters? Nope, optional arguments are not possible using define-markup-command. > Unfortun

define-markup-command with variable number of arguments

2019-11-01 Thread Karsten Reincke
Dear friends; does anyone has / know about an example of a define-markup-command implementation using a variable number of arguments / parameters? Unfortunately, in my system (Linux Ubuntu 19.10 with Lilypond 2.18...) the normal GUILE / scheme syntax (define (x y . args) ) (doanythingwith args

Re: define and define-markup-command

2019-01-22 Thread Paolo Cantamessa
urce=gmail&utm_medium=signature&utm_campaign=signaturevirality5&;> 22/01/19, 22:01:26 Il giorno mar 22 gen 2019 alle ore 20:40 David Kastrup ha scritto: > Paolo Cantamessa writes: > > > Hello guys, > > I need to undesrtand

Re: define and define-markup-command

2019-01-22 Thread David Kastrup
Paolo Cantamessa writes: > Hello guys, > I need to undesrtand how work "define" and "define-markup-command". > > This work: > #(define (testA txt mus y-offset) >#{\markup \vcenter { >

define and define-markup-command

2019-01-22 Thread Paolo Cantamessa
Hello guys, I need to undesrtand how work "define" and "define-markup-command". This work: #(define (testA txt mus y-offset) #{\markup \vcenter { #txt \column { \null \vspace #1 \sco

Re: Using \score in define-markup-command

2016-02-29 Thread tisimst
On Mon, Feb 29, 2016 at 2:07 PM, David Kastrup [via Lilypond] < ml-node+s1069038n187897...@n5.nabble.com> wrote: > tisimst <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=187897&i=0>> writes: > > > By the way, did the syntax for define-mark

Re: Using \score in define-markup-command

2016-02-29 Thread David Kastrup
tisimst writes: > By the way, did the syntax for define-markup-command get simplified > like define-music-function so the "layout props" args aren't necessary > anymore? Just curious. No. Neither does it do all the smart argument detection and default arguments

Re: Using \score in define-markup-command

2016-02-29 Thread tisimst
suggestions? > > > > - Abraham > > > > > Uhh, markup-mode > > #(define-markup-command (ezscore layout props mus) (ly:music?) > (interpret-markup layout props > #{ > \markup { > \score { > \relative c'' { #mus } >

Re: Using \score in define-markup-command

2016-02-29 Thread Thomas Morley
2016-02-29 20:57 GMT+01:00 Abraham Lee : > All, > > I'm trying to utilize the \score markup command within a custom > define-markup-command that accepts a music expression, but I can't figure > out how. I'm probably missing something obvious,

Using \score in define-markup-command

2016-02-29 Thread Abraham Lee
All, I'm trying to utilize the \score markup command within a custom define-markup-command that accepts a music expression, but I can't figure out how. I'm probably missing something obvious, but here's a minimal example: \version "2.19.36" \m

Re: Move markup relative to parent from inside define-markup-command?

2012-03-22 Thread Nick Payne
On 23/03/12 14:23, David Nalesnik wrote: Hi Nick, On Thu, Mar 22, 2012 at 9:29 PM, Nick Payne mailto:nick.pa...@internode.on.net>> wrote: I'm using define-markup-command to simplify the indication of barring for a single chord, but what I have at the moment defaults

Re: Move markup relative to parent from inside define-markup-command?

2012-03-22 Thread David Nalesnik
Hi Nick, On Thu, Mar 22, 2012 at 9:29 PM, Nick Payne wrote: > I'm using define-markup-command to simplify the indication of barring for > a single chord, but what I have at the moment defaults to being centred on > the note, and the vertical line indicating how many strin

Move markup relative to parent from inside define-markup-command?

2012-03-22 Thread Nick Payne
I'm using define-markup-command to simplify the indication of barring for a single chord, but what I have at the moment defaults to being centred on the note, and the vertical line indicating how many strings to cover is overlaid by the notehead unless the markup position is tweaked.

Re: \score inside define-markup-command

2009-02-25 Thread Michael Käppler
Hi Nicolas, many thanks for that hint! Using make-score was the point. But also very nice you showed me how to deal with layout settings in such a "scheme score". Michael ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mail

Re: \score inside define-markup-command

2009-02-24 Thread Nicolas Sceaux
good idea! But it still doesn't work. Let's look at the following minimal example: #(define-markup-command (testmusic layout props a b c) (number? number? number?) (interpret-markup layout props (markup #:score (make-music 'SequentialMusic 'elements (list (make-music

Re: \score inside define-markup-command

2009-02-23 Thread Michael Käppler
k at the following minimal example: #(define-markup-command (testmusic layout props a b c) (number? number? number?) (interpret-markup layout props (markup #:score (make-music 'SequentialMusic 'elements (list (make-music 'EventChord 'elements

Re: \score inside define-markup-command

2009-02-23 Thread Tao Cumplido
3 +0100 > Von: "Michael Käppler" > An: lilypond-user@gnu.org > Betreff: \\score inside define-markup-command > Hi all, > is it possible to use the \score markup function in a new defined markup > function construct? > > For example, > > #(define-markup

Re: \score inside define-markup-command

2009-02-23 Thread Gilles THIBAULT
#(define-markup-command (test layout props testclef) (string?) (interpret-markup layout props (markup #:score ( << \clef #testclef a4 h c >> This is invalid code because it mixes LilyPond and Scheme syntax. How can I achieve something similar to what's expressed i

\score inside define-markup-command

2009-02-22 Thread Michael Käppler
Hi all, is it possible to use the \score markup function in a new defined markup function construct? For example, #(define-markup-command (test layout props testclef) (string?) (interpret-markup layout props (markup #:score ( << \clef #testclef a4 h c >> This is invalid

Re: numbers as arguments in define-markup-command

2006-12-29 Thread Han-Wen Nienhuys
Orm Finnendahl escreveu: > Hi, > > I try to define a markup for vertical arrows and can't get the > function to take two numbers as arguments. Using strings as arguments > or a number and a string works. It seems the last argument to > define-markup-command has to be a st

numbers as arguments in define-markup-command

2006-12-29 Thread Orm Finnendahl
Hi, I try to define a markup for vertical arrows and can't get the function to take two numbers as arguments. Using strings as arguments or a number and a string works. It seems the last argument to define-markup-command has to be a string. Does anybody know why and how to make it work