lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond-book and xelatex [was: Re: Lilypond-book not working after


From: Mats Bengtsson
Subject: Re: Lilypond-book and xelatex [was: Re: Lilypond-book not working after installing Python 3]
Date: Tue, 02 Mar 2010 16:28:04 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)



Joseph Wakeling wrote:
Graham Percival wrote:
If you know python, or don't count time learning it towards the
estaimte, then 5 hours for basic usability.  Maybe 15 for using
advanced xelatex stuff?

Note that I don't know what the difference is between xelatex and
pdflatex; I'm just going on the fact that they both act on text
and graphics files, and lilypond-book produces text and graphics
files.

Well, based on my (brief, wholly inadequate...) experience, based purely
on LaTeX and never before touching on Lilypond, a file that compiles
with pdflatex should also compile with xelatex -- the converse of course
is not true, because xelatex allows for utf-8 input
Which latex does as well if you use
\usepackage[utf8]{inputenc}
 and has nice
features to let it work with OTF fonts.

A couple of brief tests saw no problem with doing the following:

lilypond-book --pdf myfile.lytex
xelatex myfile.tex

... So my feeling is that xelatex is probably substantially fine to use as
the .tex compiler, so long as lilypond-book is run with the --pdf
option.  There are probably tweaks that can be made, but much will work
without them.
Basically, lilypond-book just replaces blocks of LilyPond code with a number of
\includegraphics{...}
commands, so as long as you use a latex variant that understands the \includegraphics command then it should work out of the box.

However, I just simplified things a bit. What really happens, in addition to what I just said, is that lilypond-book extracts the head of the file (everything before \begin{document}) and copies it into a temporary file where the main part of the file has been replaced by a few \typeout commands that spit out information on the line width used in the document, when the temporary file is ran through latex. This is then used in lilypond-book to automatically set the line width of each lilypond score to match the line width used in the text parts of the document. By default, the temporary file is ran through "latex", but you can change this using
lilypond-book --latex-program=xelatex ...
or whatever latex variant you want to use. In recent lilypond versions, it automatically uses "pdflatex" if you specify the --pdf flag.

Without knowing anything specifically about xelatex, I don't really see what would have to be changed in lilypond-book itself to support xelatex. Please try using
lilypond-book --latex-program=xelatex ...
and see if there are any remaining problems.

   /Mats
Best wishes,

    -- Joe


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

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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