lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Linux Users


From: Malte Meyn
Subject: Re: [OT] Linux Users
Date: Sun, 19 Nov 2017 20:34:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0



Am 19.11.2017 um 20:28 schrieb David Kastrup:
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.


I don’t know enough about (La?)TeX internals to understand the code above but if you redefined the command \lilypond, would things like the following still be possible?

\newenvironment{dly}{
\center
\ly
\language "deutsch"

\paper {
        ##(define fonts
                (set-global-fonts
                ##:music "cadence"
                ##:brace "cadence"
                ##:roman "Vollkorn"
                ##:factor (/ staff-height pt 20)))
}

\layout {
        % some other general things
}

% some includes and function definitions
}{\endly\endcenter}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]