Thanks for this as well, Hans. Looks promising. So, this is to select pages or page-ranges for processing?
> -----Ursprüngliche Nachricht----- > Von: Hans Hagen <j.ha...@xs4all.nl> > Gesendet: Freitag, 5. März 2021 11:29 > An: Maier, Denis Christian (UB) <denis.ma...@ub.unibe.ch>; ntg- > cont...@ntg.nl > Betreff: Re: AW: [NTG-context] Write to tuc file > > On 2/27/2021 6:28 PM, denis.ma...@ub.unibe.ch wrote: > > It's a book that will be published in two volumes, continually paginated. > > In the end I need two pdf files, but I thought it might be easier to treat > them as one volume and just split the files with some external tool > afterwards. > > > > I could also treat them as two individual books, but then I'd have to get > > the > last page number of volume 1 in volume 2. > In the early days of context (more than 2 decades ago) we had a printer > where we could inject from different trays and that is why we have a feature > in context to mark pages (so that directives for printers could be inserted). > This feature survived / evolved into marked pages. > > You can do this (oeps.tex): > > \starttext > > \chapter[one]{One} > > \markpage[first] test \page test \page > \markpage[second] test \page > > \chapter[two]{Two} > > test \page > \markpage[fourth] test > > \page > > % \doifelsemarkedpage{second}{YES}{NO} > % \doifelsemarkedpage{fourth}{YES}{NO} > > % \page > > % \doifelsemarkedpage{second}{YES}{NO} > % \doifelsemarkedpage{fourth}{YES}{NO} > > \stoptext > > So, I was wondering if we can expose that differently. > > >context --pages oeps > mtx-context | page : 0001 first > mtx-context | page : 0003 second > mtx-context | page : 0005 fourth > > >context --pages --page=second oeps > mtx-context | page : 0003 second > > >context --pages --page=second,fourth oeps > mtx-context | page : 0003 second > mtx-context | page : 0005 fourth > > But, as you're talking chapters, a variants (with less overhead) is: > > >context --pages --list=one,two oeps > mtx-context | list : 0001 one > mtx-context | list : 0004 two > > Which of course assumes that you have a reference for the chapters. > > This --pages feature is in the latest upload. > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________