3.6 lilypond-book-Vorlagen

Diese Vorlagen sollen mit lilypond-book benutzt werden. Wenn Sie sich mit dem Programm nicht auskennen, lesen Sie bitte lilypond-book aufrufen.


3.6.1 LaTeX

Sie können LilyPond-Fragmente in ein LaTeX-Dokument einfügen:

\documentclass[]{article}

\begin{document}

Normaler LaTeX-Text.

\begin{lilypond}
\relative {
  a'4 b c d
}
\end{lilypond}

Weiterer LaTeX-Text und Optionen in eckigen Klammern.

\begin{lilypond}[fragment,relative=2,quote,staffsize=26,verbatim]
d4 c b a
\end{lilypond}
\end{document}

3.6.2 Texinfo

LilyPond-Fragmente können in Texinfo-Dokumente eingefügt werden: dieses gesamte Handbuch wurde in Texinfo geschrieben.

\input texinfo @node Top
@top

Texinfo-Text

@lilypond
\relative {
  a4 b c d
}
@end lilypond

Weiterer Texinfo-Text und Optionen in Klammern.

@lilypond[verbatim,fragment,ragged-right]
d4 c b a
@end lilypond

@bye

3.6.3 html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<body>

<p>
Dokumente für lilypond-book können Noten und Text frei kombinieren. Zum
Beispiel
<lilypond>
\relative {
  a'4 b c d
}
</lilypond>
</p>

<p>
Noch etwas LilyPond, mit Optionen:

<lilypond fragment quote staffsize=26 verbatim>
a4 b c d
</lilypond>
</p>

</body>
</html>



3.6.4 xelatex

\documentclass{article}
\usepackage{ifxetex}
\ifxetex
%xetex specific stuff
\usepackage{xunicode,fontspec,xltxtra}
\setmainfont[Numbers=OldStyle]{Times New Roman}
\setsansfont{Arial}
\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'}
\end{lilypond}

\noindent
and so on.

The fonts of snippets set with LilyPond will have to be set from
inside
of the snippet. For this you should read the AU on how to use
lilypond-book.
\end{document}

LilyPond – Usage v2.23.82 (Entwicklungszweig).