[dev-context] Bug in ruby register code?

Duncan Hothersall dh at capdm.com
Thu Oct 12 17:08:12 CEST 2006


Seems to be a bug in the ruby code that works properly in the perl. Try:

----
\starttext
\index{Knuth}\input knuth \par
\seeindex{Knuth}{Tufte}\input tufte \par
\blank\placeindex
\stoptext
----

With the perl scripts it's right:

Knuth 1
  see Tufte

but with the new ruby scripts it's wrong:

Knuth
  see Tufte, 1

I don't know if it's relevant but the difference between the two .tuo
files seems just to be reversal of two lines; the perl run shows:

\registerentry{index}{k}
\registerentrya{index}{Knuth}
\registerpage{index}{,}{1}{2--0-0-0-0-0-0-0--1}{1}
\registersee{index}{,}{Tufte}{2--0-0-0-0-0-0-0}

while the ruby run shows:

\registerentry{index}{k}
\registerentrya{index}{Knuth}
\registersee{index}{,}{Tufte}{2--0-0-0-0-0-0-0}
\registerpage{index}{,}{1}{2--0-0-0-0-0-0-0--1}{1}


[I discovered this by trying out the code on live.contextgarden, and I
couldn't understand why I was getting different output from apparently
the same beta - but then I noticed that the live server is still using
the old texexec script. Perhaps this ought to be fixed (though it was
very useful in this case!).]

Duncan




More information about the dev-context mailing list