The S
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 Initialization and OptionsEach LaTeX document that uses the s
Supported <options> include the following: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
lyric chorded slides rawtext |
Output Type. The s Lyric books omit all chords, whereas chord books include chords and additional information for musicians (specified using \musicnote). Books of overhead slides omit all chords like lyric books, but they typeset one song per page in a large font, centered. Raw text output doesn't produce songs in the output document at all. Instead, when raw text output is selected, an ascii text file named <jobname>.txt (where <jobname> is the filename given by \jobname) will be generated in the style of a lyric book. This can be useful for importing song books into another program, such as a spell-checker. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\chordson \chordsoff |
In addition to using the lyric and chorded options to turn chords on or off at the beginning of the document, chords can also be turned on or off anywhere in the middle of the document by using the \chordson or \chordsoff macros. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\slides |
In addition to using the slides option to produce an entire book of overhead slides, one can also activate slides mode using the \slides command. For best results, this should typically only be done in the document preamble or at the beginning of a fresh page. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
nomeasures showmeasures \measureson \measuresoff |
Measure Bars. Even though the s | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
transposecapos |
Transposition. The transposecapos option changes the effect of the \capo macro. Normally, using \capo{<n>} within a song environment produces a textual note in chord books that suggests the use of a guitar capo on fret <n>. However, when the transposecapos option is active, these textual notes will be omitted and instead the effect of \capo{<n>} will be the same as for \transpose{<n>}. That is, chords between the \capo macro and the end of the song will be automatically transposed up by <n> half-steps. This can be useful for adapting a chord book for guitarists to one that can be used by pianists, who don't have the luxury of using a capo. See section 7.8 and section 10 for more information on the \capo and \transpose macros. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
noindexes \indexeson \indexesoff |
Indexes. The noindexes option suppresses the typesetting of any in-document indexes. Display of indexes can also be turned on or off using the \indexeson and \indexesoff macros. If indexes are off by the time the \begin{document} line is reached, then not only are in-document indexes not displayed, the auxiliary data files that are used to create them will not be generated either. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
nopdfindex |
The nopdfindex option suppresses the creation of the pdf bookmark index that is normally included in .pdf files. If not generating a .pdf file, this option has no effect. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
onesongcolumn twosongcolumns \songcolumns |
Columns. By default, songs in a songs environment will be typeset in two columns per page. To force one column per page, you can use the onesongcolumn option. To force the default of two columns per page, use the twosongcolumns option. The \songcolumns{<n>} macro can be used anywhere outside of songs environments to cause songs to be typeset in <n> columns per page (where <n> is any positive integer). Setting the number of columns to 1 will cause indexes to be typeset in a single column as well; otherwise indexes will be typeset in the index-default number of columns. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
noscripture |
Scripture Quotations. The noscripture option omits scripture quotations (see section 8) from the output. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\scriptureon \scriptureoff |
You can also turn scripture quotations on or off in the middle of the document by using \scriptureon or \scriptureoff, respectively. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
noshading |
Shaded Boxes. The noshading option causes all shaded boxes, such as those that surround song numbers and textual notes, to be omitted. You might want to use this option if printing such shaded boxes causes problems for your printer or uses too much ink. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\includeonlysongs |
Partial Song Sets. Often it is useful to be able to extract a subset of songs from the master document—e.g. to create a handout or set of overhead slides for a specific worship service. To do this, you can type \includeonlysongs{<songlist>} in the document preamble (i.e., before the \begin{document} line), where <songlist> is a comma-separated list of the song numbers to include in the resulting document. For example, suppose your song book contains three song sections, one in which the songs are numbered with regular arabic numbers, one in which songs are numbered H1, H2, etc., and one in which songs are numbered C1, C2, etc. Then if you put
in the preamble of your document, the first song section of the resulting document would contain only songs 37 and 2 (in that order), the second section would have only songs H2 and H1 (in that order), and the final section would have only song C4. Partial books generated with \includeonlysongs will omit all scripture quotations (section 8), and will ignore uses of the \brk macro between songs. To force a column-break at a specific point in a partial book, add the word brk at the corresponding point in the <songlist> argument. To force a page-break, use consecutive column-breaks. The \includeonlysongs macro cannot be used in conjunction with the rawtext document option. 5 Book Sections | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songsection |
Section Titles. Section titles in a song book can be produced with
which acts like LaTeX's \section command except that it centers the <title> text in sans serif font and omits the section number without excluding the section from indexes or tables of contents. Authors can redefine the \songsection command to affect the titles of index sections (see below). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songchapter |
When using the book document class, you can use \songchapter instead of \songsection to start a new chapter. Likewise, you can redefine \songchapter instead of \songsection to affect the titles of indexes (see below). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\newauthorindex \newindex \newscripindex |
Indexes. The songs in song sections can be itemized in indexes whose contents are generated automatically. To generate an index, first declare the index in the document preamble (i.e., before the \begin{document} line) with one of the following:
which declare an index that will be sorted by song title, an index that will be sorted by author, or an index that will be sorted by scripture references, respectively. The <id> should be an alphabetic identifier that will be used to identify the index in other macros that reference it. The <filename> should be a string that, when appended with an extension, constitutes a valid filename on the system. Auxiliary files named <filename>.sxd and <filename>.sbx will be generated during the automatic index generation process. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\showindex |
To display an index that was declared in the preamble, use:
where <id> is the same identifier used in the \newindex, \newauthorindex, or \newscripindex command, and where <title> is the title of the index, which should consist only of simple text suitable for inclusion in the pdf bookmark index. This will display the complete index starting on a fresh page, including its automatically generated contents. The [<columns>] part is optional, and if specified dictates the number of columns that should be used if the index can't fit in a single column. 6 CompilingAs with a typical LaTeX document, compiling a song book document requires three steps. First, use LaTeX (pdflatex is recommended) to generate auxiliary files from the .tex file: pdflatex mybook.tex Second, use the songidx program to generate an index for each index that you declared with \newindex, \newauthorindex, or \newscripindex. The syntax of the songidx command is: songidx [-b <canon>.can] <filename>.sxd <filename>.sbx where <filename> is the same <filename> that was used in the \newindex, \newauthorindex, or \newscripindex macro. If the index was declared with \newscripindex, then the -b option is used to specify which version of the bible you wish to use as a basis for sorting your scripture index. The <canon> part can be any of the .can files provided with the songidx distribution. If you are using a Protestant, Catholic, or Greek Orthodox Christian bible with book names in English, then the bible.can canon file should work well. If you are using a Jewish Tanakh, use tanakh.can. For other bibles, you should create your own .can file by copying and modifying one of the existing .can files. For example, if your song book .tex file contained the lines \newindex{titleidx}{titlfile} \newauthorindex{authidx}{authfile} \newscripindex{scripidx}{scrpfile} then the commands to generate indexes sorted according to a Christian English bible would be: songidx titlfile.sxd titlfile.sbx songidx authfile.sxd authfile.sbx songidx -b bible.can scrpfile.sxd scrpfile.sbx Once the indexes are generated, you can generate the final book by invoking LaTeX one more time: pdflatex mybook.tex 7 Songs7.1 Beginning a Song | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
songs |
Song Sets. Songs are contained within songs environments. Each such environment begins and ends with:
<indexes> is a comma-separated list of index identifiers (the <id>'s specified with \newindex)—one identifier for each index that is to include entries for songs in this song set. Between the \begin{songs} and \end{songs} lines of a song section can appear only songs (see below) or scripture quotations (see section 8). No text in a songs environment may lie outside of a song or scripture block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\beginsong \endsong |
Songs. A song begins and ends with:
Songs should appear only within songs environments (see above). (If they do not, the vertical material comprising the song will be output directly to the current vertical list, and it is up to the enclosing environment to provide suitable page-breaking and other formatting.) In the \beginsong line, <titles> can be either a single song title or multiple song titles separated by \\. If multiple titles are provided, the first is typeset normally atop the song and the rest are each typeset in parentheses on separate lines. An index entry will be generated for each of these song titles, and it will be added to each title index associated with the current songs environment. The <otherinfo> is optional; it and its surrounding brackets ([]) can be omitted. If provided, it is a comma-separated list of key-value pairs (keyvals) of the form <key>=<value>. Each keyval provides some information about the song. The possible keys and their values are:
For example, a song that begins and ends with
will look like
The four keyvals used in the above example are described in detail in the remainder of this section; the final two are documented in section 7.9. You can also create your own keyvals (see section 11.8). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
by= |
Song Authors. The authors of a song can be specified with the keyval by={<authors>}, where <authors> are one or more authors, composers, translators, etc. An entry will be added to each author index associated with the current songs environment for each contributor listed. Contributors are expected to be separated by commas, semicolons, or the word and. For example:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cr= |
Copyright Info. Copyright info for a song is provided by cr={<copyright>}, where <copyright> is material that identifies the copyright-holder of the song, if any. This typically begins with the © symbol produced with \copyright. For example:
Note that licensing information that typically appears immediately after the copyright info is not usually included here. That information is typically set with the li= keyval (see below). Copyright information will be typeset in fine print at the bottom of the song text. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
li= \setlicense |
Licensing Info. Licensing information citing the terms of your lawful use of a song is provided by li={<license>}, where <license> is typically material that a copyright administrator requires licensees to place near each song covered by the license. Licensing information will be displayed in fine print under the song just after the copyright information (if any). Writing \setlicense{<license>} anywhere between the \beginsong and \endsong lines is equivalent to using li={<license>} in the \beginsong line. Since many songs in a book are often covered by the same license, it is usually convenient to create a macro to abbreviate the licensing information. For example, if your organization has a music license from Christian Copyright Licensing International with license number 1234567, you might define a macro like
Then you could write li=\CCLI in the \beginsong line of each song covered by CCLI. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sr= |
Scripture References. The s
The full formal syntax of a valid <refs> argument is given by the following syntax rules:
In those syntax rules, <chapter> and <verse> are arabic numbers denoting a valid chapter number for the given book, and a valid verse number for the given chapter, respectively. Note that when referencing a book that has only one chapter, one should list only its verses after the book name (rather than 1:<verses>). 7.2 Verses and Choruses | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\beginverse \endverse \beginchorus \endchorus |
Starting A Verse Or Chorus. Between the \beginsong and \endsong lines of a song can appear any number of verses and choruses. A verse begins and ends with: \beginverse ⋮ \endverse and a chorus begins and ends with: \beginchorus ⋮ \endchorus Verses are numbered (assuming \noversenumbers has not been used to suppress verse numbering) whereas choruses have a vertical line placed to their left. You can also begin a verse with \beginverse* instead of \beginverse to create an unnumbered verse. This is often used for things that aren't really verses but should be typeset like a verse (e.g. intros, endings, and the like). A verse that starts with \beginverse* should still end with \endverse (not \endverse*). Within a verse or chorus you should enter one line of text for each line of lyrics. The environment of a verse or chorus behaves as though \obeylines is active, so a line break in the source document produces a line break in the resulting document. Lines that are too long to fit will be wrapped with a hanging indentation equal to \parindent. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\repchoruses |
Repeating Choruses. When making overhead slides, it is often convenient to repeat the song's chorus once on each page, so that the projector-operator need not flip back to the first slide each time the chorus is to be sung. You can say \repchoruses to automate this process. This will cause the first chorus in each song to be automatically repeated after the first verse on each subsequent page of the song (unless that verse is already immediately followed by a chorus). If the first chorus is part of a set of two or more consecutive choruses, then the whole set of choruses will be repeated. (A set of choruses is assumed to consist of things like pre-choruses that should always be repeated along with the chorus.) Choruses will not be automatically inserted immediately after unnumbered verses (i.e., verses that begin with \beginverse*). Unnumbered verses are assumed to be bridges or endings that aren't followed by a chorus. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\norepchoruses |
The above heuristics cover the common cases, but they obviously don't cover every case. Some songs have more complex forms that don't fit the typical verse, chorus, verse, chorus pattern. The \repchoruses feature will not always be able to automatically insert choruses properly in these unusual cases. The best alternative is usually a manual approach. Before a song with irregular form, say \norepchoruses to turn automatic chorus-repeating off. Then, at points within the song where you want a chorus to be repeated on the overhead slides, type a construction like, \ifslides \beginchorus ⋮ \endchorus \fi and copy and paste the desired chorus into the middle. This will insert a repeated chorus at that point when generating slides, but not when generating a lyric book or chord book. After the song is concluded, type \ifslides\repchoruses\fi to turn automatic chorus-repeating back on, if desired. 7.3 Chords | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\[ # & |
Between the \beginverse and \endverse lines, or between the \beginchorus and \endchorus lines, chords can be produced using the macro \[<chordname>]. Chords will only appear in chord books. The <chordname> can consist of arbitrary text. To produce sharp and flat symbols, use # and & respectively. Any text that immediately follows the \[] macro with no intervening whitespace will assumed to be the word or syllable that is to be sung as the chord is struck, and will therefore be typeset directly under the chord. For example:
If whitespace (a space or end-of-line) immediately follows, then the chord name will be typeset without any lyric text below it, denoting that the chord is to be struck between any surrounding words. For example:
If the lyric text that immediately follows the chord ends with another chord, and if the width of the chord name exceeds the width of the lyric text, then hyphenation is added automatically. For example:
Sequences of chords that sit above a single word can be written back-to-back with no intervening space, or as a single chord:
The only difference between the two examples above is that the chords in the first example can later be replayed separately (see section 7.4) whereas the chords in the second example can only be replayed as a group. You can explicitly dictate how much of the text following a chord macro is to appear under the chord name by using braces. To exclude text that would normally be drawn under the chord, use a pair of braces that includes the chord macro. For example:
(Without the braces, the syllables "ternal" would not be pushed out away from the chord.) This might be used to indicate that the chord transition occurs on the first syllable rather than as the second syllable is sung. Contrastingly, braces that do not include the chord itself can be used to include text under a chord that would otherwise be excluded. For example:
Without the braces, the word "eternal" would be pushed out away from the chord so that the chord would appear only over the partial word "th' ". But since in this case the words "the eternal" are supposed to be sung together as a single three-syllable word (as indicated by the apostrophe), it is proper for the chord to span both words together. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\DeclareLyricChar |
Symbols Under Chords. If you are typesetting songs in a language whose alphabet contains symbols
that LaTeX treats as punctuation, you may find yourself typing
a lot of braces to get those symbols to appear properly under chords.
Fortunately, there is a short-cut that can make this a lot easier.
The following command instructs the the s
Here, <token> must be a single TeX macro control sequence, active character, letter (something TeX assigns catcode 11), or punctuation symbol (something TeX assigns catcode 12). For example, by default,
because \dag is not recognized as an alphabetic symbol; but if you first type,
then instead you will get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\DeclareNonLyric |
Likewise, you can type
to reverse the above effect and force a token to be lyric-ending. Such tokens will be pushed out away from long chord names so that they never fall under a chord, and hyphenation will be added to the resulting gap. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\DeclareNoHyphen |
To declare a token to be lyric-ending but without the added hyphenation, use \DeclareNoHyphen{<token>} instead. Such tokens will be pushed out away from long chord names so that they never fall under the chord, and hyphenation will not be added to the resulting gap. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\MultiwordChords |
Extending Chords Over Adjacent Words. The \MultiwordChords macro forces multiple words to be squeezed under one chord by default. Normally a long chord that sits atop a short lyric pushes subsequent lyrics away to make room for the chord:
But if you first type \MultiwordChords, then instead you will get the more compact:
Authors should exercise caution when using \MultiwordChords because including many words under a single chord can often produce output that is ambiguous or misleading to musicians. For example,
This is probably not what the author intended. The three chords were all supposed to be played while singing the word "me", but the output makes it look like some chords fall on the following word "free". Liberal use of braces is therefore required to make \MultiwordChords produce good results, which is why it isn't the default behavior. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\shrp \flt |
Accidentals Outside Chords. Sharp and flat symbols can be produced with # and & when they appear explicitly in a chord name, but if you wish to produce those symbols in other parts of the document, you must use the \shrp and \flt macros. For example, to define a macro that produces a C# chord, use:
7.4 Replaying Chords | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
^ |
Many songs consist of multiple verses that use the same chords.
The s \beginverse \[G]This is the \[C]first \[G]verse. \endverse \beginverse The ^second verse ^ has the same ^chords. \endverse would produce
Normal chords can appear amidst replayed chords without disrupting the sequence of chords being replayed. Thus, a third verse could say, \beginverse The ^third verse ^has a \[Cm]new ^chord. \endverse to produce
Replaying works particularly well in conjunction with automatic transposition. See section 10 for an example. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\memorize |
By default, chords are replayed from the current song's first verse, but you can replay the chords of a different verse or chorus by saying \memorize at the beginning of any verse or chorus whose chords you want to later replay. This causes the chord sequence of the current verse or chorus to be memorized. Subsequent verses or choruses within the same song can use ^ to replay the new sequence. Selective Memorization. It is also possible to inject unmemorized chords into a memorized verse so that they will not be replayed. To suppress memorization of a chord, begin the chord's name with a hat symbol. For example, \beginverse\memorize The \[G]third \[C]chord will \[^Cm]not be re\[G]played. \endverse \beginverse When ^replaying, the ^unmemorized chord is ^skipped. \endverse would produce
This is useful when the first verse of a song has something unique, like an intro that won't be repeated in subsequent verses, but has other chords that you wish to replay. Memorizing Multiple Chord Sequences. By default, the s | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\newchords |
Memorized or replayed chord sequences can be stored in specific chord-replay registers. To declare a new chord-replay register, type
where <regname> is a unique alphabetic identifier. Once you've declared a register, you can memorize into that register by providing the <regname> as an optional argument to \memorize: \memorize[<regname>] Memorizing into a non-empty register replaces the contents of that register with the new chord sequence. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\replay |
To begin replaying chords from a particular register, type \replay[<regname>] Chord sequences memorized into registers declared with \newchords are global, which means you can memorize a chord sequence from one song and replay it in subsequent songs. You can also use \replay multiple times in the same verse or chorus to replay a sequence more than once. 7.5 Line and Column Breaks | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\brk |
Line Breaking. When lines of lyrics are too wide to fit in a single line, TeX will automatically choose a reasonable place to break the line, wrapping it onto the next physical line of the document. However, sometimes it is desirable to specifically choose where TeX will break a long line so as to make it easier to read and sing. By placing a \brk macro within a line of lyrics, you can determine where TeX will break and wrap that line if it is too wide to fit in a single line of the resulting song book document. For example,
would produce
Column Breaks Within Songs. The \brk macro can also be used on a line by itself within a verse or
chorus to suggest a page or column breakpoint if the verse or chorus is too
long to fit in a single column.
By default, the s Column Breaks Between Songs. The \brk macro can be used between songs to force a column break between songs. If the song set is being typeset in one column, \brk between songs forces a page break instead of a column break. When a partial list of songs is being extracted with \includeonlysongs, all \brk macros between songs will be ignored. To force a column-break at a specific point in a partial book, add the word brk at the corresponding point in the argument to \includeonlysongs. 7.6 Echoes and Repeats | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\echo |
Echo Parts. Some songs contain echo parts that should be typeset differently from normal lyrics. To typeset an echo part, use \echo{<lyrics and chords>}. Echo parts will be parenthesized and italicized. For example,
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\rep |
Repeated Lines. In other cases you might want to indicate that a line should be sung multiple times by all singers. To do so, put \rep{<n>} at the end of the line, where <n> is the number of times the line is to be repeated. For example,
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\lrep \rrep |
To indicate exactly where repeated parts begin and end, use \lrep and \rrep to create begin- and end-repeat signs. For example,
7.7 Measure Bars | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\measurebar | |
Measure bars can be added to chord books in order to help musicians keep time when playing unfamiliar songs. To insert a measure bar, type either \measurebar or type the vertical pipe symbol ("|"). For example,
In order for measure bars to be displayed, the showmeasures option must be enabled. Measure bars are only displayed by default in chord books. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\meter |
The first measure bar in a song will have meter numbers placed above it to indicate the time signature of the piece. By default, these numbers will be 4/4, denoting four quarter notes per measure. To change the default, type \meter{<n>}{<d>} somewhere after the \beginsong line of the song but before the first measure bar, to declare a time signature of <n> <d>th notes per measure. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\mbar |
You can also change meters mid-song either by using \meter in the middle of the song or by typing \mbar{<n>}{<d>} to produce a measure bar with a time signature of <n>/<d>. For example,
would produce
7.8 Textual Notes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\textnote \musicnote |
Aside from verses and choruses, songs can also contain textual notes that provide various helpful instructions to singers and musicians. To create a textual note that will be displayed in both lyric books and chord books, use:
To create a textual note that will be displayed only in chord books, use:
Both of these will create a shaded box containing <text>. For example,
would produce
Textual notes can be placed anywhere within a song, either within verses and choruses or between them. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\capo |
Guitar Capos. One special kind of textual note suggests to guitarists which fret they should put their capo on in order to put the song in a good key for singing. Macro \capo{<n>} should be used for this purpose. It normally has the same effect as \musicnote{capo <n>}; however, if the transposecapos option is active, then it will instead have the effect of \transpose{<n>}. See section 10 for more information on automatic chord transposition. 7.9 Index EntriesEvery song automatically gets entries in the current section's title index(es) for every title specified in the song's \beginsong line. However, you can also add extra index entries for a song to any index. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
index= |
Indexing Lyrics. For example, title indexes often have entries for memorable lines of lyrics in a song in addition to the song's title. You can add an index entry for the current song to the section's title index(es) by adding index={<lyrics>} to the song's \beginsong line. For example, \beginsong{Doxology} [index={Praise God from Whom all blessings flow}] would cause the song to be indexed both as "Doxology" and as "Praise God from Whom all blessings flow" in the section's title index(es). You can use index= multiple times in a \beginsong line to produce multiple additional index entries. Index entries produced with index={<lyrics>} will be typeset in an upright font instead of in italics to distinguish them from song titles. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ititle= |
Indexing Extra Song Titles. To add a regular index entry typeset in italics to the title index(es), use:
in the \beginsong line instead. Like index= keyvals, ititle= can be used multiple times to produce multiple additional index entries. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\indexentry \indextitleentry |
You can also create index entries by saying \indexentry[<indexes>]{<lyrics>} (which creates an entry like index=) or \indextitleentry[<indexes>]{<title>} (which creates an entry like ititle=). These two macros can be used anywhere between the song's \beginsong and \endsong lines, and can be used multiple times to produce multiple entries. Without the optional <indexes> argument, the new entry is added to all of the title indexes for the current songs environment. If specified, <indexes> is a comma-separated list of index identifiers. 7.10 Chords in LigaturesThis subsection covers an advanced topic and can probably be skipped by those creating song books for non-professional use. The \[ macro is the normal means by which chords should be inserted into a song; however, a special case occurs when a chord falls within a ligature. Ligatures are combinations of letters or symbols that TeX normally typesets as a single font character so as to produce cleaner-looking output. The only ligatures in English are: ff, fi, fl, ffi, and ffl. Other languages have additional ligatures like æ and œ. Notice that in each of these cases, the letters are "squished" together to form a single composite symbol. Normally, producing a ligature like "ffi" in TeX is easy: if you type "difficult" in your document, TeX will observe the letters ffi occurring in sequence, change them into a ligature, and produce "difficult" in the resulting document. But when a chord falls within a ligature, that process breaks down. For example, if you type \[Gsus4]dif\[G]ficult, then TeX produces "dif ficult" instead of difficult even in the unchorded lyric book. (The difference between the two is subtle, so you have to look closely to see it. Notice that there is a break between the f's in the first instance that isn't present in the second.) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\ch |
To place a chord within a ligature without breaking the ligature, use the \ch macro, which functions a lot like TeX's \discretionary macro does for hyphenation. The syntax is:
where <chord> is the chord text, <pre> is the text to appear before the hyphen if the ligature is broken by auto-hyphenation, <post> is the text to appear after the hyphen if the ligature is broken by auto-hyphenation, and <full> is the full ligature if it is not broken by hyphenation. If the ligature is broken by auto-hyphenation, the <pre> text falls before the chord and the <post> text falls under the chord. If the ligature is not broken by auto-hyphenation, the chord text appears over the middle of the <full> text. So for example, to correctly typeset \[Gsus4]dif\[G]ficult, in which the G chord falls in the middle of the "ffi" ligature, one should use:
This causes the "ffi" ligature to appear intact yet still correctly places the G chord over the second f. To use the \ch macro with a replayed chord name (see section 7.4), use ^ as the <chord>. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\mch |
The \mch macro is exactly like the \ch macro except that it also places a measure bar into the ligature along with the chord. For example,
places both a measure bar and a G chord after the first "f" in "difficult", yet correctly produces an unbroken "ffi" ligature in copies of the book in which measure bars are not displayed. In the unusual case that a meter change is required within a ligature, this can be achieved with a construction like:
The \meter macro sets the new time signature, which appears above the next measure bar—in this case the measure bar produced by the \mch macro. Chords and measure bars produced with ^ or | are safe to use in ligatures. So dif|^ficult requires no special treatment; it leaves the "ffi" ligature intact when measure bars are not being displayed. 8 Scripture QuotationsAside from songs, songs environments (see section 5) can also include scripture quotations. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\beginscripture \endscripture |
Starting a Scripture Quotation. A scripture quotation begins and ends with
where <ref> is a scripture reference that will be typeset at the end of the quotation. The <ref> argument should conform to the same syntax rules as for the <ref> arguments passed to \beginsong macros (see section 7). Between the \beginscripture and \endscripture lines, the text of the scripture quote should follow, which will be parsed in normal paragraph mode. For example:
would produce
Tuplets. If you are typesetting biblical poetry instead of prose, some extra constructs are required to typeset the text the way it appears in most bibles. Biblical poetry consists of tuplets—usually couplets and occasionally a triplet. The first line of each tuplet, called the "A-colon", is typeset flush with the left margin, while each additional line of the tupet, called the "B-colon", "C-colon", etc., is indented from the left margin. Any lines too long to fit are wrapped with double-width hanging indentation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\Acolon \Bcolon |
You can produce this style of output by beginning the first line of a tuplet with an \Acolon macro and each additional line with a \Bcolon macro. Each line of the tuplet will then appear on its own line in the resulting scripture quotation, with proper indentation and line wrapping. For example,
would produce
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\strophe |
Stanzas. Biblical poetry is often grouped into stanzas or "strophes", each of which is separated from the next by a small vertical space. You can create that vertical space by typing \strophe. For example,
would produce
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\scripindent \scripoutdent |
Indented Blocks. Some bible passages, such as those that mix prose and poetry, contain indented blocks of text. You can increase the indentation level within a scripture quotation by using \scripindent and decrease it by using \scripoutdent. For example,
would produce
9 Tablature Diagrams | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\gtab |
Guitar tablature diagrams can be created by using the construct
where the <fret> and <fingering> parts are both optional (and you can omit any colon that borders an omitted argument). <chord> is a chord name to be placed above the diagram. <fret> is usually omitted, but if the top row of the diagram is intended to represent a fret other than the first one, then <fret> should be the number of the fret it represents (any number from 2 to 9). <strings> should be a series of six symbols, one for each string of the guitar from lowest pitch to highest. Each symbol should be one of: X if that string is not to be played, 0 (zero or the letter O) if that string is to be played open, or one of 1 through 4 if that string is to be played on the given numbered fret. If X is used, that string will have an × placed above it in the tablature diagram. If 0 is used, that string will have an ○ placed above it in the tablature diagram. If one of 1 through 4 is used, that string will have a ● placed on it in the given numbered fret row of the diagram. <fingering> should either be empty if no fingering information is to be given, or it should likewise consist of a series of six symbols, one for each string of the guitar from lowest pitch to highest. Each symbol should be one of: 0 if no fingering information is to be displayed for that string (e.g., if the string is not being played or is being played open), or one of 1 through 4 to indicate that the given numbered finger is to be used to hold down that string. If <fingering> is provided, fingering numbers will be shown below each string of the resulting tablature diagram. Here are some examples to illustrate:
10 Automatic Transposition | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\transpose |
You can automatically transpose some or all of the chords in a song up by <n> half-steps by adding the line
somewhere between the song's \beginsong line and the first chord to be transposed. For example, if a song's first chord is \[D], and the line \transpose{2} appears before it, then the chord will appear as an E in the resulting document. Specifying a negative number for <n> will transpose subsequent chords down instead of up. The \transpose macro will affect all chords appearing after it until the \endsong line. If two \transpose macros appear in the same song, their effects will be cumulative. When the transposecapos option is active, the \capo macro acts like \transpose. See section 7.8 for more information. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\preferflats \prefersharps |
Enharmonics. When using \transpose to automatically transpose the chords of a song,
the s Modulated Verses. Automatic transposition can be used in conjunction with chord-replaying (see section 7.3) to produce modulated verses. For example, \beginverse\memorize \[F#]This is a \[B/F#]memorized \[F#]verse. \[E&7] \endverse \transpose{2} \beginverse ^This verse is ^modulated up two ^half-steps. \endverse produces
This works because memorization and replaying happen before transposition. That is, when memorizing and transposing chords at the same time, the chords are memorized as written, and then transposed chords are typeset. When replaying and transposing chords at the same time, transposition is applied to the untransposed chords that were memorized. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\trchordformat |
Multiple Keys. By default, when chords are automatically transposed using \transpose, only the transposed chords are printed. However, in some cases you may wish to cause both the old chords and the transposed chords to be printed side-by-side so that musicians playing differently-tuned instruments can play from the same piece of music. This can be achieved by redefining the macro \trchordformat{<old>}{<new>}, where <old> is the old chord name and <new> is the transposed chord name. For example, to print the old chord above the new chord above each lyric, define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\solfedge \alphascale |
Changing Note Names. In many countries it is common to use the solfedge names for the notes of the scale (LA, SI, DO, RE, MI, FA, SOL) instead of the alphabetic names (A, B, C, D, E, F, G). By default, the transposition logic only understands alphabetic names, but you can tell it to look for solfedge names by typing \solfedge. To return to alphabetic names, type \alphascale. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\notenames |
You can use other note names as well. To define your own note names, type
where each of <nameA> through <nameG> must consist entirely of a sequence of one or more uppercase letters. For example, some solfedge musicians use TI instead of SI for the second note of the scale. To automatically transpose such music, one should type:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\notenamesin \notenamesout |
The s
The syntaxes of \notenamesin and \notenamesout are identical to that of \notenames (see above), except that the arguments of \notenamesout can consist of any LaTeX code that is legal in horizontal mode, not just capital letters. To stop converting between note names, use \alphascale, \solfedge, or \notenames to reset all note names back to identical input and output scales. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\transposehere |
Transposing Chords In Macros. The automatic transposition logic won't find chord names that are hidden inside macro bodies. For example, if you abbreviate a chord by typing,
then the \transpose macro will fail to transpose it; the resulting chord will still be an F#sus4/C# chord. To fix the problem, you can use \transposehere in your macros to explicitly invoke the transposition logic on chord names embedded in macro bodies. The above example could be corrected by instead defining:
11 Customizing the BookThe default appearance of a song book can be customized in a variety of ways, detailed below. 11.1 Song and Verse NumberingSong numbering in each song section, and verse numbering in each song, are each controlled in similar ways: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
songnum |
Song Numbering. The songnum counter defines the next song's number. It is set to 1 at the beginning of a songs environment and is increased by 1 after each \endsong. It can be redefined anywhere except within a song. For example,
would set the next song's number to be 3. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\thesongnum |
You can change the song numbering style for a song section by redefining \thesongnum. For example, to cause songs to be numbered in uppercase roman numerals, define
The expansion of \thesongnum must always produce plain text with no font formatting or unexpandable macro tokens. The text produced by \thesongnum will be exported to auxiliary index generation files where it will be lexigraphically sorted and undergo other processing. Any \ref that refers to a \label that appears within a song (but outside a numbered verse) will yield that song's number as typeset by \thesongnum. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\printsongnum |
To change the formatting of song numbers as they appear at the beginning of each song, you should instead redefine the \printsongnum macro, which expects the text yielded by \thesongnum as its only argument. For example, to typeset song numbers in italics, define
Note that \printsongnum will not affect the typesetting style for song numbers displayed elsewhere, such as in indexes; it only affects how song numbers are rendered at the beginning of each song. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songnumwidth |
The \songnumwidth length defines the width of the shaded boxes that contain song numbers at the beginning of each song. For example, to make each such box 2 centimeters wide, you could define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
versenum |
Verse Numbering. The versenum counter defines the next verse's number. It is set to 1 after each \beginsong line and is increased by 1 after each \endverse (except if the verse begins with \beginverse*). The versenum counter can be redefined anywhere within a song. For example,
would set the next verse's number to be 3. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\theversenum |
You can change the verse numbering style by redefining \theversenum. For example, to cause verses to be numbered in uppercase roman numerals, define
The expansion of \theversenum should always produce plain text with no font formatting or unexpandable macro tokens. Any \ref that refers to a \label that appears within a numbered verse will yield that verse's number as typeset by \theversenum. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\printversenum |
To change the formatting of verse numbers as they appear at the beginning of each verse, you should instead redefine the \printversenum macro, which expects the text yielded by \theversenum as its only argument. For example, to typeset verse numbers in italics, define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\versenumwidth |
The \versenumwidth length defines the horizontal space reserved for verse numbers to the left of each verse text. Verse text will be shifted right by this amount. For example, to reserve half a centimeter of space for verse numbers, define
You can set \versenumwidth to a size less than the space taken up by some or all of the verse numbers. Doing so will cause the first line of the verse to be sufficiently indented to make room for the verse number, but the rest of the lines of the verse will only be indented by \versenumwidth. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\noversenumbers |
To turn off verse numbering entirely, use \noversenumbers. This is equivalent to saying
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\placeversenum |
The horizontal placement of verse numbers within the first line of each verse is controlled by the \placeversenum macro. By default, each verse number is placed flush-left. For more information, consult the implementation section of the pdf documentation. 11.2 Song Appearance | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\lyricfont |
Font Selection. By default, lyrics will be typeset using the document-default font (\normalfont) and with the document-default point size (\normalsize). You can change these defaults, however, by redefining \lyricfont. For example, to cause lyrics to be typeset in small sans serif font, you could define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\stitlefont |
Song titles are typeset in a sans-serif, slanted font by default (sans-serif, upright if producing slides). You can change this default by redefining \stitlefont. For example, to cause titles to be typeset in a roman font, you could define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\versefont \chorusfont |
You can apply additional font changes to verses and choruses by redefining \versefont and \chorusfont. For example, to typeset choruses in italics, you could define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\printchord |
By default, chords will be typeset in sans serif oblique (slanted) font. You can customize chord appearance by redefining \printchord, which accepts the chord text as its sole argument. For example, to cause chords to be printed in roman boldface font, you could define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\everyverse \everychorus |
Verse and Chorus Titles. The \everyverse macro is executed at the beginning of each verse, and \everychorus is executed at the beginning of each chorus. Thus, to begin each chorus with the word "Chorus:" one could type,
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\versesep |
Spacing Options. The vertical distance between song verses and song choruses is defined by the skip register \versesep. For example, to put 12 points of space between each pair of verses and choruses, with a flexibility of plus or minus 2 points, you could define \versesep=12pt plus 2pt minus 2pt | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\baselineadj |
The vertical distance between the baselines of consecutive lines of
lyrics is computed by the s \baselineadj=-1pt plus 1pt minus 0pt | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\cbarwidth |
The width of the vertical line that appears to the left of choruses is controlled by the \cbarwidth length. To eliminate the line entirely (and the spacing around it), you can set \cbarwidth to 0pt:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\sbarheight |
The height of the horizontal line that appears between each pair of songs is controlled by the \sbarheight length. To eliminate the line entirely (and the spacing around it), you can set \sbarheight to 0pt:
Song Top and Bottom Material. Minor changes to the appearance of the header and footer material that precedes and concludes each song can be effected by redefining \extendprelude and \extendpostlude. In these macros, the macros documented in section 12 can be used to print various song information, such as \songauthors, \songrefs, \songcopyright, and \songlicense. In addition, \showauthors and \showrefs can be used to display author and scripture reference information as a pre-formatted paragraph the way it appears in the default song header blocks. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\extendprelude \showauthors \showrefs |
By default, \extendprelude displays the song's authors and scripture references using the macros \showauthors and \showrefs. The following definition would change it to also print information about a song translator:
This would print the same translator for every song. A more flexible solution might define a new \beginsong keyval via which a different translator could be specified for each song. See section 11.8 for how to do this. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\extendpostlude |
By default, \extendpostlude prints the song's copyright and licensing information as a single paragraph using \songcopyright and \songlicense. The following definition would change it to also print the words "Used with permission" at the end of every song's footer information:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\makeprelude \makepostlude |
For complete control over the appearance of the header and footer material
that precedes and concludes each song, you can redefine the macros
\makeprelude and \makepostlude.
When typesetting a song, the s | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\vvpenalty \ccpenalty \vcpenalty \cvpenalty |
Page- and Column-breaking. Page-breaking and column-breaking within songs that are too large to fit in a single column/page is influenced by the values of several penalties. Penalties of value \vvpenalty, \ccpenalty, \vcpenalty, and \cvpenalty are inserted into each song between consecutive verses, between consecutive choruses, after a verse followed by a chorus, and after a chorus followed by a verse, respectively. The more negative the penalty, the more likely TeX is to place a page- or column-break at that penalty. If any are set to -10000 or lower, a break will be forced there. By default, all are set to -100 so that breaks between verses and choruses are preferred over breaks within choruses and verses, but are not forced. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\sepverses |
Saying \sepverses sets all of the above penalties to -10000 except for \ccpenalty which remains set to -100. This is useful in slides mode because it forces each verse and chorus to be typeset on a separate slide, except for consecutive choruses, which remain together when possible. (This default reflects an expectation that consecutive choruses typically consist of a pre-chorus and chorus that are always sung together.) These defaults can be changed by changing the relevant penalty register directly. For example, to force a page- or column-break between consecutive choruses, type \ccpenalty=-10000 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\spenalty |
The value of \spenalty controls whether multiple songs are allowed to appear in a single column/page. Values higher than -10000 allow multiple songs; other values cause each song to be started on a fresh column/page. The default is 0, except when producing slides when the default is -10000. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\versejustify \chorusjustify |
Text Justification. Various parameters affecting the justification of verses and choruses are controlled by macros \versejustify and \chorusjustify, respectively. By default, both typeset paragraphs ragged-right with hanging indentation, and they introduce space at the left margin for verse numbers and the vertical bar shown to the left of choruses. In slides mode, they are redefined to center all lyrics. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\justifyleft \justifycenter |
To force verses or choruses to be left-justified or centered, set \versejustify or \chorusjustify equal to \justifyleft or \justifycenter, respectively. For example, to cause choruses to be centered, one could type:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\notejustify |
Justification of textual notes too long to fit on a single line is controlled by the \notejustify macro. By default, it sets up an environment that fully justifies the note (i.e., all but the last line of each paragraph extends all the way from the left to the right margin). For more information, consult the implementation section of the pdf documentation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\placenote |
A textual note that is shorter than a single line is placed flush-left by default, or is centered when in slides mode. This placement of textual notes is controlled by \placenote. For more information, consult the implementation section of the pdf documentation. 11.3 Scripture Appearance | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\scripturefont |
By default, scripture quotations will be typeset in Zaph Chancery font with the document-default point size (\normalsize). You can change these defaults by redefining \scripturefont. For example, to cause scripture quotations to be typeset in sans serif italics, you could define:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\printscrcite |
By default, the citation at the end of a scripture quotation will be typeset in sans serif font at the document-default point size (\normalsize). You can customize the appearance of the citation by redefining \printscrcite, which accepts the citation text as its sole argument. For example, to cause citations to be printed in roman italics font, you could define
11.4 Conditional BlocksThe s | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\if... |
A conditional block begins with a macro named \if<type>, where <type> is one of the types listed in the first column of the following Table:
The conditional block concludes with the macro \fi. Any material between the \if<type> and the \fi will be processed only if the condition in the second column of the table is true. Between the \if<type> and the \fi may also appear an \else. When \else is used, then the material between the \else and the \fi will only be processed if the condition in the second column is false. For example, in the construction \ifchorded <A> \else <B> \fi material <A> is only included if the chorded option is active, and material <B> is only included if the chorded option is not active. The conditional blocks described above will work fine most places, but if they begin within a verse or chorus, then problems can result. In that case TeX may complain of a "runaway argument" because end-of-line has a special meaning within verses and choruses (it is \outer) that TeX disallows within conditional blocks. For more information, consult the implementation section of the pdf documentation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\begin...only \end...only |
To avoid this problem, start the conditional block with \begin<type>only instead of \if<type>. The conditional block must end with an \end<type>only (with the same <type>) instead of a \fi. For example: \beginchordedonly ⋮ \endchordedonly produces a conditional block that will only be processed if the chorded option is in effect. These conditionals can be used anywhere, not just within verses or choruses, but they have the limitation that they cannot contain an \else. (Keep reading for a way to work around this limitation, though.) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\begin...never \end...never |
You can create inverses of all the conditionals listed in the following Table:by substituting never for only in the macro names described in the previous paragraph. For example, \beginslidesnever ⋮ \endslidesnever produces a conditional block that will only be processed if the slides option is not in effect. This means that you can simulate an \if...\else...\fi construction by using two consecutive blocks with opposite conditions. For example, \beginslidesonly ⋮ \endslidesonly \beginslidesnever ⋮ \endslidesnever is the same as \ifslides...\else...\fi, but it is safe to use within a verse or chorus. 11.5 Indexes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\indexsongsas |
Index Appearance. By default, the right-hand side of each index entry contains a list of one or more song numbers. To instead list page numbers, use the \indexsongsas macro:
where <id> is the same identifier used in the \newindex, \newauthorindex, or \newscripindex macro that created the index. The second argument must always be something that expands into raw text without any formatting, since this text gets output to auxiliary files that are lexographically sorted by the index-generation program. To go back to indexing songs by song number, use \thesongnum in place of \thepage in the above. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxrefsfont |
To control the formatting of the list of references on the right-hand side of index entries, redefine \idxrefsfont. For example, to typeset each list in boldface, write
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxtitlefont \idxlyricfont |
Title indexes contain entries for song titles and also entries for notable lines of lyrics. The fonts for these entries are controlled by \idxtitlefont and \idxlyricfont, respectively. For example, to show title entries in boldface sans-serif and lyric entries in regular roman font, one could define:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxheadfont |
To change the font used to typeset the capital letters that start each alphabetic section of a large title index, redefine \idxheadfont. For example, to typeset those letters in italics instead of boldface, type
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxheadwidth |
The \idxheadwidth length defines the width of the shaded boxes that begin each alphabetic block of a large title index. For example, to set the width of those boxes to 1 centimeter, you could define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxauthfont |
The font used to typeset entries of an author index is controlled by \idxauthfont. For example, to typeset such entries in italics instead of boldface, type
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxscripfont |
The font used to typeset entries of a scripture index is controlled by \idxscripfont. For example, to typeset such entries in boldface instead of italics, type
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxbook |
To control the formatting of the lines that start each new book of the bible in a scripture index, redefine \idxbook, which accepts the book name as its single argument. For example, to typeset each book name in a box, one could define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxcont |
In a scripture index, when a column break separates a block of entries devoted to a book of the Bible, the new column is titled "<bookname> (continued)" by default. You can change this default by redefining the \idxcont macro, which will receive the <bookname> as its single argument. For example, to typeset an index in German, one might define
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\titleprefixword |
Alphabetization Options. In English, when a title begins with "The" or "A", it is traditional to move these words to the end of the title and sort the entry by the following word. So for example, "The Song Title" would be indexed as "Song Title, The". To change this default behavior, you can use \titleprefixword in the document preamble to define each word that will be moved to the end whenever it appears as the first word of a title index entry. For example, to cause the word "I" to be moved to the end of title index entries, one could say,
The first use of \titleprefixword overrides the defaults, so if you also want to continue to move "The" and "A" to the end of entries, you must also say \titleprefixword{The} and \titleprefixword{A} explicitly. This macro may only be used in the document preamble. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\authsepword |
Special Words In Song Info. When parsing author index entries, the word "and" is recognized by the songidx program as a conjunctive that separates author names. To override this default and specify a different conjunctive, use the \authsepword macro one or more times in the document preamble. For example, to instead treat "und" as a conjunctive, you could say,
The first use of \authsepword overrides the default, so if you also want to continue to treat "and" as a conjunctive, you must also say \authsepword{and} explicitly. The \authsepword macro may only be used in the document preamble. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\authbyword |
When parsing author index entries, the word "by" is recognized as a keyword signaling that the index entry should only include material in the current list item that follows the word "by". So for example, "Music by J.S. Bach" would be indexed as "Bach, J.S." rather than "Bach, Music by J.S." To recognize a different word instead of "by", you can use \authbyword in the document preamble. For example, to recognize "durch" instead, you could say
The first use of \authbyword overrides the default, so if you also want to continue to treat "by" as a keyword, you must also say \authbyword{by} explicitly. The \authbyword macro may only be used in the document preamble. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\authignoreword |
When parsing author index entries, if a list item contains the word "unknown", that item is ignored and is not indexed. This prevents items like "Composer unknown" from being indexed as names. To cause the indexer to recognize and ignore a different word, you can use the \authignoreword macro in the document preamble. For example, to ignore author index entries containing the word "unbekannt", you could say,
The first use of \authignoreword overrides the default, so if you also want to continue to ignore list items containing the word "unknown", you must also say \authignoreword{unknown} explicitly. The \authignoreword macro may only be used in the document preamble. 11.6 Column Balancing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\colminheight |
Each column in a two-column song book is vertically stretched to be at least as high as the value of length \colminheight. In lyric books, \colminheight is set by default to be the value of \textheight. This has the effect of making every column exactly \textheight high. In chorded books, \colminheight defaults to 0pt, causing each column to be typeset at its natural height without any stretching. You can change the value of \colminheight to force a different amount of column stretching. For example, if you set
then each column will be at least 9 inches high with a possible extra 0.5 inches of space to accommodate columns that are slightly larger. 11.7 Page Headers and FootersIn LaTeX, page headers and footers are defined using a system of
invisible marks that get inserted into the document at the
beginning of each logical unit of the document (e.g., each section, song,
verse, and chorus).
The headers and footers are then defined so as to refer to the first
and/or last invisible mark that ends up on each page once the document
is divided into pages.
This section describes the marks made available by the s | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songmark \versemark \chorusmark |
If you want to add song information to page headings and footers, you can redefine \songmark, \versemark, or \chorusmark to add the necessary TeX marks to the current page whenever a new song, verse, or chorus begins. These macros expect no arguments; to access the current song's information including titles, use the macros documented in section 12. To access the current song's number or the current verse's number, use \thesongnum or \theversenum (see section 11.1). For example, to include the song number in the page headings produced by LaTeX's \pagestyle{myheadings} feature, you could redefine \songmark as follows:
11.8 Defining New Beginsong Keyvals | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\newsongkey |
The \beginsong macro supports several optional keyval parameters for declaring song information, including by=, sr=, and cr=. Users can define their own additional keyvals as well. To do so, use the \newsongkey macro, which has the syntax
Here, <keyname> is the name of the new key for the keyval, <initcode> is LaTeX code that will be executed at the start of each \beginsong line before the \beginsong arguments are processed, <default> (if specified) is the default value used for the keyval when <keyname> appears in \beginsong without a value, and <setcode> is macro code that will be executed whenever <key> is parsed as part of the \beginsong keyval arguments. In <setcode>, #1 will expand to the value given by the user for the keyval (or to <default> if no value was given). For example, to define a new song key called arr which stores its value in a macro called \arranger, one could write:
Then one could redefine \extendprelude to print the arranger below the other song header information:
A \beginsong line could then specify the song's arranger as follows: \beginsong{The Title}[arr={R. Ranger}] ⋮ \endsong This would produce
For more detailed information about keyvals and how they work, the reader is advised to consult the documentation for David Carlisle's keyval package, which should come standard with most LaTeXe installations. 11.9 Font Kerning Corrections | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\shiftdblquotes |
Scripture Font Quotation Marks. The Zaph Chancery font, used by default to typeset scripture quotations, seems to have some kerning problems with its double-quote ligatures. In particular, every left double-quote and right-double quote seems to have about 1.1pt and 2pt of extra space, respectively, to its left (to my eye). This causes left double-quotes appearing at the left margin to appear indented, and it causes right double-quotes to appear spaced out to the right of the quoted text they finish. Rather than redefine the font metrics (which would complicate the installation of this software), the \shiftdblquotes macro can be used to adjust the spacing around all double-quote ligatures until the current scoping group ends. The syntax is:
where all four parameters are lengths. The effect is to insert <ldqleft> and <ldqright> extra space to the left and right of all left double-quote ligatures, and insert <rdqleft> and <rdqright> extra space to the left and right of all right double-quote ligatures. To correct the kerning of the double-quote ligatures in the Zaph Chancery font, the \scripturefont macro invokes
Unless you use other fonts that also have this problem, or you use an unusual point size for Zaph Chancery that necessitates a different kerning correction, the user probably shouldn't need to use this macro explicitly. Chord Overstriking. In order to conserve space and keep songs readable, the s
Note that the parentheses and slash symbols in the chord name have invaded the lyric that sits beneath them. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\chordlocals |
A little bit of overstriking is definitely preferable to raising chord names higher (which would make songs more difficult for musicians to read and play), but book-makers with a penchant for high-quality typesetting might desire a better solution. The best solution is to use a font for chord names that minimizes low-hanging symbols; but if you lack such a font, then the following trick works pretty well. Somewhere in the preamble of your document, you can write the following LaTeX code:
This sets the /, (, and ) symbols as active characters whenever they appear within chord names. For more information, consult the implementation section of the pdf documentation. Each active character is defined so that it produces a smaller, raised version of the original symbol. The result is as follows:
As you can see, the low-hanging symbols have been elevated so that they sit above the baseline, correcting the overstrike problem. 12 Informational MacrosThe macros described in this section can be used to retrieve information about the current song. This can be used when redefining \makeprelude, \makepostlude, \songmark, and other macros that should typeset this information. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songauthors |
To get the current song's list of authors (if any) use \songauthors. This yields the value of the by= key used in the \beginsong line. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songrefs |
To get the current song's list of scripture references (if any) use \songrefs. The result of \songrefs will not yield exactly what was used in the sr= keyval of the \beginsong line; some preprocessing is done first. In particular, hyphens have been changed to en-dashes and spaces that fall within a list of verse numbers have been changed to thin spaces. In addition, various penalties have been added to inhibit line breaks in strange places and encourage line breaks in others. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songcopyright |
To get the current song's copyright info (if any), use \songcopyright. This yields the value of the cr= key used in the \beginsong line. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songlicense |
To get the current song's licensing information (if any), use \songlicense. This yields the value of the li= key used in the \beginsong line, or whatever text was last declared with \setlicense. Since songs can have any number of titles, getting the current song's title requires something more sophisticated than a single macro. The following macros describe how to get each of a song's titles in turn. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songtitle |
The \songtitle macro yields the current song's title. By default this is the first title provided in the \beginsong line. The \nexttitle and \foreachtitle macros (see below) cause it to be set to the current song's other titles, if any. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\resettitles |
To get the current song's primary title (i.e., the first title specified in the song's \beginsong line), execute \resettitles. This sets the \songtitle macro to be the song's primary title. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\nexttitle |
To get the song's next title, you can execute \nexttitle, which sets \songtitle to be the next title in the song's list of titles (or sets \songtitle to \relax if there are no more titles). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\foreachtitle |
Using \nexttitle in a \loop construction suffices to get all of a song's titles, but in the common case that you just want to get all of of the titles in sequence, there is an easier way. The \foreachtitle macro accepts a chunk of LaTeX code as its single argument and executes it once for each (remaining) song title. Within the code chunk, use \songtitle to get the current title. For example, the following code would generate a comma-separated list of all of the current song's titles: \resettitles \songtitle \nexttitle \foreachtitle{, \songtitle} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\songlist |
When \includeonlysongs is used to extract a partial list of songs, the \songlist macro expands to the comma-separated list of songs that is being extracted. Redefining \songlist within the document preamble will alter the list of songs to be extracted. Redefining it after the preamble may have unpredictable results. 13 Index GenerationThe material in this section describes macros provided by the s Automatic generation of song book indexes is a three stage process:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
idxblock |
In indexes that are blocked off into sections, one for each letter of the alphabet, the <filename>.sbx files generated for that index will consist of a series of idxblock environments, one for each such section. An idxblock environment begins with
where <letter> is the letter of the alphabet for that block. An idxblock environment ends with \end{idxblock}. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
\idxentry \idxaltentry |
The <filename>.sbx files generated for each index will contain a series of lines of the form
each of which creates an index entry with <leftside> on the left, followed by a series of dots, followed by <rightside> on the right. The \indexentry is used for "normal" entries (e.g., titles in a title index), and \indexaltentry is used for "alternate" entries (e.g., lyric lines in a title index). Within <rightside>, multiple items are separated with \\ macros instead of commas. When used in an index .sbx file, the \\ macro will produce a comma followed by some complex spacing that allows index lines to be broken suitably if they are too long to fit in one physical line. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 Other ResourcesThere are a number of other LaTeX packages available for typesetting songs, tablature diagrams, or song books. Probably the best of these is the Song♭ook package by Christopher Rath (http://rath.ca/Misc/Songbook). Most of the differences between that package and this one are intentional; the following is a summary of where I've adopted various differing design decisions and why. Ease of Song Entry. In designing the s First, macros in the standard LaTeX package syntax take longer to
type than macros in the s Second, the standard LaTeX macro syntax isn't really suited to typesetting
chords because it is extremely difficult for the user to know what exactly
should go in the <lyric> part of the macro.
Chords don't always lie above entire words; they often lie above only a
syllable of a word, or they might lie above both a word and the punctuation
that follows it.
This means that in order to type chords correctly in a standard
LaTeX macro format, a user must conform to some very unintuitive and
complex style rules.
For example, typing \Ch{C}{difficult!} and \Ch{C}{diffi}cult! and
\Ch{C}{difficult}! all typically produce different results,
each of which are undesirable for different reasons in different situations.
The user must learn when to use which, and often must experiment to
discover which works and which doesn't in any given situation.
In contrast, in the s Third, proper hyphenation is a significant challenge when
typesetting song books.
Extra hyphenation must usually appear in chord books wherever a chord
is wider than the syllable it sits above.
Such hyphenation should be omitted in lyric-only versions of the book
since those versions lack chords, so the hyphenation would be superfluous
and odd-looking.
Packages that use a standard LaTeX macro syntax for chords require
the user to manually identify places where extra hyphenation will be
necessary and type something special in those places to make chord books
look right.
This can be very difficult for the user because it isn't usually possible
to predict the need for hyphenation in advance.
The user must therefore proof the chord book very carefully to
identify and correct any hyphenation errors.
In contrast, the macro syntax used by the s One final difference between the chord-entry syntax used by the
s Song Structure. The s Stylistic Differences. The s Indexes. Another major feature of the s Automatic Transposition. The s The s For information on more song-typesetting resources for LaTeX, I recommend consulting the documentation provided with the Song♭ook package. It includes an excellent list of other resources that might be of interest to creators of song books. 15 GNU General Public LicenseThis software is covered under version 2.0 of the GNU General Public License. A copy of the license is provided online at the Free Software Foundation website. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||