From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/37672 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: synonyms with MKIV Date: Tue, 4 Dec 2007 16:57:51 +0100 Message-ID: <115224fb0712040757l6f303c41q9c0d4565a2b7a989@mail.gmail.com> References: <20071203164416.GA17359@gaston.couberia.bzh> <115224fb0712030958w65d918f2n921e1e9a3dc99aab@mail.gmail.com> <475459D2.3020709@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1196786622 29756 80.91.229.12 (4 Dec 2007 16:43:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2007 16:43:42 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 04 17:43:51 2007 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 1IzasA-0000C7-8m for gctc-ntg-context-518@m.gmane.org; Tue, 04 Dec 2007 17:43:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CB0EC1FBE8; Tue, 4 Dec 2007 17:43:28 +0100 (CET) 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 08619-01-5; Tue, 4 Dec 2007 17:42:53 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9170E1FCDD; Tue, 4 Dec 2007 17:40:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CD34A1FCDD for ; Tue, 4 Dec 2007 17:40:45 +0100 (CET) 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 06657-02-3 for ; Tue, 4 Dec 2007 17:39:59 +0100 (CET) Original-Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by ronja.ntg.nl (Postfix) with ESMTP id 4C12D1FDEA for ; Tue, 4 Dec 2007 16:57:52 +0100 (CET) Original-Received: by ug-out-1314.google.com with SMTP id q2so95631uge for ; Tue, 04 Dec 2007 07:57:51 -0800 (PST) Original-Received: by 10.66.219.11 with SMTP id r11mr905925ugg.1196783871558; Tue, 04 Dec 2007 07:57:51 -0800 (PST) Original-Received: by 10.67.122.17 with HTTP; Tue, 4 Dec 2007 07:57:51 -0800 (PST) In-Reply-To: <475459D2.3020709@wxs.nl> 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:37672 Archived-At: 2007/12/3, Hans Hagen : > Wolfgang Schuster wrote: > > 2007/12/3, Peter M=FCnster : > >> Hello, > >> > >> I get unexpected output with this test-file: > >> > >> % engine=3Dluatex > >> \definesynonyms[test][tests] > >> \test{testOne}{first test} > >> \test{testTwo}{second test} > >> \starttext > >> \testOne > >> \placelistoftests > >> \stoptext > >> > >> I would expect: > >> > >> testOne > >> testOne first test > >> > >> but I get: > >> > >> testOne > >> test testOne > >> > >> (Perhaps a problem with parameter numbers #1, #2 etc. ?) > >> > >> Cheers, Peter > > > > Hi Peter, > > > > this is a bug in the mkiv sorting macros, I posted a similiar message > > a few days ago but got no answer. > > \def\mksavesortedlistentry#1#2#3#4% class key entry meaning > > {\immediatewriteutilitytua{ti(js['#1'],{'e','#2',\!!bs#3\!!es,\!!bs#4\!!e= s})}} > > seems to work this line should be \def\mksavesortedlistentry#1#2#3#4% class key entry meaning {\immediatewriteutilitytua{table.insert(js['#1'],{'e','#1',\!!bs#2\!!es,\= !!bs#3\!!es})}} but there is also a big in core-syn.lua the following works for me, the order is "key, value" and not "value, key". I patched this at the moment in my format files and the output of the synonym table is now correct :-) function job.loadsortedlist(class) if job.sortedlists[class] then if not sorters.list.data[class] then sorters.list.data[class] =3D { language =3D 'en', entries =3D { }, flush =3D function(s) tex.sprint(tex.ctxcatcodes,s) end, sorted =3D false, class =3D class } local entries =3D sorters.list.data[class].entries for k,v in ipairs(job.sortedlists[class]) do if v[1] =3D=3D 'l' then -- language sorters.list.data[class].language =3D v[2] else entries[#entries+1] =3D { v[1], -- kind (e) { { v[2], v[3] } }, -- key, entry v[4] -- optional meaning } end end end sorters.list.process(sorters.list.data[class]) end end Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________