Jacques Peron <address@hidden> writes:
The only thing I don't know how to do is to have the same name (lilypond)
for thé command and for the environment. So I privileged the
environment.
Neither are called lilypond. It's not particularly great, but there are
examples for the sharing of command and environment. Basically you
check whether @currenvir is set to LilyPond. As long as you don't
_nest_ those constructs...
Basically:
\newenvironment{lilypond}
{...}
{...}
\newcommand{\lilypondcommand}{...}
address@hidden
address@hidden
address@hidden@currenv address@hidden
\else \expandafter \lilypondcommand \fi}
Ugly, sure. But I think LilyPond upstream would be sympathetic to
making command and environment named differently in the long run.