• Willkommen im Forum „Archiviertes Lilypond Forum (2017)“.
 

Dies ist das Archiv des alten Forums (bis März 2017). Das aktuelle Forum ist unter lilypondforum.de zu finden.
This is the archive of the old forum (until March 2017). You can find the current forum at lilypondforum.de.

Hauptmenü

Nachtrag "Klammern"

Begonnen von chf, Sonntag, 19. Oktober 2014, 02:04

Vorheriges Thema - Nächstes Thema

chf

Hallo Harm,

es gibt doch noch ein Problem:
im Originaltext steht  "bes!2 b\rest2" - die Klammer schließt das Vorzeichen nicht mit ein...

Christa

harm6

Zitat von: chf am Sonntag, 19. Oktober 2014, 02:04
es gibt doch noch ein Problem:
im Originaltext steht  "bes!2 b\rest2" - die Klammer schließt das Vorzeichen nicht mit ein...

Hallo Christa,

es wäre besser gewesen diesen Thread weitergeführt zu haben,
https://archiv.lilypondforum.de/index.php?topic=1835.0
damit es auch für andere später gut auffindbar ist.

Ansonsten handelt es sich um ein bekanntes und bislang ungelöstes Problem.
issue 155 - \parenthesize does not take accidentals into account
Ich habe den dort geposteten work-around benutzt. Weitere Kommentare inline.

\version "2.18.2"

%% this issue 155 - \parenthesize does not take accidentals into account
%% https://code.google.com/p/lilypond/issues/detail?id=155
%% Because the propblem mentioned there is present here as well,
%% we need an additional override.

\layout {
  \context {
    \Voice
    \override ParenthesesItem #'stencil = #(lambda (grob)
     (let* ((acc (ly:grob-object (ly:grob-parent grob Y) 'accidental-grob))
            (dot (ly:grob-object (ly:grob-parent grob Y) 'dot)))
       (if (not (null? acc))
           (ly:pointer-group-interface::add-grob grob 'elements acc))
       (if (not (null? dot))
           (ly:pointer-group-interface::add-grob grob 'elements dot))
       (parentheses-item::print grob)))
  }
}

startParenthesis = {
  \once \override ParenthesesItem.stencils = #(lambda (grob)
        (let ((par-list (parentheses-item::calc-parenthesis-stencils grob)))
          (list (car par-list) point-stencil )))
}

endParenthesis = {
  \once \override ParenthesesItem.stencils = #(lambda (grob)
        (let ((par-list (parentheses-item::calc-parenthesis-stencils grob)))
          (list point-stencil (cadr par-list))))
}

\relative c'' {
<<
  { R1 }
  \\
  {
    %% hmm, using 'extra-offset
    %% how to do it better?
    \once \override ParenthesesItem.extra-offset = #'(0 . -0.35)
    \override ParenthesesItem.font-size = #-1
    \startParenthesis
    \parenthesize bes!2
    \endParenthesis
    \parenthesize b2\rest
    \revert ParenthesesItem.font-size
  }
>>
}


HTH,
  Harm

chf

Hallo Harm,

es tut mir leid - ich wusste nicht, was besser ist, weiter oder neu...
Ich danke dir sehr. Jetzt ist es wirklich gut.

Christa