On 2/27/2021 6:28 PM, denis.maier@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 -----------------------------------------------------------------