[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Macro pre-processing?
From: |
Geoff Horton |
Subject: |
Macro pre-processing? |
Date: |
Thu, 6 Apr 2006 11:57:44 -0400 |
I guess I should start by explaining what I want to do. I have a lot
of notes in chords whose noteheads need to be individually \tweak-ed
to be smaller. Always on the lookout to reduce typing (and thus
typos), I tried:
organ = { \tweak "'font-size #-2 }
But LilyPond wants an argument right then and there. I strongly
suspect I could do a Scheme macro if I knew enough about Scheme and
LilyPond internals, but that seems overkill when all I really want is
the equivalent of a C compilers macro expansion capability.
I could write such a utility easily enough in Perl, and I suspect it's
simple enough that I could learn enough Python to write it without too
much trouble (thereby not introducing a fourth language into the mix),
but I'm wondering if there already exists a simple way to do text
substitutions that I don't know about. (I'd also like to use this for
a more general conditional interpretation facility than the tags
supply.)
Geoff