On 3/5/2021 10:27 PM, denis.maier@ub.unibe.ch wrote:
Just to provide more information about what I was thinking: You do your typesetting based on an XML doc. Now it is time for the finishing touches. In a tex document you'd add the usual commands to manipulate the layout: \adaptlayout[lines=+1] \testpage[3] \looseness=-1 / \looseness=+1 \blank \setuptolerance etc.
Now, of course you can define an injector for these commands, some are predefined, like page, column, blank. But, if my understanding is correct, you'd have to define one for each of the possible parameters.
So, you'll need:
\startsetups xml:directive:injector:testpagethree \testpage[3] \stopsetups
\startsetups xml:directive:injector:testpagefour \testpage[4] \stopsetups
etc., and
\startsetups xml:directive:injector:addoneline \adaptlayout[lines=+1] \stopsetups
\startsetups xml:directive:injector:addtwolines \adaptlayout[lines=+1] \stopsetups
Here, I was thinking if something like this could be easier:
<?context-directive raw-tex-injector \testpage[4]?> you can also do this:
<testpage n="4"/> \startxmlsetups xml:testpage \testpage[\xmlatt{#1}{n}] \stopxmlsetup and register that one (as in previous examples) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------