Footers

A footer can be printed on the Printer, Full Screen and HTML output destinations. The footer text can be set separately for all of these output destinations on their respective property pages in the Options Dialog.

The behavior of the footer is limited or changes in certain ways depending on the output destination, as follows:

Printer
The footer text will appear at the bottom of the physical printed page, but this can be changed for the Two and Four Discrete Cells per Page layouts, because the "Physical page numbering only" checkbox controls page numbering and the footer, too:
When this box is checked, footers and page numbers will apply only to physical pieces of paper. That is, in the Two and Four Discrete Cells per Page layouts, only one footer will be printed, at the bottom of the page. Additionally, a physical piece of paper counts as just one page number.
When this box is not checked, footers and page numbers apply to each cell in the Two and Four Discrete Cells per Page layouts. This can be used to create a half-page-sized songbook; each cell receives its own footer and page number.
The font and its style can be set in the printer Font Dialog. The text is automatically placed a small amount inside the top of the bottom margin area, and will wrap as needed.
HTML
The HTML footer appears at the end of the HTML <body>. Its appearance is controlled by the {sg_footer} style tag. The page number (%p) and total number of pages (%n) control codes do not function in this mode.
Full Screen
In Full Screen Presentation, the footer always appers at the bottom of the screen. The font and its style can be set in the Full Screen Font Dialog.
The page number (%p) and total number of pages (%n) control codes do not function in this mode. If the control icons are shown, it is possible that left- and right-justified footer elements might overlap the control icons. The footer text should wrap to fit on the screen, as needed.

Control Codes

Any text can be used, but the following control codes can also be used to format the footer:
CodeDescriptionExample Output
%l (lowercase 'L')Left-justify text following (printer & full screen only)
%cCenter-justify text following (printer & full screen only)
%rRight-justify text following (printer & full screen only)
%pCurrent page number
%nTotal number of pages
%PCurrent page number of song.
%NTotal number of pages of song.
%tSong titleMy Song
%TSong title, with subtitle, if it exists (in parenthesis)My Song (Reprise)
%sSong subtitle.Reprise
%fSong filenamemy_song.txt
%FSong filename (complete path)C:\songs\my_song.txt
%xSong transpose (in half-steps; if the value is zero: nothing, not even a blank, will be printed).+3
%kSong key (transposition will apply).
%k-nnth key signature in the song (transposition will apply).
%dyTwo-digit representation of current year04
%dYFour-digit representation of current year2004
%dmNumeric representation of current month, with leading zeros01 to 12
%dnNumeric representation of current month, without leading zeros1 to 12
%dMShort textual representation of current month, three lettersJan to Dec (localized)
%dFFull textual representation of current monthJanuary to December (localized)
%ddCurrent day of the month, 2 digits, with leading zeros01 to 31
%djCurrent day of the month, 2 digits, without leading zeros1 to 31
%dDShort textual representation of the current day of the weekSun through Sat (localized)
%dl (lowercase 'L')Full textual representation of the current day of the weekSunday through Saturday (localized)
%drRFC 2822 formatted dateThu, 21 Dec 2000 16:01:07 +0200
%’abcData key value (abc is a key; xyz, its value, will be printed). Note: the quotes are required!
%?jkl"xyz"Value query jkl is a format code; if the value of jkl is not empty, then xyz will be evaluated and printed; xyz may contain nested format codes). Note: the quotes are required!
%?!jkl"xyz"Value query (negative) jkl is a format code; if the value of jkl is empty, then xyz will be evaluated and printed; xyz may contain nested format codes). Note: the quotes are required!
%%Percent sign ('%')

Formatting Examples

Here are some examples of standard footer formatting:
Footer TextOutput Result
%cPage %p of %nPage 3 of 5 (centered)
%l%dy‑%dm‑%dd%cCCLI#666‑666%r(%f) 04‑02‑20 (left‑justified)   CCLI#666‑666 (centered)   (my_song.txt) (right‑justified)

Per-Song Footer Override

The footer text is normally set in the Options Dialog, but it can be overridden on a per-song basis by adding a special directive to the song file, as follows:

{footer: xyz}

This directive will cause the footer text to always be set to xyz for the given song. The same footer syntax can be used in xyz as can be used in the footer in the Options Dialog.

Multiple Key Signatures

If a song defines multiple key signatures, the various key signatures may be printed by using the key signature code followed by a dash and the 1-based index of the key signature in the song: %k-1 prints out the first key signature in the song, %k-2 prints out the second key signature in the song, and so on. %k-1 produces the same result as %k.

Conditional Formatting

The %? and %?! codes provide special functionality. These codes will query the value that immediately follows them, and optionally print some footer text. The code %?jkl"xyz" will print the text xyz only if the value of jkl is not empty. That is to say: if jkl exists, then xyz will be printed.
The code %?!jkl"xyz" will print the text xyz only if the value of jkl is empty.
The text xyz may contain nested formatting codes, too.

Conditional formatting allows some interesting footers based on certain aspects of the song (for instance, transposition).

Conditional Formatting Examples

Here are some conditional formatting examples:
Footer TextOutput Result
%?x"Transpose: %x"Transpose: +3 (if the transpose value is 3)
     (nothing—blank—if the transpose value is 0)
%?!x"Original key"    (nothing—blank—if the transpose value is 3)
 Original key (if the transpose value is 0)
%l%dy‑%dm‑%dd%cCCLI#666‑666%r(%f) 04‑02‑20 (left‑justified)   CCLI#666‑666 (centered)   (my_song.txt) (right‑justified)