Hello anyone on the bug list, could someone just verify what was reported by Paul (below) sounds correct and if this is a bug or just a doc edit (or both).

Thanks,

James


Thanks for reminding.


Le 25/08/2021 à 15:36, Paul Hodges a écrit :
On the page:

http://lilypond.org/doc/v2.23/Documentation/notation/custom-titles-headers-and-footers

the syntax for using \on-the-fly is specified as:

    variable = \markup {
      …
      \on-the-fly  \procedure  markup
      …
    }

and the following examples use the same.  Note the use of \ to introduce
the procedure.

However, this does not work for all procedures - specifically not in the
case of \(on-page n).  But using # instead of \ works in all cases, and
is also more logical as introducing the parameter for \on-the-fly.

Yeah, the documentation is weird here. Basically,
\ looks up a LilyPond variable. Since LilyPond and
its Scheme interpreter are very closely tied, Scheme
variables are available to LilyPond and vice-versa
(in fact they are stored exactly the same; just that
a variable called abc123xyz$^ will be accessible to
Scheme but not to LilyPond due to syntax restrictions).
In contrast, # starts a chunk of Scheme code, so it
is another way to access the variable. But

  (procedure argument1 argument2 ...)

is Scheme syntax. So it only works with #.


It would seem logical to change the documentation to specify and use #
instead of \ for these procedures.

Well, the implementation is also very weird here.
Perhaps an artifact of earlier design. I am pretty
sure there is no need for \on-the-fly whatsoever;
one could just implement it with the syntax

\if \first-page blablabla
\if \not \first-page blablabla
\if \on-page #5 blablabla
\if \not \single-page blablabla

etc.

I'll probably propose a patch.

Best,
Jean

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to