lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to create a custom markup command


From: Tao Cumplido
Subject: Re: Trying to create a custom markup command
Date: Thu, 12 Jul 2007 18:01:37 +0200

I never tried to write my own markup commands, so I can't say for certain, but 
I guess you can only use them within a \markup block, i.e. \markup { \segue 
"string" } }.

regards,

Tao


-------- Original-Nachricht --------
Datum: Fri, 13 Jul 2007 00:33:54 +1000
Von: "Romel Anthony S. Bismonte" <address@hidden>
An: "LilyPond User Mailing List" <address@hidden>
Betreff: Trying to create a custom markup command

> I liked the idea of a segue so much, that I decided that I should write a
> custom markup command for it:
> 
> #(define-markup-command (segue layout props tosong)
>     (string?)
>     (interpret-markup layout props
>         (markup #:small #:column "segue to" #:italic tosong)
>     )
> )
> 
> The usage (as I extrapolated from the "character" and "smallCaps" examples
> in the documentation) would be something like
> 
> c1_\segue #"Something Else"
> 
> Needless to say, it didn't work. ^_^
> 
> Some information that may help in trying to fix my error:
> 
> 1. I have a main file which \include's the individual score files:
> 
> % main.ly
> #(define-markup-command (segue layout props tosong)
>     (string?)
>     (interpret-markup layout props
>         (markup #:small #:column "segue to" #:italic tosong)
>     )
> )
> \include "music.ly"
> -----
> 
> % music.ly
> \score {
>     c1_\segue #"Something Else"
> }
> -----
> 
> 2. Here's the result of trying to run my example:
> /main.log/
> music.ly:2:7: error: unknown escaped string: `\segue'
>     c1_
>        \segue #"Something Else"
> 
> music.ly:2:14: error: syntax error, unexpected SCM_TOKEN
>     c1_\segue 
>               #"Something Else"
> 
> There's no output. (I was expecting some...)
> 
> 3. I've written two other markup commands. Neither of them work, for
> reasons I was hoping I can discover from insight from all of you guys. What I
> noticed is that they get through the lilypond program fine--that is, until I
> try to use it. I'm guessing that Lilypond won't check it's correct (or
> whatever the problem is with the command) until it's being used.
> 
> By the way, I am interested in contributing to the documentation. It's
> worthy to read, and has so far eaten up most of my day today. ^_^ If it
> improves, we'll know when people spend less time reading it and more time 
> making
> music. I'd like to take part in that one.
> 
> Thanks for all the help so far... regards to all.
> Romel

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]