Hi Malte and Thomas,

This is all really great and appreciated.

But where are these functions located, or, dare I ask, documented?

Andrew


On 2 April 2018 at 04:54, Thomas Morley <thomasmorle...@gmail.com> wrote:

> 2018-04-01 18:11 GMT+02:00 Malte Meyn <lilyp...@maltemeyn.de>:
> >
> >
> > Am 01.04.2018 um 17:00 schrieb Andrew Bernard:
> >>
> >> I cannot recall where I obtained this code from. But I want to have the
> >> line thicker. I don't know how to modify this. Grepping the lilypond
> >> installation I am unable to find the function make-draw-line-markup.
> Where
> >> does that come from? Can I use another function that takes a thickness
> as an
> >> additional parameter?
> >
> >
> > The function make-draw-line-markup is the markup command draw-line
>
> If I understand correctly, that's not entirely correct.
>
> In general, a markup-command is done by the macro `define-markup-command'.
> We get two procedures from it, in this case: `draw-line-markup' and
> `make-draw-line-markup'.
>
> See:
> #(format #t "\ndraw-line-markup:\n~y"
>             draw-line-markup)
> #(format #t "\nmake-draw-line-markup:\n~y"
>             make-draw-line-markup)
>
> As you can see from the displayed results `draw-line-markup' needs
> three arguments. Two of them are the default `layout' and `props'
> `make-draw-line-markup' only one. The default ones are already done.
>
> That's the reason why we can do
> $(make-draw-line-markup '(0 . 1)) without anything else.
>
> Using `draw-line-markup' would need to have those defaults arguments
> supplied.
> In ly-syntax this automatically happens while doing
> \markup \draw-line ...
> But it's possible to use 'draw-line-markup' directly:
> {
>   \override Beam.stencil =
>   #(draw-line-markup
>     $defaultpaper
>     (list (ly:output-def-lookup $defaultpaper 'text-font-defaults))
>     '(1 . 1))
>
>     c'8[]
> }
> A little strange and inconvenient, but possible...
>
> So I think it's important to know that while using
> `make-draw-line-markup' we use a procedure.
> Whereas $(markup #:draw-line '(0 . 1)) will be transformed.
> Makes a difference for some involved scheme-coding...
>
> That said, for the most use-cases below is fine and doable:
>
> > that can
> > be used as
> >         #(make-draw-line-markup '(0 . 1))
> > or
> >         \markup \draw-line #'(0 . 1)
> > or
> >         #(markup #:draw-line '(0 . 1)
> > Same for all other markup commands.
> >
> > So you can just replace the line
> >         (make-draw-line-markup '(0 . 1)))
> > in your original code by
> >         (make-override-markup '(thickness . 3)
> >           (make-draw-line-markup '(0 . 1)))))
> > or by
> >         (markup #:override '(thickness . 3)
> >           #:draw-line '(0 . 1))))
> > or by
> >         #{ \markup \override #'(thickness . 3)
> >              \draw-line #'(0 . 1) #}))
>
> Cheers,
>   Harm
>
> P.S. I hope I made myself clear, not that easy for me to explain
> complex stuff as a non-native speaker.
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to