Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Hans Hagen
g list for ConTeXt users <mailto:ntg-context@ntg.nl> *Objet :*[NTG-context] lua tables - how do you cope? This is less a specific question about ConTeXt than a hope for good advice: I’m maltreating my xml files with a mixture of TeX and Lua. I want to extract and typeset information in dif

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Hans Hagen
On 7/30/2016 11:01 PM, Schmitz Thomas A. wrote: Thank you, but this is not what I’m looking for. I know how to sort a table, and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and disorganized). I have to construct deeply nested tables and sometimes lose track of what is

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
> On 30 Jul 2016, at 23:46, Lukas Prochazka wrote: > > Hello Thomas, > > here is my "dump()" I've been using for several years: Arthur, Lukas, these are both great and very helpful, thanks a lot! I feel bad for not knowing table.serialize (which can even be used with the context() function t

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Lukas Prochazka
d be possible, of course... Best regards, Lukas - Original Message - From: Schmitz Thomas A. [mailto:thomas.schm...@uni-bonn.de] To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl] Sent: Sat, 30 Jul 2016 23:01:29 +0100 Subject: Re: [NTG-context] lua tables - how do you c

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Arthur Reutenauer
On Sat, Jul 30, 2016 at 11:01:29PM +0200, Schmitz Thomas A. wrote: > Thank you, but this is not what I’m looking for. I know how to sort a table, > and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and > disorganized). I have to construct deeply nested tables and sometimes

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
Thank you, but this is not what I’m looking for. I know how to sort a table, and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and disorganized). I have to construct deeply nested tables and sometimes lose track of what is at what level of my table, so I was wondering if

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Wolfgang Schuster
Joseph Canedo 30. Juli 2016 um 15:04 If the requirement is to iterate on a table having the keys, values sorted by key (assuming the keys can be sorted), there are ways to do this. Please see http://lua-users.org/wiki/SortedIteration for an example (this just re

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Joseph Canedo
If the requirement is to iterate on a table having the keys, values sorted by key (assuming the keys can be sorted), there are ways to do this. Please see http://lua-users.org/wiki/SortedIteration for an example (this just replaces pairs(t) with orderedPairs(t)). Hope this helps Joseph De : S

[NTG-context] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
This is less a specific question about ConTeXt than a hope for good advice: I’m maltreating my xml files with a mixture of TeX and Lua. I want to extract and typeset information in different forms, so I first collect everything in lua tables, rearrange and order these tables and typeset the resu