I started working on a songbook with English songs and came across lyrics where the words are connected with hyphens.
What would be the best way to show these in LilyPond?
As can be seen on this page of the documentation:
2.1.2 Techniques specific to lyrics
Inter-syllable Hyphens in lyrics are typeset with
-- (two hyphens, surrounded by spaces).
Lyric extenders are typeset with
__ (two underscores, surrounded by spaces).
To get the word "Heart" (with its extender line) to appear under two notes you should probably use a slur on those notes, i.e. by placing
( after the first A, and a
) after the following G.
If you want a "formal hyphen" (that would appear in the word even if you weren't breaking up the syllables) you can just type the second word (with the hyphen), wrapped in quotation marks.
So, for the lyrics you'd get something like this:
gold -- en Heart __ "- Gate."
The length of inter-syllable hyphens and extenders depends on how much space is available; if there isn't enough horizontal space LilyPond will squash them out of existence.
If you don't want to add slurs into your music as suggested above, you can typeset a "skip" with a single underscore
_. This, combined with the double-underscore extender line gives:
gold -- en Heart __ _ "- Gate."