Max Nikulin writes: > Text books and magazines may contain insets (side notes), sometimes > even page-long ones. They present independent material that may be > interesting or useful in particular context or may be just skipped > when a reader is concentrated on main material. Such inset may be > considered as a heading that is inserted in the middle of another > section. It may have larger margins, smaller font, distinct font face, > another background color, box around or just rule at some side, so > readers have clear notion where it ends and main material continues.
This is complex layout, something that DTP programs (InDesign, Quark, Scribus) do very well as they work on the concept of multiple threads of connected text boxes. [offtopic: in LaTeX there is an attempt to emulate that with the flowfram package, with obvious limitations. And the Sile typesetting system is very interesting and promising, which tries to combine the WYSIWYM style of TeX and the linked text boxes of DTP programs: https://sile-typesetter.org/]. But --- returning to the topic---, even so, there is always an underlying notion of hierarchy, levels and dependency, which is what I was referring to: there is a skeleton. I think that Org's system of trees and nodes, agnostic of any typographic format, is enough to maintain that hierarchy. In fact, I have some works with a very complex output starting simply from Org (right now I'm with a trilingual edition, using flowfram: for example, certain Org nodes are exported as flowfram boxes). Obviously, that can also be done from XML (an example of a combination of xml and LuaTeX: https://www.speedata.de/en/). But I think, perhaps in a somewhat quixotic way, that Org has tremendous potential and can play very well in that league. XML is more accurate; but Org is a great compendium of resources.