29.11.2012 Views

mpdolce - LilyPond

mpdolce - LilyPond

mpdolce - LilyPond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A: Templates 171<br />

\begin{lilypond}<br />

\relative c'' {<br />

d4 c b a<br />

}<br />

\end{lilypond}<br />

\end{document}<br />

A.7.2 Texinfo<br />

You can include <strong>LilyPond</strong> fragments in Texinfo; in fact, this entire manual is written in Texinfo.<br />

\input texinfo<br />

@node Top<br />

Texinfo text<br />

@lilypond[verbatim,fragment,ragged-right]<br />

a4 b c d<br />

@end lilypond<br />

More Texinfo text<br />

@lilypond[verbatim,fragment,ragged-right]<br />

d4 c b a<br />

@end lilypond<br />

@bye<br />

A.7.3 xelatex<br />

\documentclass{article}<br />

\usepackage{ifxetex}<br />

\ifxetex<br />

%xetex specific stuff<br />

\usepackage{xunicode,fontspec,xltxtra}<br />

\setmainfont[Numbers=OldStyle]{Times New Roman}<br />

\setsansfont{Arial}<br />

\else<br />

%This can be empty if you are not going to use pdftex<br />

\usepackage[T1]{fontenc}<br />

\usepackage[utf8]{inputenc}<br />

\usepackage{mathptmx}%Times<br />

\usepackage{helvet}%Helvetica<br />

\fi<br />

%Here you can insert all packages that pdftex also understands<br />

\usepackage[ngerman,finnish,english]{babel}<br />

\usepackage{graphicx}<br />

\begin{document}<br />

\title{A short document with <strong>LilyPond</strong> and xelatex}<br />

\maketitle<br />

Normal \textbf{font} commands inside the \emph{text} work,<br />

because they \textsf{are supported by \LaTeX{} and XeteX.}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!