Don't worry, found out how to do it:
\version "2.18.2"
\header {tagline = ""}
{
\numericTimeSignature
\textLengthOn
\override Staff.padding = #3
\time 4/4
a'4\mordent -\tweak staff-padding #4 ^"Mordent"
a'4\upmordent -\tweak staff-padding #4 ^"Upper Mordent"
a'4\downmordent -\tweak staff-padding #4 ^"Lower Mordent"
}
On Fri, 5 Jan 2024 at 15:35, Robert Hickman <[email protected]> wrote:
>
> Hi Phill, that mostly works, thank you for your help. However the text
> isn't vertically aligned, and the text blocks are too close together.
> The documentation mentions 'staff-padding' in regards to the first
> issues, but doesn't say how to actually set that. 'Neither
> Staff.padding' or 'Text.padding' do anything. 'Script.padding' also
> changes the placement of the articulation symbols.
>
> \version "2.18.2"
>
> \header {tagline = ""}
> {
> \numericTimeSignature
> \textLengthOn
> \override Text.padding = #3
> \time 4/4
> a'4\mordent^"Mordent"
> a'4\upmordent^"Upper Mordent"
> a'4\downmordent^"Lower Mordent"
> }
>
> On Fri, 5 Jan 2024 at 15:02, Phil Holmes <[email protected]> wrote:
> >
> > Checkout \textLengthOn and see if it does what you want.
> >
> > On 05/01/2024 14:50, Robert Hickman wrote:
> > > Hi,
> > >
> > > I'm trying to make an example showing mordent symbols with text
> > > labels. I want the note positions spaced so that the text is all on
> > > one line, with notes placed as needed to fit around it.
> > >
> > > The easiest way I can think of doing that would be to put manually
> > > sized 'gap fillers' between the notes which is something I often do in
> > > LaTeX, but I can't find any way of doing that in lilypond - it only
> > > seems possible to change spacing globally?
> > >
> > > \version "2.18.2"
> > >
> > > \header {tagline = ""}
> > > {
> > > \numericTimeSignature
> > > \time 4/4
> > > a'4\mordent^"Mordent"
> > > a'4\upmordent^"Upper Mordent"
> > > a'4\downmordent^"Lower Mordent"
> > > }
> > >
> > >
> >