[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Flaw in note-by-number, how to catch paper in \book ?
From: |
Thomas Morley |
Subject: |
Flaw in note-by-number, how to catch paper in \book ? |
Date: |
Sun, 27 Jan 2019 13:29:02 +0100 |
Hi,
here
https://sourceforge.net/p/testlilyissues/issues/5231/#9036
a flaw is reported with note-by-number-markup.
It's triggered, if layout-set-staff-size is set in \paper inside of an
explicit \book
Analysis:
Currently the stem-length is calculated looking at 'text-font-size
from current layout _and_ $defaultpaper, doing some calculations with
the found values (or the fallbacks).
But a \paper in \book is not searched.
I don't know how.
To illustrate, some nutshell-code:
\version "2.21.0"
#(define-markup-command (test layout props arg)(markup?)
(pretty-print
(list
(ly:output-def-lookup $defaultpaper 'foo)
;; no difference for (not surprising ...):
(ly:output-def-lookup (ly:parser-lookup '$defaultpaper) 'foo)
(ly:output-def-lookup layout 'foo)))
(interpret-markup layout props arg))
\paper { foo = "foo-default-paper" }
\book {
\paper { foo = "foo-book-paper" }
\score {
{ \tempo \markup \test "xy" R1 }
\layout { foo = "foo-score-layout" }
}
}
->
("foo-default-paper"
"foo-default-paper"
"foo-score-layout")
The "foo-book-paper"-value is not catched.
Any hints how to do so?
Or is the whole approach (looking at 'text-font-size) insufficient?
Thanks,
Harm
- Flaw in note-by-number, how to catch paper in \book ?,
Thomas Morley <=