[Top][All Lists]

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

Re: Extracting header fields for use by e.g. LaTeX?

From: Bernard Hurley
Subject: Re: Extracting header fields for use by e.g. LaTeX?
Date: Sun, 27 Nov 2005 22:22:41 +0000

On Sun, 2005-11-27 at 13:13 -0500, Michael Haynie wrote:
> Yes, that's exactly what I was thinking about doing.
> So: Which scheme functions do I need to replace to accomplish that?
> Are the suggested hooks are documented/supported hooks?

I don't think scheme is going to help. I thnk the solution is to modify
lilypond-book slightly.

However if you take the files

--- test.lytex ---

---- -------
\version "2.7.18"

\header {
    title="The test title"
    composer="Bernard Hurley"

{a b c}

and run:
lilypond-book --psfonts --process="lilypond -b eps -H title " test.lytex

you get a file called something like:


which contains the text of the header "title" - you can do the same with
any other header.

in addition to the generated test.tex

Now the file test.tex contains the code:

\ifx\preLilyPondExample \undefined
\input lily-1915112629-systems.tex

\input lily-1915112629-systems.tex
1] The files lily-1915112629-systems.tex and lily-1915112629.title both
start with "lily-1915112629" so this prefix must be available to
lilypond-book when it generates this code.
2] notice the macro call \preLilyPondExample (it only takes effect if
the macro is defined). If lilypond-book were modified so that it
generated the parameter {lily-1915112629}. Then it would be possible for
you to define the macro so that it read the file with the header.

Actually this modification looks quite easy. The real problem is whether
this would break any existing lytex code. (It can't be upgraded with
convert-ly because that just upgrades lily files). Another solution
would be to have two user-definable macros in the same place, which
seems a bit silly.

I'll have a think about it and then submit a patch.

Bernard Hurley <address@hidden>

reply via email to

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