lilypond-devel
[Top][All Lists]
Advanced

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

Re: Macros


From: Erik Sandberg
Subject: Re: Macros
Date: Tue, 28 May 2002 16:02:48 +0200

On Tuesday 28 May 2002 11.43, Mats Bengtsson wrote:
> > > > a8 b
> > > > #ifdef scientific
> > > > c\footnote{..}
> > > > #else
> > > > cis
> > > > #endif
> > > > d
> > >
> > > Nothing is stopping you from using cpp for this now. Don't have to
> > > write a completely new preprocessor for this.
>
> Often, you can do this in Lilypond without any ifdefs or
> preprocessor. Just define the additional information using
> a separate identifier and make two or more \score{} definitions
> including different amount of information.

The difference is when the differences are not additions, but modifications, 
like in this case: changing c\footnote{} to cis does not only remove the 
footnote, but it also changes the c to a cis. This can still be solved with 
the current lilypond, using something like

diffA = \notes {c8\footnote{..}}
\include "score.ly"
diffA = \notes {cis8}
\include "score.ly"

where score.ly contains something like
\score{ \notes {a8 b \diffA d}}

However, I feel that this is too clumsy to be practical in larger scale (the 
source will be hard to follow and hard to write), hence it could be 
considered useful to add a more sophisticated system with \define.

Erik



reply via email to

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