--- /dev/null
+\version "1.3.146"
+\header{
+ texidoc="Lyric alignment
+
+ Lyric alignment is adjustable both interms of alignment between stanzas and on notehead.
+
+ If the property alignment is not set, there is automatic determination of alignment type based on punctuation. (ee lyric-phrasing.ly)
+
+"
+}
+
+%\paper { linewidth = -1. }
+\score {
+ \addlyrics
+ \context Voice = "v" \notes \relative c'' {
+ \property Staff.automaticMelismata = ##t
+ \cadenzaOn
+ a\breve \bar "||" a1 \bar "|" a \bar "|" a \bar "||" \break a \bar "|" a \bar "|" a \bar "|" a \bar "||" \break a \bar "|" a \bar "|."
+ }
+ \context Lyrics <
+ \context LyricsVoice = "v-1" \lyrics {
+% \property LyricsVoice . stanza = "1:"
+ \property Lyrics . LyricText \override #'ignore-length-mismatch = ##t
+ \property Lyrics . LyricText \override #'alignment = #-1
+ \property Lyrics . LyricText \override #'begin-alignment = #8
+
+ "Particularly useful for reciting notes "
+ left
+
+ \property Lyrics . LyricText \override #'alignment = #0
+
+ centered
+
+ \property Lyrics . LyricText \override #'alignment = #1
+
+ right
+
+ \property Lyrics . LyricText \override #'alignment = #-1
+ \property Lyrics . LyricText \override #'begin-alignment = #2
+
+ left_half_way
+
+ \property Lyrics . LyricText \override #'begin-alignment = #4
+
+ left_one_quarter
+
+ \property Lyrics . LyricText \override #'begin-alignment = #10
+
+ left_one_tenth
+
+ \property Lyrics . LyricText \override #'begin-alignment = #1
+
+ left_one_whole
+
+ \property Lyrics . LyricText \override #'ignore-length-mismatch = ##f
+ \property Lyrics . LyricText \override #'begin-alignment = #4
+
+ Very_short_lyrics_remain_in_touch_with_their_note
+
+ \property Lyrics . LyricText \override #'alignment = #1
+ \property Lyrics . LyricText \override #'end-alignment = #1.1
+ \property Lyrics . LyricText \override #'ignore-length-mismatch = ##t
+
+
+ Unless_ignore-length-mismatch_is_true
+
+ }
+ \context LyricsVoice = "v-2" \lyrics {
+% \property LyricsVoice . stanza = "2:"
+ " with many syllables under them." l c r l l l x x x note' true'
+ }
+ >
+}
Grob * lyric;
alignment_i_ = appropriate_alignment (punc);
-
+
// If there was no notehead in the matching voice context, use the first
// notehead caught from any voice context (any port in a storm).
if (!notehead_l_) {
/** determine what alignment we want.
- Rules: if first_in_phrase_b_ is set, then alignment is LEFT.
+ Rules: if property alignment is set it specifies the alignment
+ if first_in_phrase_b_ is set, then alignment is LEFT.
otherwise if each syllable ends in punctuation, then alignment is RIGHT
otherwise alignment is centre.
*/
int
Syllable_group::appropriate_alignment (const char *punc)
{
+
+ SCM s=this->longest_lyric_l_->get_grob_property ("alignment");
+ if (s!=SCM_EOL) {
+ return gh_scm2int (s);
+ }
+
if (first_in_phrase_b_)
return LEFT;
(grob-property-description 'break-glyph-function procedure? "function taking glyph and break-direction, returning the glyph at a line break.")
(grob-property-description 'breakable boolean? "boolean indicating if this is a breakable item (clef, barline, key sig, etc.).")
(grob-property-description 'c0-position integer? "integer indicating the position of central C.")
-
+(grob-property-description 'cautionary-size integer? "size of cautionary accidentals (relative to size of accidentals)")
(grob-property-description 'center-element ly-grob? "grob which will
be at the center of the group after aligning (when using
Align_interface::center_on_element). .")
(grob-property-description 'padding number? "add this much extra space between objects that are next to each other.")
(grob-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket .")
+(grob-property-description 'paren-cautionaries boolean? "Whether to add parenthesis around cautionary accidentals.")
(grob-property-description 'pitches list? "list of musical-pitch.")
(grob-property-description 'porrectus-width number? "width of the porrectus ligature measured in staff space.")
(grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")