Re: markup function accepting either markup or markup list as argument

2024-06-22 Thread Werner LEMBERG
>> I want to write a user-friendly markup command that can accept either >> a markup or a markup list as arguments. Example: >> >> ``` >> % \ornament >> \markup \ornament \number ♭ >> \musicglyph "scripts.turn" >> \number ♮ >> \markup \ornament { \number ♭ \

Re: markup function accepting either markup or markup list as argument

2024-06-22 Thread David Kastrup
Werner LEMBERG writes: >> The real question is what you actually are trying to achieve here. > > I want to write a user-friendly markup command that can accept either > a markup or a markup list as arguments. Example: > > ``` > % \ornament > \markup \ornament \number ♭ > \mu

Re: markup function accepting either markup or markup list as argument

2024-06-22 Thread Werner LEMBERG
> The documentation clearly states: > > > >Arguments are distinguished according to their type: >• a markup, corresponding to type predicate ‘markup?’; >• a list of markups, corresponding to type

Re: markup function accepting either markup or markup list as argument

2024-06-21 Thread David Kastrup
Werner LEMBERG writes: > Folks, > > > I would like to write a markup function that can either accept a > markup or a markup list as an argument. You mean, a markup command. > The code below works fine, reporting > > ``` > bar: (#) > baz: 1 > bar: ((#) &

markup function accepting either markup or markup list as argument

2024-06-21 Thread Werner LEMBERG
Folks, I would like to write a markup function that can either accept a markup or a markup list as an argument. The code below works fine, reporting ``` bar: (#) baz: 1 bar: ((#) (#)) baz: 1 ``` as expected. (The `baz` argument is inserted in the demo code to avoid interference with

Re: wordwrap on argument of markup function

2024-06-03 Thread Simon Albrecht
Thanks for elaborating! I forgot to hit Reply All when I replied to Jean, excuse me. On 02.06.24 10:10, Ya Gloops wrote: #(define-markup-command (freely layout props width-param text) (number? markup-list?)    "Format text for one bar of 'width-param' quarter notes’ length"    (interpret-marku

Re: wordwrap on argument of markup function

2024-06-02 Thread Ya Gloops
#(define-markup-command (freely layout props width-param text) (number? markup-list?)   "Format text for one bar of 'width-param' quarter notes’ length"   (interpret-markup layout props                     #{\markup\box \line { \override #`(line-width . ,width-param) \wordwrap { #text }} #})) \

Re: wordwrap on argument of markup function

2024-06-01 Thread Jean Abou Samra
> (define-markup-command (freely layout props width-param text) (number? > markup?) ^^^ Make that `markup-list?`. Otherwise, your command is accepting only a single markup. In your example, \line inside the command is

wordwrap on argument of markup function

2024-06-01 Thread Simon Albrecht
Hello kind community folk, how do I make \wordwrap act correctly on the argument to this markup function? And why does \line not make \box act on the markup as a whole, as it is said to do? Best, Simon \version "2.25.14" #(define-markup-command (freely layout props width-

Re: accessing current file name in markup function

2023-12-08 Thread Werner LEMBERG
>> The name "sip" is a bit weird; looking in the commit that added the >> code 19 years ago, it looks like it was meant as "smob input" >> (where smob = Scheme object = LilyPond C++ object made available to >> Scheme). Quickly written documentation by an insider. It should be eventually replaced

Re: accessing current file name in markup function

2023-12-08 Thread Jeff Olson
On 12/7/2023 12:21 PM, Jean Abou Samra wrote: Documentation question from trying to understand *location* in David's solution: Guessing, is sip a stream input pointer? _Where would I look to find the definition/example of sip?_  *location* doesn't return a string but a special type o

Re: accessing current file name in markup function

2023-12-07 Thread Jean Abou Samra
> Documentation question from trying to understand *location* in David's > solution: > > I found that function in the IR documentation[1], but I could not find the > definition of a sip: > > > > Function: ly:input-file-line-char-column sip > > Return input location in sip as (file-name line cha

Re: accessing current file name in markup function

2023-12-07 Thread Jeff Olson
On 12/6/2023 3:48 PM, David Kastrup wrote: \version "2.24.2" locationOf = #(define-scheme-function () () (apply format #f "~a:~a:~a:~a" (ly:input-file-line-char-column (*location* \markup { \locationOf } Documentation question from trying to understand *location* in David's solutio

Re: accessing current file name in markup function

2023-12-07 Thread Werner LEMBERG
>> Thanks! However, Jean's statement >> >> > markups don't store location info, unfortunately. >> >> is still true, which means that you can't access the current input >> location within `define-markup-command`. > > Yes, sure, but you could inject this during parsing. [...] I'm doing very simila

Re: accessing current file name in markup function

2023-12-07 Thread Valentin Petzel
Am Donnerstag, 7. Dezember 2023, 06:47:56 CET schrieb Werner LEMBERG: > >> Maybe a bit less esoteric: > > Or even less esoteric: > Thanks! However, Jean's statement > > > markups don't store location info, unfortunately. > > is still true, which means that you can't access the current input > lo

Re: accessing current file name in markup function

2023-12-06 Thread Werner LEMBERG
>> Maybe a bit less esoteric: > > Or even less esoteric: Thanks! However, Jean's statement > markups don't store location info, unfortunately. is still true, which means that you can't access the current input location within `define-markup-command`. Werner

Re: accessing current file name in markup function

2023-12-06 Thread David Kastrup
Valentin Petzel writes: > Am Mittwoch, 6. Dezember 2023, 23:10:11 CET schrieb Jean Abou Samra: >> \version "2.24.2" >> >> #(define-markup-command (foo layout props loc-provider) (ly:music?) >>(display (ly:input-file-line-char-column (ly:music-property loc-provider >> 'origin))) empty-stencil

Re: accessing current file name in markup function

2023-12-06 Thread Valentin Petzel
> OK, thanks. But what about accessing the `input-file-name` variable? > Shouldn't this work within `delay-stencil-evaluation`? That should not work. A markup function is evaluated at a delayed point, at which `input- file-name` might have changed. Try this: B.ly: { \override NoteHead.st

Re: accessing current file name in markup function

2023-12-06 Thread Jean Abou Samra
> OK, thanks.  But what about accessing the `input-file-name` variable? > Shouldn't this work within `delay-stencil-evaluation`? delay-stencil-evaluation or not, during backend processing, input-file-name is set to the filename of the main file, not the filename of the file where the markup comma

Re: accessing current file name in markup function

2023-12-06 Thread Werner LEMBERG
>> How can I access the current LilyPond input file name from within a >> markup command?  Or do I have to use the (undocumented) >> `delay-stencil-evaluation` functionality? > > If you mean the name of the file from which the command is called > (vs. defined), you can't — markups don't store loc

Re: accessing current file name in markup function

2023-12-06 Thread Jean Abou Samra
> How can I access the current LilyPond input file name from within a > markup command?  Or do I have to use the (undocumented) > `delay-stencil-evaluation` functionality? If you mean the name of the file from which the command is called (vs. defined), you can't — markups don't store location inf

accessing current file name in markup function

2023-12-06 Thread Werner LEMBERG
How can I access the current LilyPond input file name from within a markup command? Or do I have to use the (undocumented) `delay-stencil-evaluation` functionality? Werner

Re: get space left in markup function

2019-05-04 Thread Robert Kubosz
Thanks for your response, Andrew. I really hoped that somehow I could create the snaking columns in my book just using lilypond. It was the very last thing I needed to create a nice book and to finish my typesetting work. I know LaTeX, I wrote some things in it. I will check out lyluatex. -- Sen

Re: get space left in markup function

2019-05-02 Thread Andrew Bernard
it to look like this: > > > > > blah blah blah > > foo > > bar > > TOC > > SECTION 1 > > piece apiece d > > piece bpiece e > > piece cpiece f > > (page break) > > piece gpiece i >

Re: get space left in markup function

2019-05-02 Thread Robert Kubosz
- blah blah blah foo bar     TOC   SECTION 1 piece a    piece d piece b    piece e piece c    piece f (page break) piece g    piece i piece h    piece j SECTION 2 (page break) And to generate multi page toc section like this I need to know the

Re: get space left in markup function

2019-05-01 Thread David Kastrup
Robert Kubosz writes: > Hello! > > I have a markup function and inside this function I need to know how much > free space is left on page. (The space left parameter displayed with > annotate-spacing = ##t). Can anyone tell me how to get this parameter in > markup function? A

get space left in markup function

2019-05-01 Thread Robert Kubosz
Hello! I have a markup function and inside this function I need to know how much free space is left on page. (The space left parameter displayed with annotate-spacing = ##t). Can anyone tell me how to get this parameter in markup function? -- Sent from: http://lilypond.1069038.n5.nabble.com

Re: Problems defining markup function to draw lines.

2018-12-22 Thread Mike Stickles
Thanks, Aaron!  Following your notes, I corrected the path to: \path #0.3 #`((moveto ,xoff ,yoff) (lineto ,(+ 2 xoff) ,(+ 4 yoff)) (moveto ,(+ 1 xoff) ,yoff) (lineto ,(+ 3 xoff) ,(+ 4 yoff))) and now it works like a charm.  And that Scheme intro book looks like exactly what I need to help hea

Re: Problems defining markup function to draw lines.

2018-12-22 Thread Reggie
the > Y-coordinates down, and sometimes there's a need to shift the slashes > closer to or further away from the note. So I'm trying to set up a > markup function to handle this, so I can just annotate the note as: > > a2^\markup \double-slash #5 #-2 > >

Re: Problems defining markup function to draw lines.

2018-12-22 Thread Trevor
Mike, you wrote 22/12/2018 04:15:03 Our choir has developed some "in-house" markings which I'm trying to replicate in LilyPond. One is the use of a double slash to visually indicate the last section of a piece when the musical pattern changes for that last part. I can replicate that by usin

Re: Problems defining markup function to draw lines.

2018-12-22 Thread Pierre Perol-Schneider
Le sam. 22 déc. 2018 à 09:59, Aaron Hill a écrit : > [...] > This one looks funny at first, but the difference is the use of the > grave as opposed to the apostrophe. This sets up a quasi-quoting mode > that behaves nearly identical to normal quoting, except we can use a > comma to "unquote". A

Re: Problems defining markup function to draw lines.

2018-12-22 Thread Aaron Hill
On 2018-12-21 8:15 pm, Mike Stickles wrote: But when I try to implement the numbers, I get errors no matter what I do. This (while it doesn't work) shows what I'm trying to get to: #(define-markup-command (double-box layout props xoff yoff) (number? number?)   (interpret-markup layout props   

Problems defining markup function to draw lines.

2018-12-21 Thread Mike Stickles
shes closer to or further away from the note. So I'm trying to set up a markup function to handle this, so I can just annotate the note as: a2^\markup \double-slash #5 #-2 But I can't seem to get the syntax correct. If I leave the arguments as dummy args, this works: #(define-markup-c

Re: custom multiple bar number markup function

2018-12-10 Thread Thomas Morley
Am Mo., 10. Dez. 2018 um 11:37 Uhr schrieb Thomas Morley : > > Am Mo., 10. Dez. 2018 um 06:18 Uhr schrieb Flaming Hakama by Elaine > : > > > I'm basically unsure about every step here: > > > > Is there such a thing as "the default measure number marku

Re: custom multiple bar number markup function

2018-12-10 Thread Thomas Morley
Am Mo., 10. Dez. 2018 um 06:18 Uhr schrieb Flaming Hakama by Elaine : > I'm basically unsure about every step here: > > Is there such a thing as "the default measure number markup function"? Yes, look into engraver-init.ly, there you'll find for "Score":

Re: custom multiple bar number markup function

2018-12-10 Thread Pierre Perol-Schneider
s > c1 | 1 | 1 | 1 | \break > > % I'd like this measure to show both bar numbers "5" and "9" > % Perhaps by invoking a function like this: > % \double-bar-numbers 4 > \repeat volta 2 { > \bar "[|:" >

custom multiple bar number markup function

2018-12-09 Thread Flaming Hakama by Elaine
e1 | 1 | 1 | 1 | } } My intention of the comment above, \double-bar-numbers 4 is to specify the following logic: "at this point, instead of using the default bar number markup function, use this double-bar-numbers markup function, which takes an argument for the number of repea

Re: need markup function for arrow at end of curve

2017-03-08 Thread Pierre Perol-Schneider
Done! However, the LSR' graphic function isn't working for the moment: http://lsr.di.unimi.it/LSR/Item?id=1050 Cheers, Pierre 2017-03-09 1:07 GMT+01:00 Kieren MacMillan : > Hi Pierre, > > This is magnificent! Thank you so much. > I think you should submit this as a snippet. > > Best, > Kieren.

Re: need markup function for arrow at end of curve

2017-03-08 Thread Kieren MacMillan
Hi Pierre, This is magnificent! Thank you so much. I think you should submit this as a snippet. Best, Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilyp

Re: need markup function for arrow at end of curve

2017-03-08 Thread Pierre Perol-Schneider
I forgot to tell you about an added option that could be interesting: the possibility of increasing the length by a strait line (last variable). If you don't like it, simply delete this variable and the related lines (rlineto ...). Cheers, Pierre ___ lily

Re: need markup function for arrow at end of curve

2017-03-08 Thread Pierre Perol-Schneider
Hi Kieren, Here's another try: #(define-markup-command (curvedArrow layout props arrow-length ;; any number >=0 height ;; any number >=0 strait-length ;; any number >=0 )(number? number? number?) "Draw a curved arrow with variable length and height." (interpret-markup

Re: need markup function for arrow at end of curve

2017-03-07 Thread David Kastrup
Pierre Perol-Schneider writes: > Hi Kieren, > As said, I worked on it yesterday but the result is not good enough. > Nevertheless, here's a cleaner version : > > \version "2.19" > > #(define-markup-command (curvedArrow layout props X-scale Y-scale) > (number? number?) > (interpret-markup layo

Re: need markup function for arrow at end of curve

2017-03-07 Thread Pierre Perol-Schneider
Hi Kieren, As said, I worked on it yesterday but the result is not good enough. Nevertheless, here's a cleaner version : \version "2.19" #(define-markup-command (curvedArrow layout props X-scale Y-scale) (number? number?) (interpret-markup layout props (markup (#:stencil (make-pat

Re: need markup function for arrow at end of curve

2017-03-06 Thread Pierre Perol-Schneider
Hi Kieren, 2017-03-06 15:52 GMT+01:00 Kieren MacMillan : > (p.s. How did you do that so quickly?) > Probably because I'm use to. ;) > Is there an easy way to reverse the direction, so that it’s curving and > pointing to the left? > That's easy : \version "2.19" #(define-markup-command (cu

Re: need markup function for arrow at end of curve

2017-03-06 Thread Kieren MacMillan
Hi Pierre, This is wonderful! Thanks. (p.s. How did you do that so quickly?) Is there an easy way to reverse the direction, so that it’s curving and pointing to the left? > Regarding the length and the height, would they affect the curve and the > arrow or the curve only? Ideally, I think the

Re: need markup function for arrow at end of curve

2017-03-05 Thread Pierre Perol-Schneider
Maybe a better shape here: \version "2.19" #(define-markup-command (curvedArrow layout props thk mlt) (number? number?) (interpret-markup layout props (markup (#:stencil (make-path-stencil '(M 3.01 -0.22 C 6.17 1.59 9.88 1.09 13.35 1.05 C 13.47 1.19 12.

Re: need markup function for arrow at end of curve

2017-03-05 Thread Pierre Perol-Schneider
Hi Kieren, Here's a first quick draft: \version "2.19" #(define-markup-command (curvedArrow layout props thk mlt) (number? number?) (interpret-markup layout props (markup (#:stencil (make-path-stencil '(M 3.01 -0.22 C 6.17 1.59 9.88 1.09 13.35 1.05 C 13

need markup function for arrow at end of curve

2017-03-05 Thread Kieren MacMillan
Hi all, Anyone with reasonable \path chops out there? I need a function that outputs a markup like this: In a perfect world, the length, height, Y-direction, X-direction, and line thickness would all be parameters… but even one sample would be enough for me to riff on. Thanks! Kieren. _

Re: Using 'scheme?' as predicate in a markup function.

2016-02-14 Thread Pierre Perol-Schneider
Yess! Thank you David. 2016-02-15 0:35 GMT+01:00 David Kastrup : > Pierre Perol-Schneider writes: > > > Hi, > > > > After some fights with 'draw-line thickness in a score containing numbers > > of arrows I've created this markup function: > >

Re: Using 'scheme?' as predicate in a markup function.

2016-02-14 Thread David Kastrup
Pierre Perol-Schneider writes: > Hi, > > After some fights with 'draw-line thickness in a score containing numbers > of arrows I've created this markup function: > http://lsr.di.unimi.it/LSR/Item?id=1026 > My intention was to stick to the 'arrow-head syntax

Using 'scheme?' as predicate in a markup function.

2016-02-14 Thread Pierre Perol-Schneider
Hi, After some fights with 'draw-line thickness in a score containing numbers of arrows I've created this markup function: http://lsr.di.unimi.it/LSR/Item?id=1026 My intention was to stick to the 'arrow-head syntax. So it goes: #(define-markup-command (foo layout props axis dir

Re: Getting an override into a markup function

2015-09-25 Thread Simon Albrecht
On 26.09.2015 01:05, Michael Gerdau wrote: While following this thread I've copied the various solutions into a growing file. Interstingly with all three proposed solution one after another the final resulting PDF is roted by 90 degree as well. Commenting out any of the 4 \markup (or note) lines

Re: Getting an override into a markup function

2015-09-25 Thread Thomas Morley
2015-09-26 1:00 GMT+02:00 Stephen MacNeil : > Hi Harm > > you can still d/l acroread up to 9.5.5 Last Modified: 10.05.2013 Not a real option... > > ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/ > > also Foxit Reader Goes upto 6400% Installed. Thanks for the hint. Harm > > Stephen

Re: Getting an override into a markup function

2015-09-25 Thread Thomas Morley
markup is rotated, see: >> >> \markup { >> "ab" >> \rotate #90 "--|--" >> "xy" >> } >> >> >> Hence I wrote 'my-rotate': >> >> >> #(define-markup-command (my-rota

Re: Getting an override into a markup function

2015-09-25 Thread Michael Gerdau
While following this thread I've copied the various solutions into a growing file. Interstingly with all three proposed solution one after another the final resulting PDF is roted by 90 degree as well. Commenting out any of the 4 \markup (or note) lines does not rotate the PDF, but with all it doe

Re: Getting an override into a markup function

2015-09-25 Thread Stephen MacNeil
Hi Harm you can still d/l acroread up to 9.5.5 ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/ also Foxit Reader Goes upto 6400% Stephen ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user

Re: Getting an override into a markup function

2015-09-25 Thread Simon Albrecht
#(define-markup-command (my-rotate layout props ang arg) (number? markup?) (let* ((stil (interpret-markup layout props arg)) (stil-x-length (interval-length (ly:stencil-extent stil X))) (stil-y-length (interval-length (ly:stencil-extent stil Y (ly:stencil-rotate

Re: Getting an override into a markup function

2015-09-25 Thread Thomas Morley
2015-09-25 12:28 GMT+02:00 Malte Meyn : > > > Am 25.09.2015 um 10:58 schrieb Urs Liska: >> >> { >>\override TextScript.self-alignment-X = #LEFT >>c'2 ^\markup \rotate #90 "This is a long markup" c >> } >> > > You could use an event function: > > % > \version "2.19.27" > > verticalText =

Re: Getting an override into a markup function

2015-09-25 Thread Urs Liska
Am 25.09.2015 um 12:28 schrieb Malte Meyn: > > Am 25.09.2015 um 10:58 schrieb Urs Liska: >> { >>\override TextScript.self-alignment-X = #LEFT >>c'2 ^\markup \rotate #90 "This is a long markup" c >> } >> > > You could use an event function: Thank you, this seems to be what I need. It wou

Re: Getting an override into a markup function

2015-09-25 Thread Malte Meyn
Am 25.09.2015 um 10:58 schrieb Urs Liska: { \override TextScript.self-alignment-X = #LEFT c'2 ^\markup \rotate #90 "This is a long markup" c } You could use an event function: % \version "2.19.27" verticalText = #(define-event-function (text) (markup?) #{ -\tweak TextScri

Getting an override into a markup function

2015-09-25 Thread Urs Liska
elf-alignment-X = #LEFT c'2 ^\markup \rotate #90 "This is a long markup" c } Now I want to pack this rotated text in a markup function and wrote this: #(define-markup-command (verticalText layout props text)(markup?) (interpret-markup layout props #{ \markup \rotate #9

Re: what's the State-of-the-Art two column top-level markup function?

2015-02-11 Thread MarcM
I haven't a response for you but in case you are looking for exact positioning I found this snippet: http://lsr.di.unimi.it/LSR/Item?id=628 -- View this message in context: http://lilypond.1069038.n5.nabble.com/what-s-the-State-of-the-Art-two-column-top-level-markup-function-tp171432p1

Re: what's the State-of-the-Art two column top-level markup function?

2015-02-04 Thread Kieren MacMillan
Hi Marc, > I usually use this format though: 1. How do you control/adjust inter-paragraph spacing? 2. How do you control/adjust indentation of each paragraph? Thanks, Kieren. ___ Kieren MacMillan, composer www: email: i...@kierenmacmillan.

Re: what's the State-of-the-Art two column top-level markup function?

2015-02-04 Thread MarcM
upiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. } } } -- View this message in context: http://lilypond.1069038.n5.nabble.com/what-s-the-State-of-the-Art-two-column-top-level-markup-function-tp171432p171439.html Sent from the User mail

Re: what's the State-of-the-Art two column top-level markup function?

2015-02-04 Thread MarcM
Have you seen this one: http://lsr.di.unimi.it/LSR/Snippet?id=464 ? It is a bit better although I don't like that each column starts on a new row. -- View this message in context: http://lilypond.1069038.n5.nabble.com/what-s-the-State-of-the-Art-two-column-top-level-markup-fun

what's the State-of-the-Art two column top-level markup function?

2015-02-04 Thread Kieren MacMillan
Hello all, I would like to use Lilypond (not -book or LaTeX- etc.) to add a top-level two-column markup to my score. Is there a really great function out there (e.g., with margin and gutter control, auto-wrapping, individual baseline- and paragraph-skip parameters, etc.), or should I [re-]inve

Re: multi-column markup function/macro?

2014-01-16 Thread Jan-Peter Voigt
So the tex-template doesn't suit (well) other environments then mine. Another thing I have to look at is: I use "system" to call the xelatex process. It might be better to use execp or exece. I'll investigate. It should be possible to use pandoc in the same manner. Pandoc can make use of template

Re: multi-column markup function/macro?

2014-01-16 Thread MarcM
Check out also the The LilyPond Snippet Repository ♪♫ http://lsr.dsi.unimi.it/LSR/Search?q=column <http://lsr.dsi.unimi.it/LSR/Search?q=column http://lsr.dsi.unimi.it/LSR/Search?q=column> -- View this message in context: http://lilypond.1069038.n5.nabble.com/multi-column-markup-fu

Re: multi-column markup function/macro?

2014-01-16 Thread Alex Loomis
With the split files there are still a ton of warnings, but it creates and displays the pdf. On Thu, Jan 16, 2014 at 2:55 AM, Jan-Peter Voigt wrote: > Hi Alex, > > OK ... first note, I use this on my machine with Ubuntu 12.04 having > texlive(2012)-full installed and it does compile - but fresc

Re: multi-column markup function/macro?

2014-01-15 Thread Jan-Peter Voigt
height, you can build markups per > page. > > If the [xe]latex doesn’t suit — or maybe even if it does — I’ll > try building a “native” function. > > > > Thanks, > > Kieren. > > > ___ > li

Re: multi-column markup function/macro?

2014-01-15 Thread Alex Loomis
I got no output and a page full of fontconfig warnings when I ran it. I left out all but the first since there were about 100 and they're all nearly identical. Starting lilypond 2.19.0 [xelatex-command-list.ly]... Processing `/tmp/xelatex-command-list.ly' Parsing... This is XeTeX, Version 3.14

Re: multi-column markup function/macro?

2014-01-15 Thread Jan-Peter Voigt
xe]latex doesn’t suit — or maybe even if it does — I’ll try building > a “native” function. > > Thanks, > Kieren. \version "2.18.0" #(use-modules (ice-9 popen) (ice-9 rdelim) (ice-9 regex) (scm framework-eps) ) % this predicate is not public? #(define (markup-functio

Re: multi-column markup function/macro?

2014-01-11 Thread Kieren MacMillan
Hi Jan-Peter, > I usually use [xe]latex, to produce the text needed for a preface or > foreword. That way I can use latex input with its own commands - in this > case: \twocolumn - and use hyphenation. > It is integrated in https://github.com/jpvoigt/lalily (latex.scm, > latex-init.scm). If you ar

Re: multi-column markup function/macro?

2014-01-06 Thread Jan-Peter Voigt
06.01.2014 22:21, schrieb Kieren MacMillan: > Hello all, > > Before I reinvent the wheel… does anyone have a good multi-column markup > function? > > Must Haves: > 1. Takes a markup-list and breaks it into n columns, with n=2 and n=3. > 2. Accepts line-width override. > > N

multi-column markup function/macro?

2014-01-06 Thread Kieren MacMillan
Hello all, Before I reinvent the wheel… does anyone have a good multi-column markup function? Must Haves: 1. Takes a markup-list and breaks it into n columns, with n=2 and n=3. 2. Accepts line-width override. Nice To Haves: 1. n>3 columns 2. Works nicely with Lily’s built-in page-break

Re: two-column dialogue markup function(s)

2013-12-27 Thread Kieren MacMillan
Hi David, > By using a non-predefined name for that kind of thing. H… I was trying that, and getting “undeclared variable” warnings. Anyway, it seems to work now. BEGIN SNIPPET \version "2.17.97" #(define-markup-command (mm-feed layout props amount) (number?) (let ((o-s (ly:output-de

Re: two-column dialogue markup function(s)

2013-12-27 Thread David Kastrup
Kieren MacMillan writes: > Hi David, > >> The wrong quotes, Sir! > > That was some weird email or editor translation… sorry. > >> Apart from that #:properties ((line-width 12)) will only use the 12 as a >> default if it is left unspecified, and it never is unspecified. You >> need to use a non-p

Re: two-column dialogue markup function(s)

2013-12-27 Thread Kieren MacMillan
Hi David, > The wrong quotes, Sir! That was some weird email or editor translation… sorry. > Apart from that #:properties ((line-width 12)) will only use the 12 as a > default if it is left unspecified, and it never is unspecified. You > need to use a non-predefined name for that kind of thing.

Re: two-column dialogue markup function(s)

2013-12-26 Thread David Kastrup
Kieren MacMillan writes: > I’m trying to create a two-column dialogue markup function for my > musical score(s), e.g., > > * > > I’ve got this so far, but even it’s not working correctly: > > % BEGIN SNIPPET > > \version "2.17.97" > > #(define-

Re: markup function

2013-01-06 Thread Thomas Morley
2013/1/5 David Kastrup : > Noeck writes: [...] >> The words "layout props" and the "interpret-markup" are still cryptic >> to me. Is there a documentation where this is described for noobs like >> me? > > No. I don't think there is reasonable documentation where this is > described for experts ei

Re: markup function

2013-01-05 Thread Noeck
> > #(define-markup-command (myfunction layout props link text) > (markup? markup?) (string? string?) > "Comment." > (interpret-markup layout props > #{\markup \with-url #(string-append #"http" #link) #text #})) > Now it became clearer to me. What I meant in the last line was: #{\markup

Re: markup function

2013-01-05 Thread David Kastrup
Noeck writes: >> It might make sense to look in the Guile manual for string operations. >> Other than that, check out the notation manual for a description of >> available markup commands (like \concat). > > I know concat, but it did not work here. For the \with-url command I > need to replace th

Re: markup function

2013-01-05 Thread Noeck
> It might make sense to look in the Guile manual for string operations. > Other than that, check out the notation manual for a description of > available markup commands (like \concat). I know concat, but it did not work here. For the \with-url command I need to replace the #"http" which is some

Re: markup function

2013-01-05 Thread David Kastrup
Noeck writes: >> Have you tried looking into the "Extending LilyPond" manual? >> >> http://lilypond.org/doc/v2.16/Documentation/extending/markup-functions> > > I did not reach it, because I did not understand the sections 2.1 and > 2.2 and then I gave up. Examples would help me a lot in these se

Re: markup function

2013-01-05 Thread Noeck
> How can I combine two strings? The #"http" and the #text in this example? > How can I change a string to lower case? I just want to add, that I know the functions (via google serach): (string-downcase "Abc Def") and (string-append "hello" " " "world") But I don't understand how to use them her

Re: markup function

2013-01-05 Thread Noeck
> Have you tried looking into the "Extending LilyPond" manual? > > http://lilypond.org/doc/v2.16/Documentation/extending/markup-functions> I did not reach it, because I did not understand the sections 2.1 and 2.2 and then I gave up. Examples would help me a lot in these sections. I played around

Re: markup function

2013-01-05 Thread David Kastrup
Noeck writes: > Hi, > > how can I write a function that returns a markup? > > In Python (using LilyPond syntax) I would write something like: > > def function(text): > url = "http://www.something"; + text.lower() > return \markup { \with-color #red \with-url #url text } Have you tried lo

markup function

2013-01-05 Thread Noeck
Hi, how can I write a function that returns a markup? In Python (using LilyPond syntax) I would write something like: def function(text): url = "http://www.something"; + text.lower() return \markup { \with-color #red \with-url #url text } Cheers, Joram _

Re: How to get a property override into a scheme markup function?

2010-09-22 Thread Jeff Epstein
Carl Sorensen byu.edu> writes: > [...] \displayMusic function missed a quote that you need in your argument list--note that it should be > #:override '(box-padding . 0.5) not > #:override (box-padding . 0.5) Excellent. Thank you! > Could you please file a simple bug report at bug-lilypond gnu

Re: How to get a property override into a scheme markup function?

2010-09-21 Thread Carl Sorensen
On 9/21/10 7:28 PM, "Jeff Epstein" wrote: > > I'm not sure what I'm missing here. Is there a translation between an ly > property and scheme? "box-padding" does exist in the Internal Reference > manual, > and I've not yet found anything in the other manuals, nor in this forum > (searching for

Re: How to get a property override into a scheme markup function?

2010-09-21 Thread Jeff Epstein
I should say that I only want the box-padding setting to be overridden for this one markup-call to \box. Perhaps I should be using \once or \tweak or something related...but I don't think it changes the basic question. ___ lilypond-user mailing list lil

How to get a property override into a scheme markup function?

2010-09-21 Thread Jeff Epstein
(FYI: I am a programmer, non-GUI Java, but am new to scheme.) In section 6.4.3 in the pdf Notation Reference manual (v 2.12.3), there's a markup function written in scheme. In that fashion, I've successfully created my first scheme function: #(define-markup-command (mBox la

Re: define-markup-function problem

2009-01-29 Thread Carl D. Sorensen
A stringB)) will expand to (make-column-markup (list (make-simple-markup stringA) (make-simple-markup stringB))) As will (make-column-markup (list stringA stringB)) Is that right? > > There are some cases where the `markup' macro cannot be used, for > instance

Re: define-markup-function problem

2009-01-29 Thread Nicolas Sceaux
nction-that-returns-markups)) as it would think that `function-that-returns-markups' is a markup, as stringA and stringB in: (markup #:column (stringA stringB)) Also, when you have only one markup command call, using the make-- markup function is quick enough. But in other cases, I d

Re: define-markup-function problem

2009-01-29 Thread Kieren MacMillan
Hi Carl, Option 3 is all standard scheme, and follows the documentation exactly. It's very easy for me to understand why and how it works, and easy for me to modify and apply in different situations. […] If I'm working in scheme, I should be working in scheme. Thanks! I'll use #3 — and you

Re: define-markup-function problem

2009-01-29 Thread Carl D. Sorensen
On 1/29/09 7:12 AM, "Kieren MacMillan" wrote: > Hi Carl, > > So we have the following, which all work: > > #(define-markup-command (test layout props stringA stringB) (string? > string?) > (interpret-markup layout props > (markup (#:column (stringA stringB) > > #(define-ma

Re: define-markup-function problem

2009-01-29 Thread Kieren MacMillan
Hi Carl, So we have the following, which all work: #(define-markup-command (test layout props stringA stringB) (string? string?) (interpret-markup layout props (markup (#:column (stringA stringB) #(define-markup-command (test layout props stringA stringB) (string? string?)

define-markup-function problem

2009-01-28 Thread Carl D. Sorensen
tion-that-returns-markups)) is invalid. One should use the make-line-markup, make-center-markup, or make-column-markup functions instead, (markup (make-line-markup (function-that-returns-markups))) So the code that works is: \version "2.12.2" #(define-markup-command (test

Re: define-markup-function problem

2009-01-28 Thread Jonathan Kulp
Graham Percival wrote: Hey, that's way more than I know about the subject. Remember my rule for doc-work: "you don't need to be perfect; you just need to be better than nothing". Is this in the Contributor's Guide? I don't remember this rule ;) >If you can't think of anything else, just se

Re: define-markup-function problem

2009-01-28 Thread Graham Percival
On Wed, Jan 28, 2009 at 10:42:35AM -0500, Kieren MacMillan wrote: > Hi Graham, > >> Sure it can! But unless you help, it won't. :) Just suggest >> the exact text to add or subtract, and it'll be done within days >> by Jonathan. > > To be honest, I don't feel that I understand *why* the change i

  1   2   >