lilypond-user
[Top][All Lists]
Advanced

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

Re: Lua/LaTeX assistance


From: Urs Liska
Subject: Re: Lua/LaTeX assistance
Date: Mon, 01 Dec 2014 10:40:13 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hello Knut,

thank you for that, I'll look into it ASAP.

Am 01.12.2014 10:33, schrieb Knut Petersen:
On 06.11.2013 09:34, Urs Liska wrote:
Am 06.11.2013 07:05, schrieb Joshua Nichols:
I guess in the end I didn't understand anything at all, and my hard head saw LaTeX and didn't see "preprocessed with lilypond-book."

Maybe this is a good opportunity to hook in.
If there is anybody out there experienced with LaTeX and Lua I'd be glad he/she would get in touch with me.

I have written a LaTeX package 'musicexamples' (http://www.openlilylib.org/musicexamples) which is currently useful but not spectacularly unique. I'm using it for managing music examples in my LaTeX documents.
It's on my agenda however to extend this package through Lua (although the new functionality would of course be restricted to LuaLaTeX) in order to accept embedded LilyPond code like lilypond-book does.

For bigger projects I prefer separate files,

well, this is an option too of course. I'd like to copy the functionality of lilypond-book, which can also reference external files. The point is to do it from within the LaTeX run and not to rely on an external preprocessor.

but maybe the attached file is useful for your project.
It demonstrates how to include a lilypond file in a lualatex document.

   lualatex --shell-escape lilyinluatex.tex

will generate a lilypond file, call lillypond and pdfcrop to generate a proper pdf and include it in lilyinluatex.pdf
Lilypond lyrics font and size exactly match the default TeX font.

Looking forward to inspecting it :-)


It's not the explicit intention to make a verbatim copy of lilypond-book, but moving the functionality _inside_ the LaTeX compilation process would offer at least the following fixes for problems that have so far led me not to use lilypond-book:

- You can compile the document at any time directly, no need for preprocessing and intermediate .tex files
- You don't have to chose between cluttering your working directory with intermediate files
  or causing relative-path problems by using the -out option
- You have reliable access to the _currently effective_ text width, e.g. in multicolumn context

I know that even without any prior Lua experience I would be able to dive into that and somehow manage to come up with something.

lualatex is a good engine as it has native utf8 support.  I don't think that you do need lua, TeX is enough

That would be great of course.
Just recently I discovered that there are packages to use Python from within LaTeX. I think I'll have a look at that too. Not only is that a language I already know, but as it's the same as lilypond-book it might be possible to reuse some of that.

Best
Urs


cu,
 Knut


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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