[NTG-context] page ranges in \markpage

Pablo Rodriguez oinos at gmx.es
Sun Jul 22 13:28:12 CEST 2018


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


More information about the ntg-context mailing list