lilypond-user
[Top][All Lists]
Advanced

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

Re: Move only one markup at the same place


From: Alexander Kobel
Subject: Re: Move only one markup at the same place
Date: Fri, 24 Jul 2009 10:49:49 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Bertalan Fodor (LilyPondTool) wrote:
Hi, I have a note with two simultaneous markups:

c''^"A"_"B"

I want to move "B" to be right below the note and not below the staff.
How to achieve that without instantiating a new Voice containing a hidden note? I couldn't find any other solutions.

Hi, Bertalan,


you can use the following tweaks:
    c ^"Barbara Ann in Barrabas' Inn"
    % Allow grob to go into the staff
    -\tweak #'outside-staff-priority #'()
    % Adjust position w.r.t. the note head's lower left corner
    -\tweak #'X-offset #0.5
    -\tweak #'Y-offset #-2
    -"Barbara Ann"

You might have to consider the warning section from http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Writing-text#Text-scripts as well as \textLengthOn and -Off there for longer scripts; see the attached snippet.


Cheers,
Alexander
\version "2.12.1"

\score {
  \new Staff \relative c'' {
    \textLengthOn
    c ^"Barbara Ann in Barrabas' Inn"
    % Allow grob to go into the staff
    -\tweak #'outside-staff-priority #'()
    % Adjust position w.r.t. the note head's lower left corner
    -\tweak #'X-offset #0.5
    -\tweak #'Y-offset #-2
    -"Barbara Ann"
    
    c

    \textLengthOff
    c ^"Barrabas' Inn"
    -\tweak #'outside-staff-priority #'()
    -\tweak #'X-offset #0.5
    -\tweak #'Y-offset #-2
    -"Barbara Ann"

    c
  }

  \layout {
    \context {
      \Score
      \override PaperColumn #'keep-inside-line = ##t
    }
  }
}

\score {
  \new Staff \relative c'' {
    \textLengthOn
    c ^\markup \with-dimensions #'(0 . 0) #'(0 . 0) "Barbara Ann in Barrabas' 
Inn"
    -\tweak #'outside-staff-priority #'()
    -\tweak #'X-offset #0.5
    -\tweak #'Y-offset #-2
    -"Barbara Ann"
    
    c

    \textLengthOff
    c
    -\tweak #'outside-staff-priority #'()
    -\tweak #'X-offset #0.5
    -\tweak #'Y-offset #-2
    -"Barbara Ann"

    c
  }

  \layout {}
}

Attachment: textscript-in-staff.pdf
Description: Adobe PDF document


reply via email to

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