> On Tue, Apr 15, 2008 at 8:47 PM, Drazen Baic <[EMAIL PROTECTED]> wrote:
>  > On Tue, Apr 15, 2008 at 6:51 PM, Hans Hagen <[EMAIL PROTECTED]> wrote:
>  >  > Drazen Baic wrote:
>  >  >  > Hi,
>  >  >  >
>  >  >  > Here is a small test file. Compiled with 'texexec --lua' the register
>  >  >  > has only the entry 'Software 1' but it should have one additional
>  >  >  > entry 'Apache see Software'. This works OK when compiled with
>  >  >  > 'texexec --xtx'
>  >  >  >
>  >  >  > \starttext
>  >  >  > \index{Software}Software
>  >  >  > \seeindex{Apache}{Software}Apache
>  >  >  >
>  >  >  > \placeindex
>  >  >  > \stoptext
>  >  >
>  >  >  see was not supported yet; i added it
>
>  I just did an update to ConTeXt 2008.04.15 21:21 and it works perfectly
>  for my example above. But if you use abbreviations the 'see ...' entry in
>  the registers shows the value between the brackets in the abbreviation
>  definition. Here is a small example:
>
>  \definesynonyms [abbreviation] [abbreviations][\infull]
>  \setupsynonyms [abbreviation]
>  \abbreviation [GCc] {\sc gcc} {GNU C Compiler}
>  \abbreviation [GNU] {\sc gnu} {{\sc gnu'}s Not Unix}
>
>
>  \starttext
>  \index{Software}Software
>  \seeindex{Apache}{Software}Apache
>  \index[GCC]{\GCc}\GCc\
>  \seeindex[GNU C Compiler]{\GNU\ C Compiler}{\GCc}\GNU\ C Compiler
>
>  \placeindex
>
>  \stoptext
>
>  I defined the GCc abbreviation with small c on purpose to demonstrate
>  that 'GCc' shows up in the register instead of {\sc gcc}.
>
>  I tried to look at the file core-reg.lua and thought that the error has
>  to be at
>
>  if vv[1] == 'e' then
>     -- format reference pagespec realpage
>     flush(template.page:format(class,",",vv[4],vv[5],vv[3]))
>  elseif vv[1] == 's' then
>     flush(template.see:format(class,",",vv[5],vv[3]))
>
>  but as I know nothing about Lua I gave up pretty soon.
>
>  Regards,
>  Drazen
>

I played a little bit around with the above sample and thought that
putting a second '\' in front of the second argument for the \seeindex
command could help as it looks like the abbreviation \GCc looses the
backslash when the 'see' entry is generated in the registry.

As this was working I looked at the '.toc' file and saw that the key and
entry values are enclosed between [===[ and ]===] but the abbreviation
\GCc wasn't. I thought that maybe this works like an escaping mechanism
and changed the command \mksaveregistersee in core-reg.mkiv from

\def\mksaveregistersee#1#2#3#4#5#6#7% class type reference key entry
see pagespec
  
{\expanded{\writeutilitytua{ti(jr['#1'],{'#2','#3',\!!bs#4\!!es,\!!bs#5\!!es,'#6','#7'})}}}

to

\def\mksaveregistersee#1#2#3#4#5#6#7% class type reference key entry
see pagespec
  
{\expanded{\writeutilitytua{ti(jr['#1'],{'#2','#3',\!!bs#4\!!es,\!!bs#5\!!es,\!!bs#6\!!es,'#7'})}}}

and it worked. I don't know if this breaks something else and if I was
right with what
I thought but the register is now created correctly and I couldn't see
anything weird
going on.

Regards,
Drazen
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to