lilypond-user
[Top][All Lists]
Advanced

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

Re: Change text font size globally


From: Saul Tobin
Subject: Re: Change text font size globally
Date: Sun, 1 Sep 2024 18:58:11 -0400

I suppose it would make sense to have an additional main section in the Docs
explaining how LilyPond (the software) works, as opposed to LilyPond (the
description language).

This could feature things like $, #, #@ and whatever, how the parser works,
how translation and engravers work and such stuff.

A lot of those things are pretty well documented here: https://extending-lilypond.gitlab.io/en/index.html and here https://lilypond.org/doc/v2.25/Documentation/extending/. I think it's been discussed in the past whether those docs could be merged, but I don't recall the reason they had been kept separate. Having them separate definitely makes it harder to find answers to specific questions, as each covers things omitted by the other.

There are aspects of Lilypond that are not that deeply documented yet, of which the parser is one. Others are IMO iteration, pure positioning/line breaking, and event dispatch. Mostly the topics that lack documentation are also areas where the functionality is not that well exposed via Scheme to customization by end users.

Personally I think a valuable direction to extend documentation would be to cover more of the public Scheme functions with meaningful docstrings so that they show up in the Internals reference (which would include the toplevel handlers). I've frequently found that I wasted time writing code to do something in Scheme when I could have just used a built-in function if only I had known it existed.

Saul

On Sun, Sep 1, 2024 at 6:19 PM Valentin Petzel <valentin@petzel.at> wrote:
> > \paper {
> >
> >   text-font-defaults = #(acons 'font-size 6 text-font-defaults)
> >
> > }
> >
> > This one has the effect of effectively prefixing any markup with
> > \fontsize #6 (or whatever).  It will affect a lot of stuff though.
>
>
> It would be nice to have this at least as a snippet...

Don’t know ... it won‘t really matter anymore with 2.26, and it does probably
not in the most cases to what you’d want it to do (as it will affect a lot of
stuff you probably do not want it to affect).

> > #(define toplevel-text-handler
> >    (lambda (mups)
> >      (collect-scores-for-book
> >       (map (lambda (mup) (markup #:abs-fontsize 20 mup)) mups))))
> >
> > This will use the same action for all toplevel markups, but will add a
> > \abs-fontsize ... in front of the markup(list).
>
> This is great!  Again, it would be great to have this documented
> somewhere – or having it available as a snippet.

To some extent we have this in

https://lilypond.org/doc/v2.24/Documentation/notation/file-structure.html

although that one only mentions `toplevel-score-handler`, `toplevel-book-
handler` and `toplevel-music-handler`. It does not really talk about the other
function hooks there are. And it neither goes into detail, nor does it really
make sense to explain this here.

I suppose it would make sense to have an additional main section in the Docs
explaining how LilyPond (the software) works, as opposed to LilyPond (the
description language).

This could feature things like $, #, #@ and whatever, how the parser works,
how translation and engravers work and such stuff.

Cheers,
Valentin

reply via email to

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