Am Sa., 21. Sept. 2024 um 13:31 Uhr schrieb Michael Guravage <guravage@literatesolutions.com>:
Greetings,

Regardless of the selection criteria, the select tool selects only the first page. This feature works in my ConTeXt versions from 2024.05.17 and 2024.08.13. I'm running the latest version, i.e. 2024.09.17.

context --extra=select --selection=11:16 forexample.pdf

I've attached the output in a log file if anyone's interested.

Any suggestions?


You have to patch syst-aux.mkxl (or wait for a new release by Hans).

1. Add \number in front of \numexpr.

2. Change "+\plusone" at the end to "-\plusone".

\def\syst_helpers_with_range_slice#1%
  {\splitstring#1\at:\to\m_syst_helpers_range_from\and\m_syst_helpers_range_to
   \ifx\m_syst_helpers_range_from\wildcardsymbol
     \edef\m_syst_helpers_range_from{\number\c_helpers_range_min}%
   \fi
   \ifx\m_syst_helpers_range_to\wildcardsymbol
     \edef\m_syst_helpers_range_to{\number\c_helpers_range_max}%
   \fi
   \ifempty\m_syst_helpers_range_to
     \let\m_syst_helpers_range_to\m_syst_helpers_range_from
   \fi
   \ifnum\m_syst_helpers_range_from<\zerocount
     \dostepwiserecurse
       \m_syst_helpers_range_from
       \m_syst_helpers_range_to
       {\ifnum\m_syst_helpers_range_from>\m_syst_helpers_range_to\minusone\else\plusone\fi}
       {%(\the\numexpr\c_helpers_range_abs_max+##1+\plusone\relax)
-       \m_helpers_range_action{\numexpr\c_helpers_range_abs_max+##1+\plusone\relax}}%
+       \m_helpers_range_action{\number\numexpr\c_helpers_range_abs_max+##1+\plusone\relax}}%
   \else
     \dostepwiserecurse
       \m_syst_helpers_range_from
       \m_syst_helpers_range_to
       {\ifnum\m_syst_helpers_range_from>\m_syst_helpers_range_to\minusone\else\plusone\fi}
       {%(\the\numexpr\c_helpers_range_abs_min+##1-\plusone\relax)
-       \m_helpers_range_action{\numexpr\c_helpers_range_abs_min+##1+\plusone\relax}}%
+       \m_helpers_range_action{\number\numexpr\c_helpers_range_abs_min+##1-\plusone\relax}}%
   \fi}%
 
Wolfgang