Hi Gabriel,

> I am trying to create a custom command (let’s call it “\IPA”) that combines 
> three things in a markup block within lyrics:
> (i) \vspace
> (ii) \override of the font-name
> (iii) tweak to \fontsize
> 
> The goal is to be able to write code like this:
>   \markup \center-column
>     { prayer
>       \IPA /prɛː/ 
>     }
> 
> I’m experimenting with writing a custom function to create an \IPA command 
> but failing. I would be grateful for assistance here!

I recommend the IPA function *doesn’t* include the \vspace, because then you 
have more flexibility with it (e.g., what happens when you just use it in a 
\markup string, and not a column?!).

Here’s my attempt:

%%%  SNIPPET BEGINS
\version "2.24.4"

#(define-markup-command (IPA layout props arg) (markup?)
   (interpret-markup layout props
     (markup #:override '(font-name . "Times New Roman,") #:fontsize 2 arg)))

text = \lyricmode {
  \markup \override #'(baseline-skip . 3.1) \center-column { prayer \IPA /prɛː/ 
}
  please
}

melody = \relative c' {
  f g
}

\score {
  <<
    \new Voice = "one" {
      \melody
    }
    \new Lyrics \lyricsto "one" \text
  >>
}
%%%  SNIPPET ENDS

Someone else might have a different/better solution…?

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