Alexey Kryukov schrieb am 18.08.2023 um 19:02:
Hi,

I am trying to generate a table representation for some xml source.
As the data structure doesn't directly correspond to the desired table
structure, some manipulations via lua are required. So far everything
works OK except table sectioning commands, like \bTABLEhead,
\eTABLEhead, bTABLEbody or \eTABLEbody: it seems impossible to
incapsulate them into lua functions. For example, the following is not
compiled:

\starttext
\bTABLE
\ctxlua{context.bTABLEbody()}
\bTR
\bTD Cell 1\eTD
\bTD Cell 2\eTD
\eTR
\ctxlua{context.eTABLEbody()}
\eTABLE
\stoptext

Can anybody suggest a workaround (except changing the source XML of
course)?

Do you create the whole table with Lua? When this is the case a small change to the table section commands on the Lua side can fix your problems but otherwise a different approach is needed.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to