# [NTG-context] Definition of \registerpagerange

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


smime.p7s
Description: S/MIME cryptographic signature

___________________________________________________________________________________
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
___________________________________________________________________________________