Deutsches Lilypond Forum (Archiv)

Allgemein => Allgemeine Diskussion => Thema gestartet von: kilgore am Sonntag, 12. August 2012, 14:32

Titel: \once mit TextSpanner
Beitrag von: kilgore am Sonntag, 12. August 2012, 14:32
Hallo Lilys!

Es nervt mich immer wieder..... warum \once nicht mit TextSpanner Texte nicht funktioniert....

Hat jemand da zu meiner Beruhigung eine Erklärung?!?  :o

Gruß
kil

\version "2.14.2"


\relative c' {
 
  c\startTextSpan c c c
  c c c c
  c c c c\stopTextSpan
 
  \break
 
  \once \override TextSpanner #'(bound-details left text) = "start"
  \once \override TextSpanner #'(bound-details right text) = "stop"
  c\startTextSpan c c c
  c c c c
  c c c c\stopTextSpan
 
  \break
 
  c\startTextSpan c c c
  c c c c
  c c c c\stopTextSpan
 
  \break
}
Titel: Re: \once mit TextSpanner
Beitrag von: ewipond am Sonntag, 12. August 2012, 16:20
Hallo kilgore,

eine Beruhigung, aber keine Erklärung: mit der neuesten Entwickler-Version geht es so wie Du möchstest!

Grüße!
Titel: Re: \once mit TextSpanner
Beitrag von: Be-3 am Sonntag, 12. August 2012, 16:44
Hat jemand da zu meiner Beruhigung eine Erklärung?!?  :o

Hi kil,

wie ewipond schon schreibt: mit Version 2.15.41 geht's.

Abhilfe bei 2.14.2
Es handelt sich um einen kleines Problem mit dem Initial-/Defaultwert.
Wenn Du z. B. zu Beginn "Anfang" und "Ende" setzt, dann kommt tatsächlich wie erwartet nach dem \once-Aufruf mit "start" und "stop" wieder "Anfang" und "Ende".

Lösung: Am Anfang left text und left text mit ##f initialisieren, dann funktioniert alles wie gewünscht, auch mit 2.14.2:

  \override TextSpanner #'(bound-details left text) = ##f
  \override TextSpanner #'(bound-details right text) = ##f

Viele Grüße
Torsten


\version "2.12.4"


\relative c' {
 
  \override TextSpanner #'(bound-details left text) = ##f
  \override TextSpanner #'(bound-details right text) = ##f
  c\startTextSpan c c c
  c c c c
  c c c c\stopTextSpan
 
  \break
 
  \once \override TextSpanner #'(bound-details left text) = "start"
  \once \override TextSpanner #'(bound-details right text) = "stop"
  c\startTextSpan c c c
  c c c c
  c c c c\stopTextSpan
 
  \break
 
  c\startTextSpan c c c
  c c c c
  c c c c\stopTextSpan
 
  \break
}
Titel: Re: \once mit TextSpanner
Beitrag von: kilgore am Sonntag, 12. August 2012, 18:39
Oh!

Danke für die Beruhigung und auch das Work-Around  ;D

Freu mich auf die neue Version :)

Gruß
kil