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

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

Re: placer un glyphe dans une chaîne à initialiser


From: Philippe Neyrat
Subject: Re: placer un glyphe dans une chaîne à initialiser
Date: Thu, 07 May 2015 18:30:27 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.6.0

Bonjour,

Pourquoi utiliser string append ?

Je trouve plus simple de concaténer :

thisBigTitle = \markup \concat { \thiscomposer " " \thisWork " "
\thisTonality " - " \autre " " \blabla " " \en \markup }

Et ça fonctionne même si thiswork et thistonality sont des markups, on
peut donc les mettre dans des titres, etc.

Ou alors je comprends pas le problème...
Faut-il que "thisBigTitle" soit ABSOLUMENT une "chaine de caractères" ?

My two cents.

Philippe

Le 07/05/2015 13:35, Seventies a écrit :
> Merci de tout vos conseils.
> 
> Malheureusement, il y a quelques problèmes incompréhensible.
> Il s'agit donc de variables à initialiser en tête de programme, en dehors de
> tout contexte.
> 
> Si j'écris :
> 
> \version "2.18.2"
> thisComposer = "Johannes Brahms"
> thisWork = "Piano Concert nr.2"
> thisOrchester = "for Piano & Orchestra"
> thisOpus = "Op.83"
> thisMail = "address@hidden"
> thisMailTo = #(string-append "mailto:"; thisMail)
> thisWebSite = "http://coucou.com";
> thisPageUrl = "brahms_piano_concert_nr2"
> thisTonality = "in Bes major"                            %% correct
> thisDates = "1833-1897"
> thisDateOfPublication = "1881"
> thisSource = "Source : Berlin: N. Simrock, 1882. Plate 8263."
> thisAlternateSource = "Leipzig: Edition Peters, No.3895, n.d.(ca.1910).
> Plate 10401."
> thisTypesetting = "Typeset with LilyPond, a free software under GNU General
> Public License"
> %thisBigTitle = "Brahms - Piano Concert nr.2 in Bes major"
> thisBigTitle = #(string-append thisComposer " - " thisWork " " thisTonality)
> 
> \relative c'' {
>   c4 c c c
> }
> 
> ça fonctionne.
> 
> Si j'ajoute un \markup :
> 
> \version "2.18.2"
> thisComposer = "Johannes Brahms"
> thisWork = "Piano Concert nr.2"
> thisOrchester = "for Piano & Orchestra"
> thisOpus = "Op.83"
> thisMail = "address@hidden"
> thisMailTo = #(string-append "mailto:"; thisMail)
> thisWebSite = "http://coucou.com";
> thisPageUrl = "brahms_piano_concert_nr2"
> thisTonality = \markup "in Bes major"                            %% toujours
> correct
> thisDates = "1833-1897"
> thisDateOfPublication = "1881"
> thisSource = "Source : Berlin: N. Simrock, 1882. Plate 8263."
> thisAlternateSource = "Leipzig: Edition Peters, No.3895, n.d.(ca.1910).
> Plate 10401."
> thisTypesetting = "Typeset with LilyPond, a free software under GNU General
> Public License"
> %thisBigTitle = "Brahms - Piano Concert nr.2 in Bes major"
> thisBigTitle = #(string-append thisComposer " - " thisWork " " thisTonality)
> 
> \relative c'' {
>   c4 c c c
> }
> 
> ça fonctionne toujours.
> 
> Mais si je place des accolades autour du markup :
> 
> \version "2.18.2"
> thisComposer = "Johannes Brahms"
> thisWork = "Piano Concert nr.2"
> thisOrchester = "for Piano & Orchestra"
> thisOpus = "Op.83"
> thisMail = "address@hidden"
> thisMailTo = #(string-append "mailto:"; thisMail)
> thisWebSite = "http://coucou.com";
> thisPageUrl = "brahms_piano_concert_nr2"
> thisTonality = \markup {"in Bes major"}                            %%
> incorrect
> thisDates = "1833-1897"
> thisDateOfPublication = "1881"
> thisSource = "Source : Berlin: N. Simrock, 1882. Plate 8263."
> thisAlternateSource = "Leipzig: Edition Peters, No.3895, n.d.(ca.1910).
> Plate 10401."
> thisTypesetting = "Typeset with LilyPond, a free software under GNU General
> Public License"
> %thisBigTitle = "Brahms - Piano Concert nr.2 in Bes major"
> thisBigTitle = #(string-append thisComposer " - " thisWork " " thisTonality)
> 
> \relative c'' {
>   c4 c c c
> }
> 
> ça bloque au niveau du string-append qui suit le \markup.
> 
> Mais la solution la plus simple vient de Daniel, qui introduit un bémol en
> tant que caractère ASCII :
> thisTonality = "in B♭ major" % Sans passer par \super, qui nécessiterait un
> \markup.
> 
> Là, aucun problème, sinon de savoir d'où vient ce code ASCII. J'ai cherché
> sur le Net sans trouver. Peu importe, un copier/coller a permis de le
> récupérer.
> 
> LilyPond garde pas mal de mystères, normal, c'est une grande dame ;-)
> 
> Merci de tous vos conseils,
> 
> Jean-François
> 
> 
> 
> --
> View this message in context: 
> http://lilypond-french-users.1298960.n2.nabble.com/placer-un-glyphe-dans-une-chaine-a-initialiser-tp7582932p7582941.html
> Sent from the LilyPond French Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> liste de diffusion lilypond-user-fr
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user-fr
> 


-- 
Propulsé par l'Association Sud-Ouest.org
Plateforme Libre d'hébergement mail à prix libre
    https://www.sud-ouest.org



reply via email to

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