quail: TeX input method: change UTF8 to tex and back: solution & problems

Uwe Brauer oub at mat.ucm.es
Mon Jan 7 05:25:03 EST 2008



Hello


Some days ago I asked for an equivalent to iso-unaccentuate for quail
input methods. Since as I learnt xemacs does not use the GNU Emacs
idea of multi-byte chars, iso-unaccentuate should work without
problems for ó and the like.

Now I asked for a similar feature for the TeX input methods:

       TeX-2-utf8(TeXtuate)
  \int ---------------> ∫

       utf8-2-TeX(TeXuntuate)
   ∫ ---------------> \int


Now I looked into a attic package (1994)
iso-sgml, (written by  Frederic Lepied <lepied at cenaath.cena.dgac.fr>),
whose logic I could understand,
which changed iso-8859-1 chars to the SGML entities.
A main point was the variable sgml2iso-trans-tab, which looks
basically like:

(defvar sgml2iso-trans-tab
  '(
    ("&AElig\;"  "Æ")
))

Which changed &AElig; to Æ and back.

So I boldly modified the variable to the following 


(defvar tex2utf8symb-trans-tab
  '(
    ("\int"  "∫")
))

I am not sure whether I could treat ∫ as a string, for example in the
file latin-ltx.el I see
 ("\\int" ?∫)


Anyhow the code worked, but there is a problem:

(defvar tex2utf8symb-trans-tab
  '(
	("\\in" "∈")
	("\\infty" "∞")
	("\\int" "∫")

))

While 
\in and \int are transformed correctly 
\infty is changed to ∈fty, 

which is wrong (on the other hand I don't understand why 
\int is not transformed to ∈t but anyhow).

So the question is how shall I define the tex commands uniquely?

thanks


Uwe Brauer 




More information about the XEmacs-Beta mailing list