(This is really a bug in TeX; I used to fix it by removing the stupid
test in TeX causing the problem, but TeX and friends is something of a
beast to compile, and in all other respects the texmf package included
in Linux seems ok...)
When you do cross references using 8-bit-ASCII (or rather non-ASCII)
the sequences TeX writes to the cross-reference files are 7-bitified
and look like
s^^f6ka
where ^^f6 tells TeX that this is a character with the binary value of
246.
The problem is that when the cross reference is printed the silly ^^##
representation is retained, that is it actually says `s^^f6ka' in the
index, and not `s\"oka' as it should (please note that this example
uses the Swedish word for `search' and expects an ISO-Latin-1 font;
`\"o' is of course TeX for the ISO-Latin-1 character 246).
The following patch only works if you have perl (but why wouldn't
you?). It simply scans the .cp and .cps files for ^^## sequences
replacing them with the original 8-bit byte they represent. If, and
only if, this replace action changed anything the overwritten with the
new 8-bitified content.
(Obviously the scheme many of us 8-bit:ers use rely on the fact that
we have a proper 8-bit-font mapping. And just as obviously we do.)
The patch:
----------------------------------------------------------------------
--- /usr/bin/texi2dvi Mon Mar 22 07:22:35 1999
+++ texi2dvi Sun Sep 5 17:13:23 1999
@@ -488,7 +488,7 @@
&& cp `basename "$filename_input"`.log "$filename_noext.log"
exit 1
fi
-
+ for i in "${filename_noext}.cp" "${filename_noext}.cps"; do perl -e
+'$f=shift;open(IN,$f);undef $/;$a=<IN>;close IN; $b=$a; $b =~
+s/\^\^([\da-f]{2})/sprintf "%c", hex($1)/eg; if ($b ne $a){open(OUT, ">$f");print OUT
+$b; close OUT;}' $i; done
# Decide if looping again is needed.
finished=t
----------------------------------------------------------------------
texi2dvi version info:
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
# $Id: texi2dvi,v 0.36 1999/03/03 22:28:11 karl Exp $