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

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

Re: variable pour colorier du texte Lyrics


From: Jean Abou Samra
Subject: Re: variable pour colorier du texte Lyrics
Date: Thu, 09 Mar 2023 16:46:13 +0100
User-agent: Evolution 3.46.4 (3.46.4-1.fc37)

Le jeudi 09 mars 2023 à 10:37 -0500, zarbot ziz a écrit :

Bonjour,

J'aimerais savoir comment créer une variable (ou fonction) pour colorier du texte dans lyrics pour ne pas avoir à répéter la commande a chaque fois: je pensais a quelque chose comme: LM = \markup { \with-color #magenta }   mais ne fonctionne pas

Exemple

}
  \addlyrics {
    \markup \with-color #magenta "1" "2" "3" \markup \with-color #blue" 4" "5" "4" "3" "1"  \markup \with-color #magenta "2"   }
}

Bonjour,

2 manières de s'en sortir :

a) Avec \etc pour créer une fonction

Cf. http://lilypond.org/doc/v2.24/Documentation/notation/formatting-text#text-markup-introduction (vers la fin)

\version "2.24.1"

\markup LM = \markup \with-color "magenta" \etc

{ c'4 4 4 4 4 4 4 4 4 4 }
\addlyrics {
  \markup \LM "1"
  "2" 
  \markup \LM "3"
}

Par contre, il faut remettre le \markup à chaque fois.

b) Avec un \override de la propriété color, ce qui est équivalent à mettre comme syllabe un \markup \with-color ...

\version "2.24.1"

LM = \once \override LyricText.color = "magenta"

{ c'4 4 4 4 4 4 4 4 4 4 }
\addlyrics {
  \LM 
  "1"
  "2" 
  \LM
  "3"
}

Cordialement,

Jean

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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