* \defineprocessor and \at @ 2015-08-03 22:18 Rik Kabel 2015-08-11 18:34 ` Rik Kabel 2015-08-11 18:49 ` Wolfgang Schuster 0 siblings, 2 replies; 8+ messages in thread From: Rik Kabel @ 2015-08-03 22:18 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 492 bytes --] 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[xx][style=slanted,after=n] \starttext \section[xxx]{Processor testing} Why cannot a processor be applied to a reference? \at[xx->xxx] \stoptext -- Rik [-- Attachment #1.2: Type: text/html, Size: 835 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: \defineprocessor and \at 2015-08-03 22:18 \defineprocessor and \at Rik Kabel @ 2015-08-11 18:34 ` Rik Kabel 2015-08-11 18:49 ` Wolfgang Schuster 1 sibling, 0 replies; 8+ messages in thread From: Rik Kabel @ 2015-08-11 18:34 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 563 bytes --] On 2015-08-03 18:18, Rik Kabel wrote: > 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[xx][style=slanted,after=n] > \starttext > \section[xxx]{Processor testing} > Why cannot a processor be applied to a reference? \at[xx->xxx] > \stoptext > > Anyone? -- Rik [-- Attachment #1.2: Type: text/html, Size: 1155 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: \defineprocessor and \at 2015-08-03 22:18 \defineprocessor and \at 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 22:29 ` Rik Kabel 1 sibling, 2 replies; 8+ messages in thread From: Wolfgang Schuster @ 2015-08-11 18:49 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 909 bytes --] > 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 [-- Attachment #1.2: Type: text/html, Size: 2073 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: \defineprocessor and \at 2015-08-11 18:49 ` Wolfgang Schuster @ 2015-08-11 19:41 ` Rik Kabel 2015-08-11 19:48 ` Wolfgang Schuster 2015-08-11 22:29 ` Rik Kabel 1 sibling, 1 reply; 8+ messages in thread From: Rik Kabel @ 2015-08-11 19:41 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 1203 bytes --] 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 > Thank you, Wolfgang, for that. But it still does not handle the after key, as I had in my example, and which works in a processor for index entries. Is there no way to do this? -- Rik [-- Attachment #1.2: Type: text/html, Size: 3037 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: \defineprocessor and \at 2015-08-11 19:41 ` Rik Kabel @ 2015-08-11 19:48 ` Wolfgang Schuster 2015-08-11 20:03 ` Rik Kabel 0 siblings, 1 reply; 8+ messages in thread From: Wolfgang Schuster @ 2015-08-11 19:48 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 399 bytes --] > Rik Kabel <mailto:context@rik.users.panix.com> > 11. August 2015 21:41 > On 2015-08-11 14:49, Wolfgang Schuster wrote: > Thank you, Wolfgang, for that. But it still does not handle the after > key, as I had in my example, and which works in a processor for index > entries. Is there no way to do this? The processor mechanism has no after key and I have no idea what it is shoudl do. Wolfgang [-- Attachment #1.2: Type: text/html, Size: 1499 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: \defineprocessor and \at 2015-08-11 19:48 ` Wolfgang Schuster @ 2015-08-11 20:03 ` Rik Kabel 0 siblings, 0 replies; 8+ messages in thread From: Rik Kabel @ 2015-08-11 20:03 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 1814 bytes --] On 2015-08-11 15:48, Wolfgang Schuster wrote: >> Rik Kabel <mailto:context@rik.users.panix.com> >> 11. August 2015 21:41 >> On 2015-08-11 14:49, Wolfgang Schuster wrote: >> Thank you, Wolfgang, for that. But it still does not handle the after >> key, as I had in my example, and which works in a processor for index >> entries. Is there no way to do this? > The processor mechanism has no after key and I have no idea what it is > shoudl do. > My apologies, Wolfgang and list. The key I use is right, as in the following snippet from my environment. I should have checked my files instead of relying on memory when I replied. When I add it to your solution it does work. \defineprocessor[Back][ style=slanted, right=n, ] \defineprocessor[notBack][ style=normal, ] \defineregister[Index] \setupregister [Index][n=2, command=\Word, balance=no, compress=yes, ] \starttexdefinition unexpanded index \dosingleempty\dostartindex \stoptexdefinition \starttexdefinition dostartindex [#sortkey] \doifmodeelse{*backpart} {\Index[Back->#sortkey]} {\Index[notBack->#sortkey]} \stoptexdefinition \starttexdefinition unexpanded seeindex \seeIndex \stoptexdefinition \starttexdefinition doIndex #INDEXTERM \expanded{\index{#INDEXTERM}} \stoptexdefinition With this, I can use \index[Macintyre]{McIntyre, John} in the main text or an endnote and the indexing will identify the section. My simple use of the processor did not work, however, for references. -- Rik [-- Attachment #1.2: Type: text/html, Size: 4555 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: \defineprocessor and \at 2015-08-11 18:49 ` Wolfgang Schuster 2015-08-11 19:41 ` Rik Kabel @ 2015-08-11 22:29 ` Rik Kabel 2015-08-12 13:10 ` Wolfgang Schuster 1 sibling, 1 reply; 8+ messages in thread From: Rik Kabel @ 2015-08-11 22:29 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 1851 bytes --] 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. -- Rik [-- Attachment #1.2: Type: text/html, Size: 3868 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: \defineprocessor and \at 2015-08-11 22:29 ` Rik Kabel @ 2015-08-12 13:10 ` Wolfgang Schuster 0 siblings, 0 replies; 8+ messages in thread From: Wolfgang Schuster @ 2015-08-12 13:10 UTC (permalink / raw) To: mailing list for ConTeXt users [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-08-12 13:10 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-08-03 22:18 \defineprocessor and \at 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 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).