[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alignement opus et piece
From: |
Gilles |
Subject: |
Re: alignement opus et piece |
Date: |
Sun, 23 Sep 2012 23:37:57 +0200 |
User-agent: |
Opera Mail/12.02 (Win64) |
mais je préférerais une solution qui prend compte des deux variables
/opus/
et /piece/
malheureusement je ne comprends pas assez scheme pour pouvoir adapter le
code de David (/consider-page-num/) - y a-t-il quelqu'un qui sait comment
faire?
Pour ne justement pas toucher le code de David, j'ai laisser la fonction
être appeler par opus, mais
je ne sais pas si c'est le résultat que tu souhaitais.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.16.0"
\paper {
scoreTitleMarkup = \markup { \column {
\on-the-fly #print-all-headers { \bookTitleMarkup \hspace #1 }
\fill-line {
\fromproperty #'header:opus
\tiny \fromproperty #'header:piece
}
}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define-markup-command (my-hymn layout props label arg1 arg2)
(symbol? markup? markup?)
(let* ((stencil (interpret-markup layout props arg1))
(x-ext (ly:stencil-extent stencil X))
(y-ext (ly:stencil-extent stencil Y))
(arg1-stencil (ly:make-stencil ;; David Code
`(delay-stencil-evaluation
,(delay (ly:stencil-expr
(let* ((table (ly:output-def-lookup layout 'label-page-table))
(page-number (if (list? table)
(assoc-get label table)
#f)))
(interpret-markup layout props
(if (even? page-number)
(markup arg1)
(markup #:fill-line ("" arg1))))))))
x-ext
y-ext))
(arg2-stencil (interpret-markup layout props
(markup #:fill-line (arg2)))))
(ly:stencil-add arg1-stencil arg2-stencil)))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\book {
\score {
\new Staff { \label #'a \repeat unfold 100 c'1 }
\header {
opus = \markup \my-hymn #'a "hymn-1" "Te Deum"
}
}
\score {
\new Staff { \label #'b \repeat unfold 100 c'1 }
\header {
opus = \markup \my-hymn #'b "hymn-2" "Aria"
}
}
\score {
\new Staff { \label #'c \repeat unfold 100 c'1 }
\header {
opus = \markup \my-hymn #'c "hymn-3" "Messe"
}
}
\score {
\new Staff { \label #'d c'1 }
\header {
opus = \markup \my-hymn #'d "hymn-4" "Solo"
}
}
\score {
\new Staff { \label #'e \repeat unfold 100 c'1 }
\header {
opus = \markup \my-hymn #'e "hymn-5" "Magnificat"
}
}
\score {
\new Staff { \label #'f c'1 }
\header {
opus = \markup \my-hymn #'f "hymn-6" "Agnus"
}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--
Gilles
- alignement opus et piece, Frère Raphaël, 2012/09/21
- Re: alignement opus et piece, Frère Raphaël, 2012/09/24
- Re: alignement opus et piece, Gilles, 2012/09/24
- Re: alignement opus et piece, Frère Raphaël, 2012/09/24
- Message not available
- Re: alignement opus et piece, Frère Raphaël, 2012/09/25