Re: [NTG-context] Referring to multiple elements

2012-09-28 Thread Marco Patzer
2012-09-28 Sietse Brouwer sbbrou...@gmail.com: Hi Sietse, \in{figure}[alpha,beta,gamma] This outputs “figure 1”. What I'd like to have is “figure 1-3”. The attached quasi-module seems to do it! On my computer, at least. (I call it 'quasi' because it is really nothing more than code in

Re: [NTG-context] Referring to multiple elements

2012-09-28 Thread Sietse Brouwer
Hi Marco, Marco wrote: Maybe worth mentioning: You need the additional module `showtable.lua` from http://article.gmane.org/gmane.comp.tex.context/78336 Oops, that was a debugging statement. Removed. Thanks a lot for that. I'd adjust the interface, so that it matches the behaviour of \in:

Re: [NTG-context] Referring to multiple elements

2012-09-27 Thread Sietse Brouwer
Hi Marco, (PS for Hans), Marco wrote: \in{figure}[alpha,beta,gamma] This outputs “figure 1”. What I'd like to have is “figure 1-3”. The attached quasi-module seems to do it! On my computer, at least. (I call it 'quasi' because it is really nothing more than code in a file of its own. No

Re: [NTG-context] Referring to multiple elements

2012-09-16 Thread Marco Patzer
2012-09-14 Sietse Brouwer sbbrou...@gmail.com: Hi Sietse, I'm sorry for my late reply. The heart of what you need is a lua function that will take an array of numbers, and return an array of consective-number runs, like so: […] I've written one below, plus the scaffolding required to feed

Re: [NTG-context] Referring to multiple elements

2012-09-14 Thread Marco Patzer
2012-09-13 Andreas Mang m...@imt.uni-luebeck.de: I do not know if there is a solution to this. The following would work for your example: \in{figure}[alpha]--\in[gamma] Of course this is a quite rigid solution, that does not safeguard against changes in figure order That's what I am

Re: [NTG-context] Referring to multiple elements

2012-09-14 Thread Sietse Brouwer
Hi Marco, The heart of what you need is a lua function that will take an array of numbers, and return an array of consective-number runs, like so: fignumarray = {1, 2, 3,5, 6,8, 10, 11, 12} -- figruns = get_runs(fignumarray) -- returns a table structured like so: -- figruns[1].start =

[NTG-context] Referring to multiple elements

2012-09-13 Thread Marco Patzer
Hi, how can I refer to multiple elements at the same time? \starttext \startplacefigure [title=foo, reference=alpha] \stopplacefigure \startplacefigure [title=bar, reference=beta] \stopplacefigure \startplacefigure [title=bar, reference=gamma] \stopplacefigure \in{figure}[alpha,beta,gamma]

Re: [NTG-context] Referring to multiple elements

2012-09-13 Thread Andreas Mang
Hi Marco, I do not know if there is a solution to this. The following would work for your example: \in{figure}[alpha]--\in[gamma] Of course this is a quite rigid solution, that does not safeguard against changes in figure order...So probably not what you were looking for. Cheers, Andreas Am