lilypond-devel
[Top][All Lists]

## Extending \lilypondfile to support separate handling of header fields fo

 From: Michael Haynie Subject: Extending \lilypondfile to support separate handling of header fields for use by LaTeX et.al. Date: Tue, 27 Dec 2005 16:45:01 -0500

```
```
I had a good look at the proposed alternative mechanism as described in lilypondmacros. It mostly worked, but left me with a fair amount of hand editing that would have to be revisited each time I rearranged the songs in the book -- a *frequent* occurrence when I'm laying out a book for final printing. I studied what you did, and I've developed an alternative suggestion, in several parts:
```
```
* lilypondSystemMacros.tex contains implementations of some useful TeX macros. They can be used without modification -- they only need to be included in the document at some point -- preferably in the preamble. It will be best to provide this file in the distribution to be included, as opposed to generated in the source directory each time. There is a fair amount of commentary on what the various parts are doing. I didn't include every facility in the original, since I wasn't completely certain what it's all for. I'm probably missing something -- maybe a verbatim facility? Error handling isn't especially complete either. We can refine that later. There may be some stupid programmer tricks in the LaTeX macros -- stay alert.
```
```
* example.tex contains an example of use, including several alternatives. It is the generated file instead of the source file, but you get the idea.
```
The generated code should look like this:

The author writes this:
\lilypondfile[staffsize=24]{BattleBelongsToTheLordBook.ly}
which becomes this:
\lilyInputExample{2098660014}{8}

```
Lilypondbook would continue to produce eps files like lily-2098660014-1.eps, etc, as it does now.
```
```
I also think there should be a -H all argument to extract all defined header fields.
```
```
I'm satisfied that these macros and transformations will allow the construction of a song book without any editing of intermediate files.
```
```
I'd hack the lilypondmacro program, but I have not yet learned python, and wanted to share the above thoughts first.
```
```

lilypondSystemMacros.tex
Description: TeX document

` `

example.tex
Description: TeX document

```

Thoughts?
```