On 07/20/2018 12:19 AM, Hans Hagen wrote: > [...] > or even better > > local function getpagearray(str,max) > local list = { } > local function add(i) > list[i] = true > end > if max then > utilities.parsers.stepper(str,max,add) > else > utilities.parsers.stepper(str,add) > end > return table.sortedkeys(list) > end > [...] > and then > > function document.printmarkedpageranges(tag,str) > context.markpage({ tag }, getpagearray(str)) > end
Many thanks for your code, Hans. Is there no chance that this functionality could make its way into the ConTeXt source? Many thanks for your help, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________