Hello Tadziu, Tadziu Hoffmann wrote on Tue, Jan 21, 2025 at 12:01:12AM +0100:
>> when designing a markup language, permitting the inclusion >> of chunks written in a different markup language is usually >> terrible language design. > Isn't that what tbl, pic, chem, and all the rest are? > So far the idea has worked quite well over the years. Point in part granted, in so far as there are examples of roff(7) code allowing to include other languages, and those inclusions were successful in practice. Then again, the discussion was about general-purpose markup languages allowing the inclusion of chunks of marked-up text written other general-purpose markup languages, like markdown supporting HTML chunks or reStructuredText supporting roff(7) chunks. The chunks that roff(7) code includes by your above examples are certainly not general-purpose languages, but highly specialized for one narrow purpose each. I'd go as far as deny that tbl, pic, and chem are markup languages at all - languages certainly, but not markup languages. I would call them graphic element generation languages - table generator, picture generator, chemical formula generator. No text is being marked up there. In your example, the included sub-languages are effectively restricted to roff, and in that sense, they are more similar in function to roff macros than to the combination of two different languages, even though technically, these sub-languages are not implemented as macros. Many markup languages support the inclusion of data that is not marked-up text, or not text at all - consider LaTeX \includegraphics, groff .PSPIC, HTML <img> and so on. That perspective can also be applied to tbl, pic, and chem in roff. It doesn't mean you should let one text markup language include another. Yours, Ingo