Our Hymnal, Grant me, God, the Gift of Singing

Putting a hymnal together

by Mogens Lemvig Hansen, 2004

I was the technical person on the hymnal committee in charge of Grant me, God, the Gift of Singing. My family and I moved to Burnaby from Waterloo, Ontario, in the early spring of 1996. After failing to find an agreeable walking-distance church, we began attending the Danish Church. By the fall we were in a small church choir led by the organist, Knud Peter Nielsen. As per Danish tradition, we had text and music in different books, occasionally photocopied onto one sheet. After being used to hymnals with text and music printed together, I had a hard time getting used to this arrangement, so I began typesetting the hymns the way I was used to from Waterloo. When we then heard of plans for making a new hymnal, my wife volunteered me.

John 3:16
Dr Knuth’s version of John 3:16 calligraphed by the famous font designer Hermann Zapf.

I do not know of any software designed for making hymnals—with text and music and indexes—but fortunately there is TeX. TeX, a computer system for typesetting beautiful documents, was invented in the 1980’ies by Donald E. Knuth from Stanford. TeX has turned out to be very versatile. A large international community of TeX users has emerged where people share their expertise in applying TeX to conveniently typesetting anything from chemical compounds to critical editions of classic texts to stage plays and music. Making a hymnal with TeX then is a relatively straightforward combination of the techniques others have already developed.

\title{Come, Holy Spirit, truth divine}
\transl{S. D.}{Rodholm}
\author{N. F. S.}{Grundtvig}{1826}
\dktitle{Kom, sandheds \AA nd! og vidne giv} % DDS258
\hymntopic{Pentecost} \hymntopic{Trinity}
Come, Ho-ly Spir-it, truth di-vine,\\
and wit-ness bear that Christ is mine,\\
and that I trust no oth-er name\\
to save my soul from sin and shame.

Come, Ho-ly Spir-it, light di-vine,\\
and let Your light with-in me shine,\\
that from the way of God I may\\
not e-ven for a mo-ment stray.

Come, Ho-ly Spir-it, from a-bove,\\
im-plant in us the Fa-ther’s love,\\
and lend to us Your voice of grace\\
to com-fort ev-ery tribe and race.

% pre Folmer: Thy -> Your
% st3 l2: im-bue us with the …

One feature of TeX that made the hymnal possible is that TeX is text based. You can use any text editor—like Notepad, even Word®—on any computer to write TeX input, see the sample hymn text to the left. Therefore, several people could share the work of typing all the hymn texts instead of just one person dragging and dropping with what-you-see-is-what-you-get software. If you look at the sample hymn text, you can see that it is plain text littered with \backslashes and {braces}. These serve to label what each element of text is, the title, the translator, etc.

\tunename{Vom Himmel hoch da komm ich her}
\hymnmeter{8 8 8 8 iambic}
\Notes \zcl J\cu e&\zcl g\cu j\en \bar
\NOtes \zql N\qu d\zql a\qu c\zql N\qu d\zql L\qu c&\zql g\qu i \zql e\qu h\zql g\qu i\zql g\qu g\en \bar
\NOtes \zql M\qu c\zql K\qu d\zql J\qu N&\zql f\qu h\zql f\qu i\zql e\qu j\en \Notes \ds \zcl J\cu N&\ds \zcl e\cu j\en \bar
\NOtes \zql H\qu a\zql I\qu K\zqlp J\qu L&\zql e\qu j\zql d\qu g\zql c\qu g\en \Notes \qu N\cl K&\zql c\qu e\en \bar
\NOtes \zql L\qu N\zql K\qu a\zql H\qu a&\zql b\qu g\zql d\qu f\zql{^c}\qu e\en \Notes \ds &\ds \en \zbar
\Notes \zcl a\cu{=c}&\zcl e\cu e\en \bar
\NOtes \zql M\qu c\zql K\qu d\zql L\qu b\zql N\qu b&\zql f\qu h \zql f\qu h\zql e\qu g\zql d\qu i\en \bar
\NOtes \zql J\qu e\zql K\qu d\zql N\qu b&\zql g\qu j \zql{^f}\qu h\zql d\qu g\en \Notes \ds \zcl J\cu N&\ds \zcl e\cu j\en \bar
\NOtes \zql L\qu N\zql M\qu a\zql L\qu b\zql J\qu c&\zql e\qu i \zql c\qu h\zql e\qu g\zql e\qu g\en \bar
\Notes \Dqbl HJ\bsk \bsk \Dqbu cN\zql G\qu N&\zqlp c\Dqbu fe \qu d\nolyr\cl b\en \NOTEs \zwq{JL}\sk&\zwq{Nc}\sk\en \Endpiece

That much for the text; the music is worse. If you look at the sample at the right, you will recognise labels similar to those for the text.

Once both text and music had been typed, the hymnal of course still had to be put together. Since text and music was typed as plain text files, it was easy to write a small program to merge the two. You can see the result of merging the text and music samples here. Merging automatically ensured that the text printed with the music is identical to the text printed below the music. A few hymns did not fit the normal scheme and I had to merge text and music by hand, and sure enough an error crept in (Hymn 97, stanza 5).

I had great fun making Grant me, God, the Gift of Singing, even if it took a lot of time, sometimes time I should have spent with my family. I don’t think my wife realised what she was volunteering me for and I certainly had no idea that was where I was headed…