lilypond-user
[Top][All Lists]
Advanced

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

Re: vertical spacing of footnotes


From: Werner LEMBERG
Subject: Re: vertical spacing of footnotes
Date: Tue, 14 Feb 2023 15:13:57 +0000 (UTC)

> To change those properties, you could do
>
> ```
> \paper {
>   text-font-defaults.baseline-skip = 3
> }
> ```
>
> [...]
>
> ```
>     \override Score.Footnote.footnote-text =
>       #(grob-transformer
>         'footnote-text
>         (lambda (grob orig)
>           #{ \markup { \strut #orig } #}))
> ```

Excellent, thanks!  I slowly arrive at some nice results, see attached
code and image.  However, there is one problem that I don't
understand: Why is the space between footnotes 3 and 4 (and 4 and 5)
larger than between 1 and 2 (and 2 and 3)?


    Werner
\version "2.25.2"

#(set-default-paper-size "a7landscape")

#(define-markup-command (footnote-strut layout props)
   ()
   #:properties ((baseline-skip))
   (let ((yext (cons (* -0.3 baseline-skip)
                     (* 0.7 baseline-skip))))
     (ly:make-stencil
      (ly:stencil-expr (make-transparent-box-stencil '(0 . 0.05) yext))
      empty-interval
      yext)))

\book {
  \header { tagline = ##f }

  \paper {
   text-font-defaults.baseline-skip = 4
   footnote-padding = 0\mm
   footnote-number-raise = -1\mm
   footnote-separator-markup =
     \markup \column {
       \line { \override #'(span-factor . 1/3) \draw-hline }
       \vspace #0.2
     }
  }

  \markup "time-based footnotes"

  \score {
    \relative c'' {
      r1 |
      \footnote #'(-0.5 . -1)
        \markup {
          \override #'(line-width . 40)
          \override #'(baseline-skip . 2.3)
          \column {
            \line { + Meter change. This is a multi-line }
            \line { + footnote grob. } }
        } Staff.TimeSignature
        \time 3/4
      \footnote #'(1 . -1)
        \markup {
          \override #'(line-width . 40)
          \override #'(baseline-skip . 2.3)
          \wordwrap { + Note stem. This is another multi-line
                      + footnote grob. }
        } Stem
        <c e g>4
      \footnote #'(1 . -1) "+ Another stem." Stem
        q q |
      \footnote #'(-0.5 . 2) "+ Bar line." Staff.BarLine
        q q
      \footnote #'(0.5 . -1) "+ Key change." Staff.KeySignature
        \key c \minor q |
    }

    \layout {
      \context {
        \Score
          \override Footnote.footnote-text =
            #(grob-transformer
              'footnote-text
              (lambda (grob orig)
                #{ \markup { \footnote-strut #orig } #}))
      }
    }
  }
}

PNG image


reply via email to

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