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\pt,fragment]
+\begin{lilypond}[11pt,fragment]
\context Voice <<c' e' g'>>
\end{lilypond}
and C minor
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
is not necessary when you want the music in a paragraph on its own.