Sunday, October 26, 2003
MarkBernstein.org
 
choose your style: neoclassical | blue | modern | nouveau

Macros

The latest experiment in Tinderbox Labs is macros. From time to time, I find myself adding repetitive HTML to a Tinderbox note, just so I can get a specific effect when I export.

For example, the movie list on the main page is a nice souvenier but it's got to be compact and easy to extend. Right now, I wrap each new title in a span and apply a corresponding style. The macro tool lets me write this more simply

^do(goodMovie,The Red Violin)

This tells Tinderbox to plug the movie title into the appropriate markup, and gives me a single place to tinker with the markup.

It's a small convenience, and it adds substantial complexity; it will be interesting to see if it proves worthwhile.

update: Gordon Meyer comments:Such a good idea that I wish I had suggested it ....The complexity will surely befuddle some users, but I'm hoping it makes it out of the lab and into the product soon. "