Bernardo Barros wrote:
I got an error. BTW with this method there isn't much difference of this and
importing the PDF already. It's not less work.
It is slightly less; LyX will manage the creation of PDFs itself, you
will not need to update the PDF when changing the .ly file.
Of course, embedding lilypond code in LyX would be even less work. But I
don't know a quick way to program that. Anything not supported directly
by latex, is kept in separate files. This is the way it is for graphics,
as well as music.
The current lilypond support in LyX takes care of running lilypond and
importing the resulting PDF automatically. So you can include music, but
you need to have each piece in a separate file.
What you want can be done though. Lilypond code could be stored in the
.lyx file, and LyX could write out a temporary .ly file and process it
with lilypond.
You may want to file an enhancement request for this at
http://www.lyx.org/trac/wiki/BugTrackerHome
so your idea is not forgotten. The idea is interesting, but I don't have
time right now.
Helge Hafting