Hi David,
thanks, that works great.
It did *not* write to a file, but that's not the issue here.
The main point is that it listens to implicit break events.
Probably the page breaks are even irrelevant for my case: finding a way
to recompile individual systems.
what it doesn't do yet is handle mid-measure breaks, but I know where I
can look that up ;-)
So this isn't a feature request anymore ...
Best
Urs
Am 23.01.2015 um 17:42 schrieb David Nalesnik:
Hi Urs,
On Fri, Jan 23, 2015 at 9:33 AM, Urs Liska <u...@openlilylib.org
<mailto:u...@openlilylib.org>> wrote:
Picking up that old thread seems better than starting a new one ...
By now I've reached a different state and would like to come back
to this issue with a very concrete question:
Is it possible to determine at which positions (in terms of
barnumber and measure-position) the final line breaks, page breaks
and page turns have been placed in LilyPond?
I'm sure this information has to be present at one point, but
someone (I think it may have been David Nalesnik) expressed the
opinion that engravers could only access explicit \break-s.
I would like to write out a log file containing all break points
of a given LilyPond run.
Here's a routine which will write the line breaks to a file. Have to
look into page breaks/turns. (It may be that you need explicit page
breaks/turns--then it's possible to read 'page-break-permission and
'page-turn-permission.)
\version "2.19.15"
%% breaks
#(define out (open-output-file "line-breaks.txt"))
#(define (display-breaks grob)
(if (and (grob::has-interface grob 'paper-column-interface)
(eq? #t (ly:grob-property grob 'non-musical)))
(if (eq? 1 (ly:item-break-dir grob))
(let* ((location (ly:grob-property grob 'rhythmic-location))
(m (car location)))
(format out "Line beginning at measure ~a~%" m)))
(ly:message "Need NonMusicalPaperColumn grob to determine line
breaks.")))
\relative c'' {
\override Score.NonMusicalPaperColumn.after-line-breaking =
#display-breaks
\repeat unfold 30 { c d e f }
}
Hope this helps--
David
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond