You could also do
> @ifhtml
> @math{{\rm Ai}(x)} @c
> @end ifhtml
> @ifinfo
> @math{Ai(x)} @c
> @end ifinfo
> @iftex
> @math{{\rm Ai}(x)} @c
> @end iftex
> and
although I don't know how easy this would be with your macros.
That's easy. But then if I want a period to follow instead of "and", there's an extra space. What I do know is define another macro that just appends a dot after each math equation in each block to get the period in the right place.
This is ok. @inlinefmt(tex, foo) would simplify this a bit, but since it's all with m4 macros, this is fine as it is.
Thanks for your help! The math equations in the maxima manual are looking pretty good now, after cleaning up the issue with extra space between a formula and a period or comma.