lilypond-user-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Placement de texte à volonté


From: Pierre Perol-Schneider
Subject: Re: Placement de texte à volonté
Date: Mon, 5 Jun 2023 09:33:50 +0200

Attention : la commande est affectée par la valeur de la marge supérieure :
Cf.
\version "2.24.1"

#(define-markup-list-command
  (ref layout props def-x def-y line-width args)
  (number? number? number? markup-list?)
  (let* ((default-x (* .1 def-x))
         (default-y (- (* .1 def-y) 161)))
    (interpret-markup-list layout props
      #{
        \markuplist\with-dimensions-from \null {
          \fontsize #-2
          \translate #(cons default-x default-y)
          \override #(cons 'line-width line-width)
          \wordwrap { #args }
        }
      #})))

\paper {
  %top-margin = 15
  bottom-margin = 0
  right-margin = 20
  left-margin = 0
}

\header {
  title = "Test"
}

\markup\ref #0 #0 #79 {
  Source: \italic { Japanese Popular Music: a collection of the popular music of Japan rendered in to the
  staff notation, } by Y. Nagai and K. Kobatake, 2nd ed., Osaka, S. Miki & Co., 1892, pp. 96-97.
  Transcribed into Finale music notation by Tom Potter, 2005. See http://www.daisyfield.com/music/
  Lyrics added by Karen Tanaka and Michael Good, 2006. See http://www.recordare.com/
}

{ c' }

Je regarde ça dès que j'ai un peu de temps.

Le lun. 5 juin 2023 à 09:02, Jacques Menu <imj-219@bluewin.ch> a écrit :
Excellent Pierre, merci!

Je ne connossais pas du tout  \with-dimensions-from .

JM

Le 5 juin 2023 à 08:34, Pierre Perol-Schneider <pierre.schneider.paris@gmail.com> a écrit :

Le dim. 4 juin 2023 à 17:54, Jacques Menu <imj-219@bluewin.ch> a écrit :
...
 
Excuse-moi, j’aurais dû préciser ça, extrait de common.mod dans la DTS de MusicXML 3.1 :
 ...

Nouvelle proposition avec ces nouveaux éléments :

\version "2.24.1"

#(define-markup-list-command
  (ref layout props def-x def-y line-width args) (number? number? number? markup-list?)
    (let* ((default-x (* .1 def-x))
          (default-y (- (* .1 def-y) 165)))
    (interpret-markup-list layout props
     #{
        \markuplist {
          \with-dimensions-from \null {
            \fontsize #-2
            \translate #(cons default-x default-y)
            \override #`(line-width . ,line-width)
            \wordwrap { #args }
          }
        }
     #})))

\paper {
  top-margin = 10
  left-margin = 20
}

\header {
  title = "Test"
}

\markup\ref #129 #244 #80 {
  Source: \italic { Japanese Popular Music: a collection of the popular music of Japan rendered in to the
  staff notation, } by Y. Nagai and K. Kobatake, 2nd ed., Osaka, S. Miki &amp; Co., 1892, pp. 96-97.
  Transcribed into Finale music notation by Tom Potter, 2005.  See http://www.daisyfield.com/music/
  Lyrics added by Karen Tanaka and Michael Good, 2006. See http://www.recordare.com/
}

{ c' }

HTH, amicalment,
Pierre
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]