ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \defineprocessor and \at
Date: Wed, 12 Aug 2015 15:10:44 +0200	[thread overview]
Message-ID: <55CB45D4.4010604@gmail.com> (raw)
In-Reply-To: <55CA772C.2090709@rik.users.panix.com>


[-- Attachment #1.1: Type: text/plain, Size: 2309 bytes --]

> Rik Kabel <mailto:context@rik.users.panix.com>
> 12. August 2015 00:29
> On 2015-08-11 14:49, Wolfgang Schuster wrote:
>>> Rik Kabel <mailto:context@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

[-- Attachment #1.2: Type: text/html, Size: 4997 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2015-08-12 13:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 22:18 Rik Kabel
2015-08-11 18:34 ` Rik Kabel
2015-08-11 18:49 ` Wolfgang Schuster
2015-08-11 19:41   ` Rik Kabel
2015-08-11 19:48     ` Wolfgang Schuster
2015-08-11 20:03       ` Rik Kabel
2015-08-11 22:29   ` Rik Kabel
2015-08-12 13:10     ` Wolfgang Schuster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55CB45D4.4010604@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).