Re: Modified slur stencil with added markup

2018-11-08 Thread Pablo Cordal
Hi again! Can I propose a small modification in the "annotated slur" funcion? annotatedSlur = #(define-music-function (parser location padding text) (number? markup?) #{ \once \override Slur.after-line-breaking = #(lambda (grob) (let* ((stencil (ly:slur::print grob))

Re: Modified slur stencil with added markup

2018-11-08 Thread Pablo Cordal
Hi again! Can I propose a small modification in this funcion? annotatedSlur = #(define-music-function (parser location padding text) (number? markup?) #{ \once \override Slur.after-line-breaking = #(lambda (grob) (let* ((stencil (ly:slur::print grob)) (dir (

Re: Modified slur stencil with added markup

2018-11-04 Thread Pablo Cordal
Thank you very very very much Harm. Now it works perfectly, it is just what I needed!. Best regards El dom., 4 nov. 2018 a las 17:20, Thomas Morley () escribió: > Am So., 4. Nov. 2018 um 16:38 Uhr schrieb pablocordal < > pablocor...@gmail.com>: > > > > Hi Urs and Torsten, > > > > This snippet is

Re: Modified slur stencil with added markup

2018-11-04 Thread Thomas Morley
Am So., 4. Nov. 2018 um 16:38 Uhr schrieb pablocordal : > > Hi Urs and Torsten, > > This snippet is exactly what I need. I'm trying to test it, but when I copy > your code in Frescobaldi (which uses Lilypond underneath) and try to compile > it I receive this error: > > error: syntax error, unexpec

Re: Modified slur stencil with added markup

2018-11-04 Thread pablocordal
Hi Urs and Torsten, This snippet is exactly what I need. I'm trying to test it, but when I copy your code in Frescobaldi (which uses Lilypond underneath) and try to compile it I receive this error: error: syntax error, unexpected LYRIC_ELEMENT \markup "hin." I don't know

Re: Modified slur stencil with added markup

2018-10-12 Thread Torsten Hämmerle
Urs Liska-3 wrote > What is 'interval-center'? Hi Urs, Harm already revealed where interval-center is being defined. But why did I use it? A stencil x-extent is a pair of left and right extent, and in order to know the total extent, we'll have to add up (car x-extent) and (cdr x-extent) and div

Re: Modified slur stencil with added markup

2018-10-12 Thread Thomas Morley
Am Fr., 12. Okt. 2018 um 09:59 Uhr schrieb Urs Liska : > What is 'interval-center'? Grepping the source doesn't show a > definition, so I'd assume it's in the C++ domain? I haven't found > anything about that in the documentation (or through Google). Hi Urs, ~/lilypond-git (master)$ git grep "in

Re: Modified slur stencil with added markup

2018-10-12 Thread Urs Liska
Hi Torsten, Am 12.10.2018 um 00:56 schrieb Torsten Hämmerle: Hi Urs, The centering of the slur stencil destroys its alignment (i.e. reference point), so I'd just leave it alone and center-align the text by explicitly calculating the necessary markup x shift from the stencil extents.

Re: Modified slur stencil with added markup

2018-10-11 Thread Torsten Hämmerle
Hi Urs, The centering of the slur stencil destroys its alignment (i.e. reference point), so I'd just leave it alone and center-align the text by explicitly calculating the necessary markup x shift from the stencil extents. %% \version "2.19.82" annotatedSlur = #(define-music-fun

Modified slur stencil with added markup

2018-10-11 Thread Urs Liska
Hi, I modified the snippet http://lilypond.org/doc/v2.19/Documentation/snippets/text#text-center-text-below-hairpin-dynamics to create a slur with added centered text. It took me little effort to adapt the snippet to work with a slur instead of a hairpin but I have two problems I didn't manag