bug-lilypond
[Top][All Lists]
Advanced

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

Re: feedback to the latex-program option of lilypond-book


From: Till Rettig
Subject: Re: feedback to the latex-program option of lilypond-book
Date: Mon, 05 May 2008 20:57:51 +0300
User-agent: Thunderbird 2.0.0.12 (X11/20080227)

Sorry, I don't know how to set fonts inside of xelatex (there are examples for plain xetex though on the webpage) without the fontspec package, but it comes bundled with xetex I think so it is quite a prerepuisite of the program. My file was derived from the template I sent sometimes to the list:

\documentclass{article}
%\usepackage{ifxetex}
%\ifxetex
%xetex specific stuff
\usepackage{xunicode,fontspec,xltxtra}

\setmainfont{Gentium}%works
%/setmainfont[Numbers=OldStyle]{Gentium}%this fails

\setsansfont{DejaVu Sans Mono}
%\else
%This can be empty if you are not going to use pdftex
%\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}
%\usepackage{mathptmx}%Times
%\usepackage{helvet}%Helvetica
%\fi
%Here you can insert all packages that pdftex also understands
\usepackage[ngerman,finnish,english]{babel}
\usepackage{graphicx}

\begin{document}
\title{A short document with lilypond and xelatex}
\maketitle

Normal \textbf{font} commands inside the \emph{text} work,
because they \textsf{are supported by \LaTeX{} and XeteX.}
If you want to use specific commands like \verb+\XeTeX+, you
should include them again in a \verb+\ifxetex+ environment.
You can use this to print the \ifxetex \XeTeX{} command \else
XeTeX command \fi which is not known to normal \LaTeX .

In normal text you can easily use lilypond commands, like this:

\begin{lilypond}
{a2 b c'8 c' c' c'16 c'16}
\end{lilypond}

\noindent
and so on.

\end{document}
%%%%%%%%%%%%%%%%%%%

The file contains all the ifxetex package stuff, just commented out, the two relevant lines are the \setmainfont command lines. There are no old style numbers in Gentium, so you get a warning. I just read in the fontspec documentation that the package issues quite a lot of warnings on purpose, but you can switch them off with the [quiet] option for the package. Didn't try though.

Hope this helps already a bit.

Till

John Mandereau schrieb:
[moved from lilypond-devel to bug-lilypond]
On 2008/04/26, Till Rettig wrote:
I needed immediately to try the new command line option with xelatex, and there are some smaller issues that might be interesting: for some reason xelatex when called by lilypond-book dosn't find the font index, so it has to build it every time anew itself, or just looks for the fonts -- but as a result the compilation takes really a long time. And then I was somehow astonished about the unforgivingness of lilypond-book: even if there is only a warning issued by xelatex I get a "failed" and the compilation is stopped. The warning is issued by the fontspec package that the font doesn't support a specific font feature I called.

Does this warning also happen with a full document with the same
specific font feature is directly processed with xelatex?

If xelatex exits with non-zero, it should mean that the warning is to be
considered as an error.  Do you know where xelatex exit codes are
documented?


And the last: xelatex gives this message:

Running xelatex...xelatex: /usr/local/lilypond/usr/lib/libpng12.so.0: no version information available (required by xelatex)

It doesn't harm me so far, but if libpng could give its version number... :-)

This warning probably happens because lilypond-book GUB wrapper changes
LD_LIBRARY_PATH.


But it works, this is really great. Thank you. You might consider closing issue 543.

I prefer to sort out problems with running xelatex first, especially the
fact that xelatex doesn't find the font index.  Could you send me a real
but not too big lilypond/xelatex sample privately?

Cheers,
John



reply via email to

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