Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
LilyPond wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Making lyrics take bar lines into account
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
By default, Lyrics contexts do not contain <code>Bar_engraver</code>, so your lyrics will not take into account divisions between measures. Longer lyric items will appear to “spill across” bar lines. This snippet shows how you can add <code>Bar_engraver</code> to lyrics and hide bar lines, so that each individual lyric will be contained within the horizontal space between two consecutive bar lines. This approach can have undesirable effects on the horizontal spacing between bar lines and note heads. You may want to combine it with some <code>\tweak self-alignment-X</code> commands placed before your longer lyric items. <lilypond version="2.24"> %%% Approach suggested by Kieren MacMillan in %% https://lists.gnu.org/archive/html/lilypond-user/2025-07/msg00016.html \header { title = \markup { Hymn: \italic { Of the Father’s love begotten } } subtitle = "Stanza 3" } music = \relative c' { \key ees \major \time 3/4 es2 f4 | g2 as4 | g2 f4 | g2( f4) | es2. | g2 as4 | bes2 c4 | bes4( g4) as4 | bes2. | c2 d4 | es2 bes4 | bes2 as4 | g2( f4) | es2. | c2 d4 | es2 f4 | es4( c4) d4 | es2. | es2 f4 | g2 as4 | g2 f4 | bes2( c4 | bes4 g4 as4) | bes2. | es,2 d4 | c2 d4 | es2 c4 | bes2. | es2 f4 | g2 bes4 | g2 es4 | f2.( | es2.) \fine } stanza = \lyricmode { \set stanza = "3. " Let the heights of heaven a -- dore him; an -- gel hosts, his prai -- ses sing; powers, do -- min -- ions, bow be -- fore him, and ex -- tol our God and King; let no tongue on earth be si -- lent, ev -- ery voice in con -- cert ring, e -- ver -- more and e -- ver -- more! __ } %% Top-level layout (applying to all scores) \layout { indent = 0 \context { \Voice \consists "Melody_engraver" } \context { \Staff \omit TimeSignature } } \markup \bold { \circle 1 LilyPond’s default behaviour: } \score { << \new Voice = "congregation" \music \new Lyrics \lyricsto "congregation" \stanza >> } \markup \bold { \circle 2 with Bar_engraver added to the Lyrics context: } \score { << \new Voice = "congregation" \music \new Lyrics \lyricsto "congregation" \stanza >> \layout { \context { \Lyrics \consists "Bar_engraver" \hide BarLine } } } beginningMusic = \relative c' { \key ees \major \time 3/4 es2 f4 | g2 as4 | g2 f4 | g2( f4) | es2. | } beginningStanza = \lyricmode { \set stanza = "3. " Let the \tweak self-alignment-X #-0.4 heights of \tweak self-alignment-X #-0.5 heaven a -- dore him; } \markup \bold { \circle 3 with Bar_engraver \underline and horizontal alignment tweaks: } \score { << \new Voice = "congregation" \beginningMusic \new Lyrics \lyricsto "congregation" \beginningStanza >> \layout { \context { \Lyrics \consists "Bar_engraver" \hide BarLine } } } </lilypond> [[Category:Vocal music]] [[Category:Text]] [[Category:Spacing]] [[Category:Contexts and engravers]] [[Category:Real music]] [[Category:Snippet]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Making lyrics take bar lines into account
Add topic