On 15 February 2016 at 23:33, Karl Berry <[email protected]> wrote: > I'm not sure what kind of input you are hoping for. But I fear that > this is a case where using @macro (or m4/other preprocessor macros, > except apparently nobody except me ever liked that idea) is the best > option. Yes, you'd have to write different macro bodies for TeX, HTML, > Info[, Docbook, XML].
Other preprocessor macros: Although Texinfo is not a (general-purpose) typesetting language, I think of the use of processors for the troff typesetting language. If I understand correctly, preprocessors like eqn add commands to the language and are used to add extra features (in eqn's case, typesetting of mathematics). Following that pattern would be: @TeXblock ... @end TeXblock and the preprocessor would replace this with @ifinfo, @tex, @html or whatever. I'm not sure if this approach would be generally useful for Texinfo. m4: one problem I see with m4 is not executing macros by mistake, and how it's quoting characters would fit into Texinfo's syntax. That problem is for whoever tries to use it, though.
