* \seeindex and processors
@ 2012-07-13 7:57 Wolfgang Schuster
2012-07-13 17:23 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2012-07-13 7:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Hans,
processors aren’t applied to the second argument of \seeindex, only the first is formatted.
\defineprocessor[smallcaps][style=\sc]
\starttext
Apples\index{smallcaps->Apple}
Malus domestica\seeindex{smallcaps->Malus domestica}{smallcaps->Apple}
\placeindex[n=1]
\stoptext
Wolfgang
___________________________________________________________________________________
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] 4+ messages in thread
* Re: \seeindex and processors
2012-07-13 7:57 \seeindex and processors Wolfgang Schuster
@ 2012-07-13 17:23 ` Hans Hagen
2012-07-13 17:56 ` Andreas Mang
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2012-07-13 17:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 13-7-2012 09:57, Wolfgang Schuster wrote:
> Hi Hans,
>
> processors aren’t applied to the second argument of \seeindex, only the first is formatted.
>
> \defineprocessor[smallcaps][style=\sc]
>
> \starttext
>
> Apples\index{smallcaps->Apple}
>
> Malus domestica\seeindex{smallcaps->Malus domestica}{smallcaps->Apple}
>
> \placeindex[n=1]
>
> \stoptext
ok, so the next beta will have
\setupinteraction[state=start]
\defineprocessor[smallcaps][style=\sc]
\defineprocessor[bold] [style=\bf]
\starttext
Apples\index{smallcaps->Apple}
Pears\index{Pears}
Malus domestica\seeindex{smallcaps->Malus domestica}{bold->Apple}
Bonus domestica\seeindex{Bonus domestica}{Pears}
\placeindex[n=1]
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \seeindex and processors
2012-07-13 17:23 ` Hans Hagen
@ 2012-07-13 17:56 ` Andreas Mang
2012-07-14 15:05 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Mang @ 2012-07-13 17:56 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear Hans & Wolfgang,
Thanks for looking into this. I know that this has quite low priority. As it seems to me processors do not really seem to provide the behaviour I had in mind. Clearly, I should have thought of a better example in the first place:
%%%%%%%%%%%%%
\defineprocessor[smallcaps][style=\sc]
\starttext
% this works nicely
{\sc Test}\index{smallcaps->Test}
% this is what I want it to look like
% (which does not work for \seeindex[.])
\index{{\sc Cauchy}||Problem}
% this is what I tried after you have suggested
% to use processors, but it does not work (*)
{\sc Cauchy}||Problem\index{{smallcaps->Cauchy}||Problem}
\placeindex[n=1]
\stoptext
%%%%%%%%%%%%%
(*) As you can see I am using smallcaps as an indicator for a "personal name". From looking at the code (I have to admit that I do not know anything about what's beyond the context front end) I think there's no quick solution to get this to work with preprocessors. Am I doing something wrong?
If you do not have the time to look into this right now never mind.
Sorry for the hassle.
Cheers,
Andreas
Am Jul 13, 2012 um 7:23 PM schrieb Hans Hagen:
> On 13-7-2012 09:57, Wolfgang Schuster wrote:
>> Hi Hans,
>>
>> processors aren’t applied to the second argument of \seeindex, only the first is formatted.
>>
>> \defineprocessor[smallcaps][style=\sc]
>>
>> \starttext
>>
>> Apples\index{smallcaps->Apple}
>>
>> Malus domestica\seeindex{smallcaps->Malus domestica}{smallcaps->Apple}
>>
>> \placeindex[n=1]
>>
>> \stoptext
>
> ok, so the next beta will have
>
> \setupinteraction[state=start]
>
> \defineprocessor[smallcaps][style=\sc]
> \defineprocessor[bold] [style=\bf]
>
> \starttext
>
> Apples\index{smallcaps->Apple}
> Pears\index{Pears}
>
> Malus domestica\seeindex{smallcaps->Malus domestica}{bold->Apple}
>
> Bonus domestica\seeindex{Bonus domestica}{Pears}
>
> \placeindex[n=1]
>
> \stoptext
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
> | 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://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
--
Andreas Mang, MSc
Research Associate
UNIVERSITY OF LUEBECK
INSTITUTE OF MEDICAL ENGINEERING
Division of Computer Science,
Engineering and Natural Sciences
Ratzeburger Allee 160, Building 64
23562 Luebeck, Germany
Phone: +49 (0) 451 500 5416
Fax: +49 (0) 451 500 5403
mang@imt.uni-luebeck.de
http://www.imt.uni-luebeck.de
___________________________________________________________________________________
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] 4+ messages in thread
* Re: \seeindex and processors
2012-07-13 17:56 ` Andreas Mang
@ 2012-07-14 15:05 ` Wolfgang Schuster
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2012-07-14 15:05 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
Am 13.07.2012 um 19:56 schrieb Andreas Mang:
> Dear Hans & Wolfgang,
>
> Thanks for looking into this. I know that this has quite low priority. As it seems to me processors do not really seem to provide the behaviour I had in mind. Clearly, I should have thought of a better example in the first place:
>
> %%%%%%%%%%%%%
> \defineprocessor[smallcaps][style=\sc]
>
> \starttext
>
> % this works nicely
> {\sc Test}\index{smallcaps->Test}
>
> % this is what I want it to look like
> % (which does not work for \seeindex[.])
> \index{{\sc Cauchy}||Problem}
>
> % this is what I tried after you have suggested
> % to use processors, but it does not work (*)
> {\sc Cauchy}||Problem\index{{smallcaps->Cauchy}||Problem}
>
> \placeindex[n=1]
>
> \stoptext
> %%%%%%%%%%%%%
>
> (*) As you can see I am using smallcaps as an indicator for a "personal name". From looking at the code (I have to admit that I do not know anything about what's beyond the context front end) I think there's no quick solution to get this to work with preprocessors. Am I doing something wrong?
With a simple change of the string type in strc-reg.mkiv you can also use commands/style switches in \seeindex:
\def\strc_registers_insert_see_indeed#1#2#3#4% register key entry seeword
{\begingroup
...
entries = {
% we need a special one for xml, this is just a single one
- "\currentregisterentries", "#2"
+ \!!bs\currentregisterentries\!!es, "#2"
},
seeword = {
- text = "\currentregisterseeword"
+ text = \!!bs\currentregisterseeword\!!es
},
}
}}%
\endgroup}
Wolfgang
___________________________________________________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2012-07-14 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-13 7:57 \seeindex and processors Wolfgang Schuster
2012-07-13 17:23 ` Hans Hagen
2012-07-13 17:56 ` Andreas Mang
2012-07-14 15:05 ` 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).