Jacques Peron <catac...@hotmail.com> writes:

>  > As far as I can tell the cleanest (and easiest) way would be to
>> publish the package on CTAN so it will be included in TeX distros like
>> TeXLive (like it is the case with lilyglyphs).
>
> I'd be really glad to do so, but I don't know how to... And if I remember
> what I read about the integration of Gregorio, calling external programs
> from "official" packages obeys quite difficult rules.
>
> *Then* of course it
>> should be mentioned in the LilyPond docs too.
>
> It's already mentioned here :
> http://lilypond.org/doc/v2.19/Documentation/usage/luatex
>
>
> I fail to see why it uses different syntax for embedding LilyPond code
> than lilypond-book does, though.  Why not make it compatible by just
> adding the right \usepackage invocation?
>
> 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}{...}

\let\lilypond@envcode\lilypond
\protected\def\lilypond{\def\reserved@a{lilypond}%
  \ifx\reserved@a\@currenv \expandafter\lilypond@envcode
  \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.

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to