ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: page ranges in \markpage
Date: Sun, 22 Jul 2018 13:28:12 +0200	[thread overview]
Message-ID: <73ae2fe8-fe21-cdcc-8564-e3e2ede987c2@gmx.es> (raw)
In-Reply-To: <57f6d55e-a471-9c37-3eb4-2368868e8d29@xs4all.nl>

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
___________________________________________________________________________________

      reply	other threads:[~2018-07-22 11:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 16:19 Pablo Rodriguez
2018-07-18 17:40 ` Wolfgang Schuster
2018-07-18 18:44   ` Pablo Rodriguez
2018-07-18 19:08     ` Wolfgang Schuster
2018-07-18 19:38       ` Pablo Rodriguez
2018-07-19 19:56       ` Pablo Rodriguez
2018-07-19 22:19         ` Hans Hagen
2018-07-22 11:28           ` Pablo Rodriguez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73ae2fe8-fe21-cdcc-8564-e3e2ede987c2@gmx.es \
    --to=oinos@gmx.es \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).