[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number |
Date: |
Sun, 12 Jul 2015 14:23:30 +0000 |
Comment #6 on issue 4494 by address@hidden: Table Of Contents crash
with negative first-page-number
https://code.google.com/p/lilypond/issues/detail?id=4494
Ok, I can make it work with a changed /with-link
\version "2.19.22"
#(define (book-first-page layout props)
(define (ancestor layout)
"Return the topmost layout ancestor"
(let ((parent (ly:output-def-parent layout)))
(if (not (ly:output-def? parent))
layout
(ancestor parent))))
(ly:output-def-lookup (ancestor layout) 'first-page-number))
#(define-markup-command (with-link layout props label arg)
(symbol? markup?)
(let* ((arg-stencil (interpret-markup layout props arg))
(x-ext (ly:stencil-extent arg-stencil X))
(y-ext (ly:stencil-extent arg-stencil Y)))
(ly:make-stencil
`(delay-stencil-evaluation
,(delay (ly:stencil-expr
(let* ((table (ly:output-def-lookup
layout 'label-page-table))
(first-page-number (book-first-page layout props))
(orig-page-number (if (list? table)
(assoc-get label table)
#f))
(p-nr (ly:output-def-lookup
layout 'first-page-number))
(page-number (+ orig-page-number (+ 1 (* -1
first-page-number) )))
(link-expr (list 'page-link page-number
`(quote ,x-ext) `(quote ,y-ext))))
;(newline)(display "first-page-number__")(display first-page-number)
;(newline)(display "p-nr_______________")(display p-nr)
(ly:stencil-add (ly:make-stencil link-expr x-ext y-ext)
arg-stencil)))))
x-ext
y-ext)))
\paper { first-page-number = #-1 }
\markuplist \table-of-contents
\pageBreak
\tocItem "Adagio"
{ c''1 }
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/11
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/12
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/12
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/12
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/12
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/12
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number,
lilypond <=
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/12
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/12
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/13
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/13
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/13
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/13
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/14
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/14
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/15
- Re: [Lilypond-auto] Issue 4494 in lilypond: Table Of Contents crash with negative first-page-number, lilypond, 2015/07/15