\section{LilyPond-book + LaTeX}
-This is an examplefile for mixing LilyPond and Latex. It is also
-used to test lilypond-book. View the source to see how it is done.
+This is an examplefile for mixing LilyPond and Latex. It is also
+used to test lilypond-book. View the source to see how it is done.
A simple scale:
\end{lilypond}
LilyPond-book search for the \verb|\score| command when it decides
-if the code is only a fragment. Thus, in the following code, you have
+if the code is only a fragment. Thus, in the following code, you have
to use \verb|fragment| option, because the comment confuses lilypond-book.
-\begin[fragment]{lilypond}
+\begin{lilypond}[fragment]
c d e % \score
\end{lilypond}
that is the same as writing
\begin{verbatim}
-\begin[fragment]{lilypond}
+\begin{lilypond}[fragment]
c' e' g'
\end{lilypond}
\end{verbatim}
This C major
-%%\begin[staffsize=11\pt,fragment]{lilypond}
-\begin[11pt,fragment]{lilypond}
+%%\begin{lilypond}[staffsize=11,fragment]
+\begin{lilypond}[staffsize=11,fragment]
\context Voice <<c' e' g'>>
\end{lilypond}
and C minor
-\lilypond[fragment,11pt]{\context Voice <<c' es' g'>>} chords are floating inside the text.
+\lilypond[fragment,staffsize=11]{\context Voice <<c' es' g'>>} chords are floating inside the text.
\subsection{verb and verbatim}
As you see, the begin/end verbatim command inside
does not confuse lilypond-book:
-\verb|\begin[fragment]{lilypond}c d e\end{lilypond}|
+\verb|\begin{lilypond}[fragment]c d e\end{lilypond}|
Neither does a verbatim inside verb:
-\verb|\begin{verbatim}\begin[fragment]{lilypond}c d e\end{lilypond}\end{verbatim}|
+\verb|\begin{verbatim}\begin{lilypond}[fragment]c d e\end{lilypond}\end{verbatim}|
or verb inside verbatim:
\begin{verbatim}
-\verb|\begin[fragment]{lilypond}c d e\end{lilypond}|
+\verb|\begin{lilypond}[fragment]c d e\end{lilypond}|
\end{verbatim}
But this is just to stress \verb|lilypond-book|. What you need is:
\subsection{The 'verbatim' and 'intertext' option}
This shows the verbatim option:
-\begin[fragment,verbatim, intertext="gives this music:"]{lilypond}
+\begin{lilypond}[fragment,verbatim, intertext="gives this music:"]
c' d' e'
\end{lilypond}
\subsection{To float or not to float}
This music
-\begin[fragment]{lilypond}
+\begin{lilypond}[fragment]
c' e'
\end{lilypond}
should be floating inside the text by using the \verb|eps| options.
This music
-\begin[fragment]{lilypond}
+\begin{lilypond}[fragment]
c' e'
\end{lilypond}
has also the \verb|eps| options, but is not floating because there
-are an emptry line before and after the lilypond block. That is
+are an empty line before and after the lilypond block. That is
correct behaviour because it follows La\TeX{} convention that an
-empty line signals a new paragraph. The \verb|eps| option
+empty line signals a new paragraph. The \verb|eps| option
is not necessary when you want the music in a paragraph on its own.
\subsection{More examples}
Itemize environment:
\begin{itemize}
\item
-\lilypond[11pt,fragment]{ c'} do
+\lilypond[staffsize=11,fragment]{ c'} do
\item
-\lilypond[11pt,fragment]{d'} re
+\lilypond[staffsize=11,fragment]{d'} re
\item
-\lilypond[11pt,fragment]{e'} mi
+\lilypond[staffsize=11,fragment]{e'} mi
\item
-\lilypond[11pt,fragment]{f'} fa
+\lilypond[staffsize=11,fragment]{f'} fa
\item
-\lilypond[11pt,fragment]{g'} sol
+\lilypond[staffsize=11,fragment]{g'} sol
\end{itemize}
Tables\footnote{ and footnote:
-\lilypond[11pt,fragment]{c' e' g'} }:
+\lilypond[staffsize=11,fragment]{c' e' g'} }:
\marginpar{ Yes, even as marginpar
-\lilypond[11pt,fragment]{c' d' e'} }
+\lilypond[staffsize=11,fragment]{c' d' e'} }
\begin{tabular}{|l|l|r|}
\hline
\em Notes & \em Name \\
\hline
-\lilypond[11pt,fragment,filename="cdur"]{\context Voice <<c' e' g'>>} & major \\
-\lilypond[11pt,fragment]{\context Voice <<c' es' g'>>} & minor \\
-\lilypond[11pt,fragment]{\context Voice <<c' es' ges'>>} & diminished \\
-\lilypond[11pt,fragment]{\context Voice <<c' e' gis'>>} & augmented \\
+\lilypond[staffsize=11,fragment,filename="cdur"]{\context Voice <<c' e' g'>>} & major \\
+\lilypond[staffsize=11,fragment]{\context Voice <<c' es' g'>>} & minor \\
+\lilypond[staffsize=11,fragment]{\context Voice <<c' es' ges'>>} & diminished \\
+\lilypond[staffsize=11,fragment]{\context Voice <<c' e' gis'>>} & augmented \\
\hline
\end{tabular}
\pagebreak
-Testing of spacing. The next music is surrounded by an empty line.
+Testing of spacing. The next music is surrounded by an empty line.
text text text text text text text text text text text text
text text text text text text text text text text text text