Is there any package to automatically typeset scholia with latex? The result I have in mind should be something akin to what can be seen here:
the main text limited to a rectangular portion of the page, and the commentary flowing around it.
A similar question is perhaps in Notes overflowing from marginpar to footer and I suppose that it might be possible to adjusted what is done there to obtain the result I am interested in.
In any case, the package I am looking for (if it exists) would have to take care of page breaks for both the text and the scholia at the same time. Is this possible?
I must add that I can get a somehow working solution, but it is neither elegant nor very satisfactory and also it does not get the same effect as on the page presented here. If the text in all of the pages has the same size, then this involves compiling two separate documents (with pages of the appropriate size and shape) and carefully merging the output with pdfpages in a third document. Clearly, this does not keep automatically track of the parallel passages (but it can be improved) and it requires at least 3 compilation runs. The main question was whether anybody had been working on something similar (and done a better job). There is a technical issue, also: whether it might be possible to do (or, better, whether it has been done by somebody before) a continuation-passing style programming in (lua)latex.
For lua side, this is trivial with coroutines (and actually useful if I want some feedback from the tex engine), but ultimately of little use for what I have in mind. What I had actually been thinking about was how to have two parallel execution contexts for latex and switch between them (when needed) by hooking \shipout. This I do not know whether it is doable or not (I am afraid not, but this is why I am asking).