2007/12/4, Peter Münster
On Tue, Dec 04, 2007 at 04:57:51PM +0100, Wolfgang Schuster wrote:
this is a bug in the mkiv sorting macros, I posted a similiar message a few days ago but got no answer.
Hello Wolfgang,
Indeed, now I remember... (But one long week was time enough for me to forget it.)
\def\mksavesortedlistentry#1#2#3#4% class key entry meaning
{\immediatewriteutilitytua{ti(js['#1'],{'e','#2',\!!bs#3\!!es,\!!bs#4\!!es})}}
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})}}
Both versions give wrong output with optional arguments. But the following version works for me:
I forgot to mention you have to regenrate the format with my solution, your seems to work but I found a way to stop processing because you the optinal argument can also be used to write a mcro in the first pair of braces and this can produce problems. You can try to add the following synonym and TeX give you a error message. \test[zB]{z.\thinspace B.}{zum Beispiel}
% engine=luatex \unprotect \def\mksavesortedlistentry#1#2#3#4% class key entry meaning {\immediatewriteutilitytua{table.insert(js['#1'],{'e','#3',\!!bs#3\!!es,\!!bs#4\!!es})}} \protect \definesynonyms[test][tests] \test[bbb]{short text}{long description} \test[aaa]{a short text}{a long description} \starttext \bbb~\aaa \placelistoftests \stoptext
Cheers, Peter
Wolfgang