<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.3">
</HEAD>
<BODY>
Hello everyone,<BR>
<BR>
I&#8217;m a musician and I often have to write documents including notes. Since a while now I use Lilypond and LATEX for this purpose but I&#8217;d like to change to XETEX because of the Open Type support. (I&#8217;m a typography enthusiast and my preferred free font Linux Libertine has some features [1] that cannot be accessed by LATEX.) Unfortunately <TT>lilypond-book</TT> doesn&#8217;t work with files including XETEX source code. While looking for some tutorials or informations on the Internet I came across this short &#8220;tutorial&#8221; [2] in the archive of this mailing list. The technique described there &#8211; separating the header from the rest of the document (&#8220;main text&#8221;) &#8211; does&#8217;t seem to be a problem for <TT>lilypond-book</TT> &#8211; although the content of the header file plus the content of the &#8220;main text&#8221; file is identical to the single file where <TT>lilypond-book</TT> doesn&#8217;t work, what I don&#8217;t understand. However there&#8217;s something wrong with the PDF file generated by XETEX (respectively <TT>xelatex</TT>): the (virtual) box with the notes doesn&#8217;t stop at the right page margin (see attached files). I also wonder why lilypond-book works with a separate header and a &#8220;main text&#8221; file but not with one single file including the whole source text.<BR>
<BR>
The attached file <TT>test.tex</TT> is a simple LATEX file that works without any problems. The two separated files I&#8217;d like to use with XETEX are <TT>headers.tex</TT> and <TT>document.tex</TT>; they are nearly identical to <TT>test.tex</TT>. The last document, <TT>headers.pdf</TT>, shows what I get when executing:
<PRE>
<TT>lilypond-book --output=out/ --pdf headers.tex</TT>
<TT>cd out</TT>
xelatex headers.tex
</PRE>
<BR>
Thanks in advance for your help!<BR>
<BR>
Best regards<BR>
<BR>
Raphael<BR>
<BR>
__________<BR>
<BR>
1. <A HREF="http://linuxlibertine.sourceforge.net/Libertine-EN.html#opentype">http://linuxlibertine.sourceforge.net/Libertine-EN.html#opentype</A><BR>
2. <A HREF="http://www.tug.org/pipermail/xetex/2008-June/010157.html">http://www.tug.org/pipermail/xetex/2008-June/010157.html</A>
</BODY>
</HTML>