Hi Damian,

> how do I get the dotted line to align with the bottom of the 8 rather than 
> the middle?

This is the kind of thing I use, though it’s old enough that there may well be 
better ways nowadays:

%%%  SNIPPET BEGINS
\version "2.25.11"

loco = \ottava #0
#(define eightva
 #{
   %% messing around with \with-dimensions,
   %% because OttavaBracket has no details.stencil-align-dir-y
   \markup
       \with-dimensions #'(0 . 4) #'(-1 . 0.75)
       \lower #0.225 \italic \concat { "8" \hspace #0.05 \fontsize #-0.5 "va" }
 #})
#(define eightva-par
 #{
   \markup
       \translate #'(0.625 . 0) \with-dimensions #'(0 . 5.5) #'(-1 . 0.75)
       \lower #0.25 \concat { "(" \hspace #0.05 \italic { "8" \hspace #0.125 
"va" } ")" }
 #})
octU = {
  \once \override Staff.OttavaBracket.font-shape = #'upright
  \once \override Staff.OttavaBracket.before-line-breaking =
      #(lambda (grob) (ly:grob-set-property! grob 'text eightva))
  \override Staff.OttavaBracket.after-line-breaking =
   #(lambda (grob)
      (let* ((orig (ly:grob-original grob))
             (siblings (if (ly:grob? orig)
                           (ly:spanner-broken-into orig)
                           '())))
       (if (> (length siblings) 1)
           (for-each
             (lambda (sib) (ly:grob-set-property! sib 'text eightva-par))
             (cdr siblings)))))
  \ottava #1
}

{
  R1
  \octU c'''4 4 4 4 \break
  c'''4 4 4 4
  c'''1 \loco
}
%%%  SNIPPET ENDS

Hope that helps!
Kieren.
______________________________________________

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.


Reply via email to