Tommaso Gordini schrieb am 22.11.18 um 06:57:
Thank you, Wolfgang.

I tried to change your solution slightly (the code is pasted below).

Is there any way to have the text of the output justified on the right and on the left? I looked through the command options you used, but I think I did not find anything.
You can change the alignment of the text in the table with the align-key, e.g. \startxrow [align=normal].
One last question: could you have space before and after the frames? Something like that

before = ...
after = ...

To get a blank line before and after the table you have to add \blank to the setups block e.g.

\startsetups [userdata:purecode]
  \blank
  \startembeddedxtable
   ...
  \stopembeddedxtable
  \blank
\stopsetups

Wolfgang