[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lua/LaTeX assistance
From: |
Knut Petersen |
Subject: |
Re: Lua/LaTeX assistance |
Date: |
Mon, 01 Dec 2014 10:33:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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, 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.
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
cu,
Knut
lilyinluatex.tex
Description: Text Data
- Re: Lua/LaTeX assistance,
Knut Petersen <=