ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Drazen Baic" <dpeterx@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: LuaTeX problems with \seeindex and \from
Date: Wed, 16 Apr 2008 23:43:26 +0200	[thread overview]
Message-ID: <6607a2f30804161443k51df5cddhe5bf63569e28d385@mail.gmail.com> (raw)
In-Reply-To: <6607a2f30804151502w4e2079a8h7ffa8b060107696f@mail.gmail.com>

> On Tue, Apr 15, 2008 at 8:47 PM, Drazen Baic <dpeterx@googlemail.com> wrote:
>  > On Tue, Apr 15, 2008 at 6:51 PM, Hans Hagen <pragma@wxs.nl> 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	other threads:[~2008-04-16 21:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13  9:57 Drazen Baic
2008-04-14  7:57 ` Taco Hoekwater
2008-04-14 16:50   ` Drazen Baic
2008-04-15  9:15     ` Taco Hoekwater
2008-04-15  9:28       ` Mojca Miklavec
2008-04-15  9:33         ` Taco Hoekwater
2008-04-15 14:03     ` Taco Hoekwater
2008-04-15 16:46       ` Drazen Baic
2008-04-15 16:51         ` Taco Hoekwater
2008-04-14 13:40 ` Hans Hagen
2008-04-14 16:50   ` Drazen Baic
2008-04-15 16:51     ` Hans Hagen
2008-04-15 18:47       ` Drazen Baic
2008-04-15 22:02         ` Drazen Baic
2008-04-16 21:43           ` Drazen Baic [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=6607a2f30804161443k51df5cddhe5bf63569e28d385@mail.gmail.com \
    --to=dpeterx@googlemail.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).