Going Overboard
The macros in htm4l make certain tasks very simple. In fact, they
make some things so simple that it's tempting to immediately define
macros for everything you can think of. You should probably try to
resist this urge. For one, they can make your text harder (for you)
to understand. You may also spend more time implementing and
debugging your special super-duper macro than you save by using it.
My experience is that the htm4l macros are great for
- Keeping a consistent look and feel to a set of pages
- Putting html tags onto forms
- Generating URLs that will work no matter where you move that image directory
- Automatically numbering things
- Generating "Click here to return to...." html
- Generating Next/Previous/Up buttons automatically
- Generating "Last modified by...." html
- Swapping between lists and 1xn or nx1 tables
- Giving you shorthand ways to refer to URLs
- Producing conditional output depending on macros defined in
a Makefile, or processes accessed through the syscmd
shell macros
You will no doubt find other uses. I have learnt from implementing
too many macros. There are cases when an m4 macro is perfect for what
you need to do, and there are cases where you are simply wasting your
time (and making your text harder to read and understand). You'll
have to figure out what works best for you.
Back to the htm4l home page.
© Terry Jones (terry <AT> jon.es).
Last modified: Mon Oct 2 02:22:03 CEST 2006