# [NTG-context] Write to tuc file

Pablo Rodriguez oinos at gmx.es
Sat Mar 6 13:56:31 CET 2021

```On 3/5/21 11:13 PM, Hans Hagen wrote:
> On 3/5/2021 10:38 PM, denis.maier at ub.unibe.ch wrote:
>> Thanks for this as well, Hans. Looks promising.
>> So, this is to select pages or page-ranges for processing?
> assuming that you have either marked pages or proper refs for chapters
> you can use the reported values and feed them into whatever
>
> i could add something to the select style but i guess then there is no
> uniformity in how users do this

Many thanks for the new stuff, Hans.

This could be an approach:

\starttext
\completecontent
\dorecurse{10}
{\startchapter\markpage[start-\recurselevel]
\dorecurse{\randomnumber{0}{1000}}
{\input knuth\par}
\markpage[stop-\recurselevel]\stopchapter}
\stoptext

"start-" and "stop-" could define page ranges when the same identifier
is used.

The select style could generate from start-identifier and
stop-identifier, the result "identifier.pdf".

I think this is a simple approach.