lilypond-user
[Top][All Lists]
Advanced

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

Re: put footnote in a variable


From: Aaron Hill
Subject: Re: put footnote in a variable
Date: Thu, 01 Nov 2018 01:29:17 -0700
User-agent: Roundcube Webmail/1.3.6

On 2018-11-01 1:04 am, Gianmaria Lari wrote:
I have the following code:

\version "2.19.81"
\fixed c' {
  \time 3/4
  c c c

  \once \override Score.FootnoteItem.annotation-line = ##f
\footnote \markup\huge { * } #'(0 . 5) \markup {\lower #0.8 { \super { *
} }
     "The second time play the measure as " \raise #0.5
    \score {
      \new Staff \with {
        \remove "Time_signature_engraver"
        fontSize = #-3
        \override StaffSymbol.staff-space = #(magstep -3)
        \override StaffSymbol.thickness = #(magstep -3)
        firstClef = ##f
      }
      \fixed c' {f2 e4}
      \layout { indent = 0\cm ragged-last = ##t}
    }
  }

  e2 f4

  c c c
}

Is there any way to put all the code related to the footnote in a variable?
For example if possible I would like to write something like this:

\version "2.19.81"
\fixed c' {
  \time 3/4
  c c c

  \myfootnote e2 f4

  c c c
}

and of course

myfootnote =   {
\once \override Score.FootnoteItem.annotation-line = ##f
\footnote \markup\huge { * } #'(0 . 5) \markup {\lower #0.8 { \super { *
} }
     "The second time play the measure as " \raise #0.5
    \score {
      \new Staff \with {
        \remove "Time_signature_engraver"
        fontSize = #-3
        \override StaffSymbol.staff-space = #(magstep -3)
        \override StaffSymbol.thickness = #(magstep -3)
        firstClef = ##f
      }
      \fixed c' {f2 e4}
      \layout { indent = 0\cm ragged-last = ##t}
    }
  }
}

Does this work for you?

%%%%
\version "2.19.81"

myfootnote = #(define-music-function (m) (ly:music?) #{
  \once \override Score.FootnoteItem.annotation-line = ##f
  \footnote \markup \huge { * } #'(0 . 5)
  \markup { \lower #0.8 { \super { * } }
    "The second time play the measure as " \raise #0.5
    \score {
      \new Staff \with {
        \remove "Time_signature_engraver"
        fontSize = #-3
        \override StaffSymbol.staff-space = #(magstep -3)
        \override StaffSymbol.thickness = #(magstep -3)
        firstClef = ##f
      }
      \fixed c' {f2 e4}
      \layout { indent = 0\cm ragged-last = ##t}
    }
  } $m
#} )

\fixed c' {
  \time 3/4
  c c c
  \myfootnote e2 f4
  c c c
}
%%%%

-- Aaron Hill



reply via email to

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