Hi Urs,

Since you asked for opinions I will offer mine.  I do quite a bit of work
with LaTeX and LilyPond, but I don't use lilypond-book for a couple of
reasons.

It generates a lot of extra files and folders that create clutter if you
don't direct its output to a separate folder, but when I do that, links to
other files (graphics for example) in the .tex file no longer work since
it's in a different folder now (I keep all linked files in the same folder
as the .tex file because it's on Dropbox and the full path to it is
different on different computers).

Also there is (or was?) an annoying bug whereby LilyPond doesn't take
elements to the left of the staff (instrument names and such) into account
in calculating the line-width of a system that occasionally cause systems
to spill over in the right-hand margin. In those situations I had to use
goofy workarounds to make them fit.

For those reasons I prefer to simply export images (Frescobaldi makes this
very simple) and link to them as with other graphics.  (Using a fixed
line-width in LilyPond avoids the need to scale them or anything like that.)

The main advantage I lose is lilypond-book's ability to split a single
score over page breaks when it makes for a better layout (this is possible
manually, but tedious), and if you were making a book purely of scores (but
including a written introduction, or opening remarks or other material of
that nature) I think lilypond-book is the way to go.

Ideally, invoking LilyPond in LaTeX would be rather like using, for
example, the Tikz package: the code is processed when LaTeX is run (no need
to use lilypond-book first), but given LilyPond's size and complexity
(compared to a package like Tikz) I'm not sure if that is possible.  I know
very little about programming; is it possible to get LaTeX to invoke
LilyPond on a computer where it is installed? Or would it be necessary to
create a package that included the whole LilyPond program?

Regards,
Kevin Barry



Hi list,
>
> I'm just starting my first try with lilypond-book.
> I see that I have to enter the code in my latex document, process this
> document with lilypond-book and then compile the resulting file to get
> my final pdf document.
>
> But do I see correctly that I can't compile my original file with latex
> anymore (because of the undefined environment/command)?
> I find this inacceptable, because I want to be able to compile my
> original document at any time during its development.
>
> If I didn't miss something, I will try to use the following workaround:
>
>   * Write a .sty file containing latex definitions corresponding to the
>     command recognized by lilypond-book.
>   * When latex compiles the file it will then print the source code and
>     a comment instead
>
> Attached you'll find a first sketch for the 'lilypond' environment (.sty
> file, test .tex file and pdf).
>
> Am I on the right track with this approach?
> Or is there something wrong with it?
> Or did I miss something, and there is already a solution?
>
> If you think that's a good idea I will complete it and suggest it as an
> enhancement to be distributed together with lilypond-book.
>
> And if it works, I would think about giving them an optional parameter
> where one can store the path to the file (resulting of a run of
> lilypond-book), so latex can display either the code or this image if
> present.
> And if that works too I'd suggest to update lilypond-book as to insert
> this additional parameter by itself, so latex would automatically use
> the generated image.
>
> And if I understand all this correctly (but chances are quite high I
> don't), I would say that this approach could make the intermediate (i.e.
> processed) .tex file obsolete (at least for latex).
> Please be patient if I'm completely off the track, but it may also be
> I'm not ...
> Wouldn't the following work:
>
>   * lilypond-book processes the original latex file as usual,
>     but writes an additional parameter (the path to the generated image)
>     _into the original file_ (instead of creating a new file).
>   * A latex package contains environments/commands corresponding to
>     those understood by lilypond-book
>   * If that additional parameter is present, it includes the image file,
>   * otherwise it prints the source code verbatim.
>
> ????
>
> As lilypond-book is written in Python I might even contribute to that
> myself.
>
> Thanks for any opinions
> Urs
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.gnu.org/archive/html/lilypond-user/attachments/20130116/e3b295e3/attachment.html
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: lilypondbook.sty
> Type: text/x-tex
> Size: 261 bytes
> Desc: not available
> URL: <
> http://lists.gnu.org/archive/html/lilypond-user/attachments/20130116/e3b295e3/attachment.sty
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: lilypondbook-test.pdf
> Type: application/pdf
> Size: 15336 bytes
> Desc: not available
> URL: <
> http://lists.gnu.org/archive/html/lilypond-user/attachments/20130116/e3b295e3/attachment.pdf
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: lilypondbook-test.tex
> Type: text/x-tex
> Size: 475 bytes
> Desc: not available
> URL: <
> http://lists.gnu.org/archive/html/lilypond-user/attachments/20130116/e3b295e3/attachment.tex
> >
>
> ------------------------------
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
> End of lilypond-user Digest, Vol 122, Issue 108
> ***********************************************
>
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to