ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Hynek, Stefan" <stefan.hynek@uni-goettingen.de>
To: "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: Definition of \registerpagerange
Date: Tue, 5 May 2020 08:35:09 +0000	[thread overview]
Message-ID: <190333a4ea36f6f032fac1435d482778ad5d6893.camel@uni-goettingen.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1124 bytes --]

Hello fellow ConTeXies, 

since April 2019 it is possible to use \setupregister with
compress=text which is a fine addition and has its use cases.
Unfortunately, I am confronted with the demand to style the registers
with 'f.' for a following single page and else with page ranges. Since
the Definition of \registerpagerange is not well documented I don't
know which parameter to check for the conditional statement when
rewriting it. Could you please give me a hint? 

In ConTeXt that shipped with TeXlive 2015 it worked that way:
\unexpanded\def\registerpagerange#1#2#3#4#5#6#7%
    {\registerpageseparator
     \global\setconstant\c_strc_registers_page_state\plusone
     \dostarttagged\t!registerpagerange\empty
     \dostarttagged\t!registerfrompage\empty
     \withregisterpagecommand{#1}{#2}{#3}{#4}%
     \dostoptagged
     \ifnum\the\numexpr#6-#3\relax=1
       f.%
     \else
       \registeronepagerangeseparator
       \dostarttagged\t!registertopage\empty
       \withregisterpagecommand{#1}{#5}{#6}{#7}%
       \dostoptagged
     \fi
     \dostoptagged}

With best regards
Stefan

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 7015 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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:[~2020-05-05  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  8:35 Hynek, Stefan [this message]
2020-05-05 10:08 ` Henning Hraban Ramm

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=190333a4ea36f6f032fac1435d482778ad5d6893.camel@uni-goettingen.de \
    --to=stefan.hynek@uni-goettingen.de \
    --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).