Hello Father Michael,<br><br>Lilypond-book and xelatex work very well together when using a terminal: Lilypond-book wants to write to a directory other than the original directory (let&#39;s call it OUT) so as not to overwrite the original .tex file.<br>

<br>As a starter:<br>If you put your headers into a small file such as try-header.tex below, and your text (with the lilypond-code) in a file like the try.tex below (that &quot;document&quot; file is included as \input{try.tex} in the try-header.tex), you should do the following (a script-generated Makefile can automate all that for you):<br>

<br>mkdir OUT<br>lilypond-book --out OUT --pdf try-header.tex<br>cd OUT<br>xelatex&nbsp; -output-driver=&quot;xdvipdfmx -q -E&quot; try-header.tex<br>cp try-header.tex ../try.tex<br>cd ..<br><br>You should now have a file try.pdf in the directory you work in (and you started out), and you can delete everything in the OUT file (and remove the OUT directory - if you leave it, lilypond-book will recognise the changes you make, and only compile what has changed. But OUT tends to get rather big...).<br>

<br>Obviously, the whole thing can be done with a script that does all the work for you. Feel free to ask me directly for a sample shell-script if you need some help there.<br><br>Rembrandt<br><br><br>% try-header.tex<br>
\documentclass{article}<br>
\usepackage{xunicode,fontspec,xltxtra}<br>\setmainfont{Times New Roman}<br>\setsansfont{Gentium}<br><br>\usepackage{graphicx}<br>\input{try.tex}<br><br>%try.tex<br>\begin{document}<br>\title{A short document with LilyPond and xelatex}<br>

\maketitle<br>Normal \textbf{font} commands inside the \emph{text} work,<br>because they \textsf{are supported by \LaTeX{} and XeteX.}<br>If you want to use specific commands like \verb+\XeTeX+, you<br>should include them again in a \verb+\ifxetex+ environment.<br>

You can use this to print the \XeLaTeX{} which is not known to normal \LaTeX .<br>In normal text you can easily use LilyPond commands, like this:<br>\begin{lilypond}<br>{a2 b c&#39;8 c&#39; c&#39; c&#39;}<br>\end{lilypond}<br>

\noindent<br>and so on.<br>The fonts of snippets set with LilyPond will have to be set from<br>inside<br>of the snippet. For this you should read the AU on how to use<br>lilypond-book.<br>\end{document}<br><br><br><div class="gmail_quote">

On Sun, Jun 22, 2008 at 4:32 PM, Fr. Michael Gilmary &lt;<a href="mailto:FrMichaelGilmary@maronitemonks.org" target="_blank">FrMichaelGilmary@maronitemonks.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Dear All:<br>
<br>
First, thanks for all the helpful advice. I&#39;ve benefited and am grateful.<br>
<br>
I&#39;ve used Lilypond with an engine written for LaTeX and it works fine. I<br>
have also tried to use a preamble and small file example that pretends<br>
to work with XeLaTeX, employing the ifxetex package (this is included in<br>
the pdf doc &quot;lilypond-learning&quot; pp. 167-8, and I&#39;ve dropped the German<br>
sample). There are a number of things strange (it seems to me) about the<br>
way the document compiles --- not the least of which is the following<br>
warning:<br>
<br>
&gt; This .map file looks like a dvips format fontmap file.<br>
&gt; ** WARNING ** -- Current input buffer is: HoeflerTextOrnaments<br>
&gt; hoeflertextornaments &lt;hoeflertextornaments.enc<br>
&gt; ** WARNING ** -- Reading fontmap file stopped at: file=&quot;dvipdfm.map&quot;,<br>
&gt; line=25.<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;ASCII&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AmiciLogo&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AmiciLogoBold&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AmiciLogoBoldRslant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AmiciLogoBoldSlant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AmiciLogoRslant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AmiciLogoSlant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AuriocusKalligraphicus&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AuriocusKalligraphicusBold&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for<br>
&gt; &quot;AuriocusKalligraphicusBoldRslant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for<br>
&gt; &quot;AuriocusKalligraphicusBoldSlant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AuriocusKalligraphicusRslant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;AuriocusKalligraphicusSlant&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;Cheq&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;Cherokee&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;Cherokeeb&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;Cherokeebo&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;Cherokeeo&quot;<br>
&gt; ** WARNING ** Deleting fontmap record for &quot;EpiOlmec&quot;<br>
<br>
Before it gets that far, however, it stops at the lilypond environment,<br>
not recognizing it. So it sets the page /without music/ if I continue by<br>
pressing the return key.<br>
<br>
I&#39;m working on Mac OS <a href="http://10.4.11." target="_blank">10.4.11.</a> Any other info needed?<br>
<br>
It seems that no one in the lilypond world can help after I posted this<br>
question on their user group forum and the developer&#39;s list.<br>
<br>
Thanks in advance! And be assured of our prayers.<br>
<br>
fr. michael gilmary<br>
<br>
<br>
%%%%%%%%%%%%%%%%%%%<br>
%%%%%%%%%%%%%%%%%%%<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sample file<br>
%%%%%%%%%%%%%%%%%%%<br>
%%%%%%%%%%%%%%%%%%%<br>
<br>
&gt; %!TEX encoding = &nbsp;UTF-8 Unicode<br>
&gt; %!TEX TS-program = &nbsp;xelatex-xdvipdfmx<br>
&gt;<br>
&gt; \documentclass{article}<br>
&gt; \usepackage{ifxetex}<br>
&gt; \ifxetex<br>
&gt; %xetex specific stuff<br>
&gt; \usepackage{xunicode,fontspec,xltxtra}<br>
&gt; \setmainfont{Times New Roman}<br>
&gt; \setsansfont{Arial}<br>
&gt; \else<br>
&gt;<br>
&gt; %%This can be empty if you are not going to use pdftex<br>
&gt; \usepackage[T1]{fontenc}<br>
&gt; \usepackage[utf8]{inputenc}<br>
&gt; \usepackage{mathptmx}%Times<br>
&gt; \usepackage{helvet}%Helvetica<br>
&gt; \fi<br>
&gt; %Here you can insert all packages that pdftex also understands<br>
&gt;<br>
&gt; \usepackage{graphicx}<br>
&gt; \begin{document}<br>
&gt; \title{A short document with LilyPond and xelatex}<br>
&gt; \maketitle<br>
&gt; Normal \textbf{font} commands inside the \emph{text} work,<br>
&gt; because they \textsf{are supported by \LaTeX{} and XeteX.}<br>
&gt; If you want to use specific commands like \verb+\XeTeX+, you<br>
&gt; should include them again in a \verb+\ifxetex+ environment.<br>
&gt; You can use this to print the \ifxetex \XeTeX{} command \else<br>
&gt; XeTeX command \fi which is not known to normal \LaTeX .<br>
&gt; In normal text you can easily use LilyPond commands, like this:<br>
&gt; \begin{lilypond}<br>
&gt; {a2 b c&#39;8 c&#39; c&#39; c&#39;}<br>
&gt; \end{lilypond}<br>
&gt; \noindent<br>
&gt; and so on.<br>
&gt; The fonts of snippets set with LilyPond will have to be set from<br>
&gt; inside<br>
&gt; of the snippet. For this you should read the AU on how to use<br>
&gt; lilypond-book.<br>
&gt;<br>
&gt;<br>
&gt; \end{document}<br>
<br>
<br>
_______________________________________________<br>
XeTeX mailing list<br>
<a href="mailto:postmaster@tug.org" target="_blank">postmaster@tug.org</a><br>
<a href="http://tug.org/mailman/listinfo/xetex" target="_blank">http://tug.org/mailman/listinfo/xetex</a><br>
</blockquote></div><br><br clear="all"><br>-- <br> 人有不為也而後可有為