[NTG-context] \defineprocessor and \at

Wolfgang Schuster schuster.wolfgang at gmail.com
Wed Aug 12 15:10:44 CEST 2015


> Rik Kabel <mailto:context at rik.users.panix.com>
> 12. August 2015 00:29
> On 2015-08-11 14:49, Wolfgang Schuster wrote:
>>> Rik Kabel <mailto:context at rik.users.panix.com>
>>> 4. August 2015 00:18
>>> Should processors work with references? I would think that they 
>>> should, but the following fails. (My backmatter page numbers need to 
>>> be marked to distinguish them from bodymatter pages. I can automate 
>>> applying a processor based on the location for index register 
>>> entries, but not for references.)
>> \defineprocessor [bodypart] [style=bold]
>> \defineprocessor [backpart] [style=italic]
>>
>> \defineconversionset[bodypart:pagenumber][][bodypart->n]
>> \defineconversionset[backpart:pagenumber][][backpart->n]
>>
>> \setupheadertexts[{\convertedcounter[userpage][numberconversionset=number]}]
>>
>> \starttext
>>
>> \startbodymatter
>>
>> \chapter[sec:knuth]{Knuth}
>>
>> \at{page}[sec:knuth]\par
>> \at{page}[sec:zapf]
>>
>> \stopbodymatter
>>
>> \startbackmatter
>>
>> \chapter[sec:zapf]{Zapf}
>>
>> \at{page}[sec:knuth]\par
>> \at{page}[sec:zapf]
>>
>> \stopbackmatter
>>
>> \stoptext
>>
>> Wolfgang
>>
> Wolfgang,
>
> This is clearly a superior solution to my index-only attempt, handling 
> all references to backmatter pages without regard to their being in 
> the index or in text references.
>
> However, the page number adjustment via \setupheadertexts is handled 
> only at the top center (default location) of each page. Can you 
> suggest how to modify this to support an un-processed page number in 
> the right margin of the footer of backmatter pages? I currently use:
>
>     \setupheadertexts[][chapter][part][]
>     \setuppagenumbering [alternative=doublesided,location={footer,margin}]
>
> and I do not see where 
> {\convertedcounter[userpage][numberconversionset=number]} or something 
> else to restore un-processed numbers might work, despite trying with 
> \setupfootertexts, \setuppagenumbering, \setuppagenumbering, and 
> related commands.
Disable the page number (\setuppagenumbering[location=none]) and use 
\setupfootertexts to place it.

\setupfootertexts[margin][][{\convertedcounter[userpage][numberconversionset=number]}][{\convertedcounter[userpage][numberconversionset=number]}][]
\setuppagenumbering [alternative=doublesided,location=none]

Wolfgang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150812/9a1b030a/attachment.html>


More information about the ntg-context mailing list