Search:   Help



LyX documentation


Shared groups



Categories: Tag me, Layouts
<< | Page list | >>

Layout for the documentclass songbook

Table of contents (hide)

  1.   1.  Description
  2.   2.  Installation
    1.   2.1  Download and install the Songbook-package:
    2.   2.2  Download and install the LyX-files
    3.   2.3  Keyboard bindings and icons
  3.   3.  Notes
    1.   3.1  Bugs
  4.   4.  Contributors
  5.   5.  Copyright

1.  Description

The Songbook [] style by Christopher Rath allows you to typeset songs with chords in LaTeX. I've created some files so that you can use this more easily within LyX.

See these screenshots:

Below is an image of only the part of the LyX-window with a verse in it and the icon you can click on to add a chord.

2.  Installation

These are the installation notes for the documentclass Songbook and corresponding LyX files.

2.1  Download and install the Songbook-package:

  1. You can do a full installation of Songbook by downloading one of the following archives (about 1 MB):
    - uploads:/Layouts/Songbook/SongbookRelease-4.0.tar.gz
    Note that Songbook-4.0.tar.gz is just a repackaged version of SongbookRelease-4.0.tar.gz that I created since the latter archive didn't extract to a subdirectory (very annoying).
    If you only need a minimal installation (without any documentation!), just download uploads:/Layouts/Songbook/songbook.sty and uploads:/Layouts/Songbook/conditionals.sty.
  2. Install the LaTeX package by copying the files songbook.sty and conditionals.sty to somewhere where LaTeX (and LyX) can find them. This can for instance be in the catalog where you are going to work, or in a catalog specified by the environment variable $TEXINPUTS.

2.2  Download and install the LyX-files

  1. Download uploads:/Layouts/Songbook/Songbook_lyx.tar.gz and extract it either in your personal .lyx-directory, or to where the shared LyX-files are installed (e.g. /usr/local/share/lyx). This directory will be referred to as LYX from now on.
  2. Reconfigure LyX and check that LyX has found the songbook package, e.g. if you enter this at the command line: lyx -x reconfigure
    then one of the output lines should look like this
    +checking for document class songbook [book]... yes

Now you can restart LyX and open a document based on the template LYX/templates/songbook.lyx. You should also be able to build and view this file as DVI. Finally, you might want to have a look at the example: LYX/examples/songbook.lyx.

2.3  Keyboard bindings and icons

Additionally, you may want to use the keyboard binding and icon.

  1. To use the keyboard binding, either copy the first lines of the file LYX/bind/myCUA.bind to whatever bind-file you are using, or set LyX to use this bind-file. Instead of copying the lines manually into the file it is also possible to use the LyX configuration dialog: Go to Tools -> Settings -> Edit -> Shortcuts, click new, select a key and enter the macro found in the binding file. If the macro does not work as expected, you can try using "command-sequence math-mode; char-forward; line-end-select; cut; math-insert \Ch; char-backward; char-backward; paste; char-forward;" instead.
  2. To use the icon, either copy the second last line from the file LYX/ui/songbook.ui to whatever ui-file you are using, or set Lyx to use this ui-file.

Note : For more recent versions of LyX, the above command sequence should read (see also

  "command-sequence math-mode; char-forward; word-forward-select; math-insert \Ch\ ; inset-toggle; line-end; char-forward; math-insert *; inset-toggle; char-backward-select;"

Tag me

3.  Notes

  • I have not implemented all the features of the songbook package. For instance, I have not included the possibility of exporting the songbook with or without chords. This ought to be easy though.

3.1  Bugs

Oops... turns out that renaming \Ch to \Chord etc afterwards wasn't such a great idea since for instance \ChX (now called \ChordX) calls \Ch ... which will call my new macro command defined in LyX instead... sigh... this means that the order of the arguments to \ChordX needs to be swapped.

4.  Contributors

5.  Copyright



Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2010-09-21 11:36 UTC