[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pdf changes every few compilations, although changing nothing
From: |
Thomas Morley |
Subject: |
pdf changes every few compilations, although changing nothing |
Date: |
Mon, 10 Apr 2017 12:36:59 +0200 |
Hi all,
with the code below I experienced some pretty strange behaviour.
The visual output changes every few compilations, although I changed _nothing_!!
In average two times in 10 compilations.
Furthermore:
While uncommenting the second example things change again:
First example prints correct, second always wrong.
Then commenting first example causes always correct output for the second.
I use self-compiled 2.19.60 from
commit 777ce245ecf9041a98d977f017c10b4edabaec04
Author: Phil Holmes <address@hidden>
Date: Mon Apr 10 08:28:15 2017 +0100
Release: bump VERSION.
I'm aware there were some recent changes to the bracket code and the
dependencies of TupletBracket/TupletNumber.
Admittedly my own code is a brute-force override. Something wrong
there or with the recent changes?
Also, my code is not a minimal example, sorry for that, I keep trying
to reduce it.
\version "2.19.60"
\paper { ragged-right = ##t }
tst = {
\override TupletBracket.stencil =
#(lambda (grob)
(let* ((orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig) '()))
(staff-space (ly:staff-symbol-staff-space grob))
(x-pos (ly:grob-property grob 'X-positions))
(x-length (interval-length x-pos))
)
(if (or (and (pair? siblings)
(equal? grob (car siblings)))
(null? siblings))
(let* ((tuplet-number (ly:grob-object grob 'tuplet-number))
(text-stil
(grob-interpret-markup grob
#{ \markup \vcenter "Col Whatever" #}))
(text-stil-y-ext (ly:stencil-extent text-stil Y))
(text-stil-x-ext (ly:stencil-extent text-stil X))
(text-stil-x-length (interval-length text-stil-x-ext))
;; value for y-extents of the new text-stencil.
;; ensure correlation to staff-space, some additional
;; padding is done later
(half-text-y
(ceiling (/ (cdr text-stil-y-ext) staff-space)))
(new-text-stil
(stencil-whiteout-box
(ly:make-stencil
(ly:stencil-expr text-stil)
(ly:stencil-extent text-stil X)
(symmetric-interval half-text-y))
;; my choice:
(/ staff-space 4))))
(if (< (+ (car x-pos) text-stil-x-length) (cdr x-pos))
(ly:grob-set-property! grob 'X-positions
(cons (+ (car x-pos) text-stil-x-length)
(cdr x-pos))))
(ly:grob-set-property! tuplet-number 'X-extent empty-interval)
(ly:grob-set-property! tuplet-number 'stencil new-text-stil)
(ly:grob-set-property! tuplet-number 'Y-offset 0)
(ly:grob-set-property! tuplet-number 'X-offset 0));
(ly:grob-suicide! (ly:grob-object grob 'tuplet-number)))
;; adjusting the values by 'staff-space' is my choice for nicer
;; paddings in X-direction.
(ly:stencil-translate-axis
(grob-interpret-markup grob
#{
\markup
\draw-squiggle-line
#3 %% squiggle-length
#(cons (- x-length (* 1.5 staff-space)) 0) %% dest
##t %% eq-end?
#})
(+ (/ staff-space 2) (car x-pos))
X)))
}
%%{
{
\tst
\set tupletFullLength = ##t
\key cis \major
\tuplet 1/1 {
\hideNotes
c1 c1 c1 c1
\repeat unfold 30 c'1
s1*20
r2
\unHideNotes
}
c'2 c'1
}
%}
%{
{
\tst
\set tupletFullLength = ##t
\tuplet 1/1 { c'1 c'1 c' c' c' }
}
%}
Thanks,
Harm
- pdf changes every few compilations, although changing nothing,
Thomas Morley <=
- Re: pdf changes every few compilations, although changing nothing, Thomas Morley, 2017/04/10
- Re: pdf changes every few compilations, although changing nothing, Thomas Morley, 2017/04/10
- Re: pdf changes every few compilations, although changing nothing, David Nalesnik, 2017/04/10
- Re: pdf changes every few compilations, although changing nothing, Thomas Morley, 2017/04/10
- Re: pdf changes every few compilations, although changing nothing, David Nalesnik, 2017/04/10
- Re: pdf changes every few compilations, although changing nothing, David Nalesnik, 2017/04/10
- Re: pdf changes every few compilations, although changing nothing, Dan Eble, 2017/04/11