From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40373 Path: news.gmane.org!not-for-mail From: "Drazen Baic" Newsgroups: gmane.comp.tex.context Subject: Re: LuaTeX problems with \seeindex and \from Date: Wed, 16 Apr 2008 23:43:26 +0200 Message-ID: <6607a2f30804161443k51df5cddhe5bf63569e28d385@mail.gmail.com> References: <6607a2f30804130257ha29a255s27845a69d0e31a6d@mail.gmail.com> <48035EBB.4020507@wxs.nl> <6607a2f30804140950v11858135ib5f770dc5b2535c4@mail.gmail.com> <4804DCF4.7070909@wxs.nl> <6607a2f30804151147j583df5eas56e313d3e843b454@mail.gmail.com> <6607a2f30804151502w4e2079a8h7ffa8b060107696f@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208382296 20919 80.91.229.12 (16 Apr 2008 21:44:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2008 21:44:56 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 16 23:45:34 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JmFRX-0005xp-CN for gctc-ntg-context-518@m.gmane.org; Wed, 16 Apr 2008 23:45:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D95271FCC7; Wed, 16 Apr 2008 23:44:46 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19548-02-9; Wed, 16 Apr 2008 23:44:09 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 085A31FC78; Wed, 16 Apr 2008 23:44:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 20E5B1FC03 for ; Wed, 16 Apr 2008 23:44:08 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19548-02-8 for ; Wed, 16 Apr 2008 23:43:35 +0200 (CEST) Original-Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by ronja.ntg.nl (Postfix) with ESMTP id 367D01FCE4 for ; Wed, 16 Apr 2008 23:43:27 +0200 (CEST) Original-Received: by py-out-1112.google.com with SMTP id x79so3001119pyg.5 for ; Wed, 16 Apr 2008 14:43:26 -0700 (PDT) Original-Received: by 10.35.65.9 with SMTP id s9mr922060pyk.4.1208382206180; Wed, 16 Apr 2008 14:43:26 -0700 (PDT) Original-Received: by 10.35.61.7 with HTTP; Wed, 16 Apr 2008 14:43:26 -0700 (PDT) In-Reply-To: <6607a2f30804151502w4e2079a8h7ffa8b060107696f@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:40373 Archived-At: > On Tue, Apr 15, 2008 at 8:47 PM, Drazen Baic wrote: > > On Tue, Apr 15, 2008 at 6:51 PM, Hans Hagen 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 ___________________________________________________________________________________