lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proposed new tool


From: Bernard Hurley
Subject: Proposed new tool
Date: Sun, 04 Dec 2005 08:49:30 +0000

Hi,

I have been looking at the possibility of how one would add more
functionality to the LaTeX backend of lilypond-book, so that, for
instance information from lilypond headers could be used. There is so
much going on in l-b and the things I am doing are so LaTeX oriented
that I thought it would be best if I first wrote a "proof of concept", a
program lp2lm (lilypond to latex macros), integrating it with l-b later.
However I realise that the program is of use in itself, especially for
large LaTeX projects. Even if it never got to the point of integration
with l-b.

>From the user's point of view. It would look like: 

 -----------
| Spec file |----------->|
 -----------             |
     .lsp                |       lp2lm        --------------
                         |------------------>| LaTeX macros |
 ----------------        |                    --------------
| lilypond files |------>|                     .tex or .sty
 ----------------
     .ly

The .lsp file will contain directives a bit like \lilypond and
\lilypondfile. They would need an extra parameter but apart from that I
wil keep the syntax the same. A few other things (e.g.textwidth) might
also be specified. It will then use essentially the same process as the
LaTeX mode of l-b but instead of modifying the .lsp file it will produce
another file full of LaTeX macros that can then be \input into a .tex
file.  One advantage of this approach is that libraries of songs could
be built that could be used and re-used in different documents. It would
also be very easy to produce the library as a .sty file instead of (or
as well as) a .tex file so that you could do things like:

\usepackage{beatles}
....
.....
\section{\lilyheader{\jude,title}

\lilyinputsong{\jude}

For large LaTeX projects there are advantages of doing it this way. For
instance there would be no problems with using \include, which is not
supported by l-b.

What do others think? I will be writing the program in any case, but I
would be very honoured if at some time it could become fart of the
lilypond project. Then at some time we could see if it could be
integrated with l-b.

        /Bernard

-- 
Bernard Hurley <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]