Creating a Songbook

The document_class and book_... directives can be placed anywhere in the Chord file, though it is usefull to place them at the beginning :-).

document_class

The document_class directive specifies the type of document you get. There are two possible values:

Example 5-9. Directive document_class

{document_class:book}

The value book produces

book_title, book_author, book_date

These three directives describe the content of the title page.

Example 5-10. Directive book_title, book_author, book_date

{book_title:My Favourite Songs}
{book_author:My Name}
{book_date:September 2000}

The value given in the book_title directive appears in the headlines on even pages.

chapter

If the document_class is book, you can section the document with the chapter directive. A chapter title page is inserted at the occurance of the directive.

Example 5-11. Directive chapter

{chapter:Beatles}

The chapter name appears in the table of contents and also in the headlines on odd pages.

include

If you have a collection of chord files you may want to create a songbook (or even several different songbooks) without merging all songs to one single file. Merging all files has some disadvantages, e.g. transposing one single song is no longer possible. With the include directive you may leave all files as they are. Just create a songbook file and include the files you want.

Example 5-12. Directive include

{document_class:book}
{book_title:}
{chapter:Name of chapter 1}
{include:song file 1}
{include:song file 2}
{chapter:Name of chapter 2}
{include:song file 3}
{include:song file 4}

In the example four song files are merged to a songbook with two chapters.

even

The directive even makes the piece begin on the next left page. In a book this is useful for preventing a page turn in an two-page piece. The directive must be placed before the title directive in order to work correctly.

Example 5-13. Directive even

{even}
{title:Proud Mary}
{st:Creedence Clearwater Revival 1972}