[Top][All Lists]

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

Re: Documentation error for "on-the-fly"

From: Jean Abou Samra
Subject: Re: Documentation error for "on-the-fly"
Date: Sun, 5 Sep 2021 10:45:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

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 for reminding.

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


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


I'll probably propose a patch.


reply via email to

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