[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-users
Subject:    Re: Lilypond integration
From:       Johannes Asal <johannes.asal () gmx ! de>
Date:       2009-03-10 12:41:30
Message-ID: 6e0fa8440903100541h27bb4090hd177afad5d7bd719 () mail ! gmail ! com
[Download RAW message or body]


I know that you can include Lilypond material by External Material. That's
ok when you have few notation examples in your text and I appreciate that
someone took the time to implement it. But I'm trying to write a book about
jazz harmonics and therefore I need many musical examples that have to be
changed often in the writing process. The main problems I have with the
External Material approach are the following:

1. It interrupts the creative process, because you need to prepare the
lilypond snippets in another editor and import them afterwards
2. You don't have a preview and therefore it is a bit difficult to see
whether you have written something already or not
3. If you have to change one of the snippets, you have to find the
corresponding file

I don't know if it's possible, but the ideal solution (for me) would be some
kind of lilypond environment (somewhat like the math environment), where you
can type in your lilypond code directly. After leaving this environment, the
graphic is rendered and put into place in the LyX document. If you need to
change it, you just click on the graphic and the code environment pops up
again.

This is of course not a simple modification to do, and I guess it wouldn't
be that fun either, but I'm sure it would be a valueable addition to LyX's
feature list because as far as I know there is no solution today that
combines text with music typesetting in a convenient and straightforward
way. I would even volunteer for implementing parts of it if needed.

Johannes Asal

2009/3/10 Helge Hafting <helge.hafting@hist.no>

> j.asal wrote:
>
>> Hi,
>>
>> I want to write a music theory book with LyX. For musical examples I would
>> like to use Lilypond, but there seems to be no support for including and
>> displaying Lilypond snippets (apart from importing whole Lilypond files).
>> I
>> know that one could use lilypond-book to postprocess files with embedded
>> lilypond code, but then you don't have any preview and you can't use LyX
>> to
>> 'compile' the latex file. Any ideas/suggestions?
>>
>
> I created what little support there is for lilypond in LyX. Mostly because
> it was easy and interesting to do.  It'd be interesting to know more about
> what kind of lilypond support that actually is useful.
>
> Currently, LyX can use lilypond files that takes up a page or less. This
> because LyX runs the file through the lilypond software for you, obtains a
> pdf or postscript file, and includes that as a graphical object.
>
> This lets you typeset pieces of music that is less than a page each, and
> get them into the LyX document. Maybe it is also possible to create small
> examples such as a single chord and include it in the middle of a line of
> text. I haven't actually tried that, but it ought to work.
>
> The way to do this:
> 1. Create a LyX document and a lilypond file
> 2. In LyX: "Insert->File->External Material"
> 3. In the external material dialog, change "template" to LilyPond",
>   and insert the correct filename.
>
> Your music should now appear when you print the LyX file or export a PDF
> file.
>
> Please let me know if there are problems with this.
>
> Supporting lilypond-book would need a different approach, because the
> processing is different.
>
> Helge Hafting
>
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic