bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo support for iso-cvt


From: jemarch
Subject: texinfo support for iso-cvt
Date: Thu, 30 Oct 2003 21:31:05 +0100

Hi,

I wrote translation tables and iso-* routines for iso-cvt texinfo
support. 

The new routines are iso-iso2texi and iso-texi2iso


Note that the tables are not complete. The texinfo manual do not
mention texi sequences for the following ISO symbols (i give there the
TeX sequence):

;    ("£" "{\\\\pounds}")
;    ("¶" "{\\\\P}")
;    ("§" "{\\\\S}")

so these are commented out on the code. 

Also, there are texinfo sequences for whose i do not know 
the corresponding ISO 8859-1 symbols (if these exist at all):

@=o               o=       macron/overbar accent
@dotaccent{o}     o.       overdot accent
@H{o}             o''      long Hungarian umlaut
@ringaccent{o}    o*       ring accent
@tieaccent{oo}    oo[      tie-after accent
@u{o}             o(       breve accent
@ubaraccent{o}    o_       underbar accent
@udotaccent{o}    .o       underdot accent
@v{o}             o<       hacek or check accent
@dotless{i}        i       dotless i
@dotless{j}        j       dotless j
@l{},@L{}          /l,/L   suppressed-L,l
@o{},@O{}          /o,/O   O,o with slash
@oe{},@OE{}        oe,OE   oe,OE ligatures

Perhaps some native speaker of the languages that support that symbols
could know if a corresponding iso8859-1 symbol exist. As long as
spanish is concerned (my own native language) the tables are complete.

Below is the code. Sorry, i did not make a patch because 1) i do not
have a fresh emacs source tree from CVS and 2) this little hack only
add code, do not remove or change anything. Anyway, if an unidiff
patch is a must, please let me know.


(defvar iso-iso2texi-trans-tab
  '(
    ("ä" "@\"a")
    ("à" "@`a")
    ("á" "@'a")
    ("ã" "@~a")
    ("â" "@^a")
    ("ë" "@\"e")
    ("è" "@`e")
    ("é" "@'e")
    ("ê" "@^e")
    ("ï" "@\"i")
    ("ì" "@`i")
    ("í" "@'i")
    ("î" "@^i")
    ("ö" "@\"o")
    ("ò" "@`o")
    ("ó" "@'o")
    ("õ" "@~o")
    ("ô" "@^o")
    ("ü" "@\"u")
    ("ù" "@`u")
    ("ú" "@'u")
    ("û" "@^u")
    ("Ä" "@\"A")
    ("À" "@`A")
    ("Á" "@'A")
    ("Ã" "@~A")
    ("Â" "@^A")
    ("Ë" "@\"E")
    ("È" "@`E")
    ("É" "@'E")
    ("Ê" "@^E")
    ("Ï" "@\"I")
    ("Ì" "@`I")
    ("Í" "@'I")
    ("Î" "@^I")
    ("Ö" "@\"O")
    ("Ò" "@`O")
    ("Ó" "@'O")
    ("Õ" "@~O")
    ("Ô" "@^O")
    ("Ü" "@\"U")
    ("Ù" "@`U")
    ("Ú" "@'U")
    ("Û" "@^U")
    ("ñ" "@~n")
    ("Ñ" "@~N")
    ("ç" "@,{c}")
    ("Ç" "@,{C}")
    ("ß" "@ss{}")
    ("\306" "@AE{}")
    ("\346" "@ae{}")
    ("\305" "@AA{}")
    ("\345" "@aa{}")
    ("\251" "@copyright{}")
;    ("£" "{\\\\pounds}")
;    ("¶" "{\\\\P}")
;    ("§" "{\\\\S}")
    ("¿" "@questiondown{}")
    ("¡" "@exclamdown{}")
    )
  "Translation table for translating ISO 8859-1 characters to texinfo 
sequences.")





;;;###autoload
(defun iso-iso2texi (from to &optional buffer)
  "Translate ISO8859-1 characters to texinfo sequences.
The region between FROM and TO is translated using the table TRANS-TAB.
Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-iso2texi-trans-tab))



(defvar iso-texi2iso-trans-tab
  '(
    ("@\"a" "ä")
    ("@`a" "à" )
    ("@'a" "á" )
    ("@~a" "ã")
    ("@^a" "â" )
    ("@\"e" "ë" )
    ("@`e" "è" )
    ("@'e" "é" )
    ("@^e" "ê" )
    ("@\"i" "ï" )
    ("@`i" "ì" )
    ("@'i" "í" )
    ("@^i" "î" )
    ("@\"o" "ö" )
    ("@`o" "ò" )
    ("@'o" "ó" )
    ("@~o" "õ" )
    ("@^o" "ô" )
    ("@\"u" "ü" )
    ("@`u" "ù" )
    ("@'u" "ú" )
    ("@^u" "û" )
    ("@\"A" "Ä" )
    ("@`A" "À" )
    ("@'A" "Á" )
    ("@~A" "Ã" )
    ("@^A" "Â" )
    ("@\"E" "Ë" )
    ("@`E" "È" )
    ("@'E" "É" )
    ("@^E" "Ê" )
    ("@\"I" "Ï" )
    ("@`I" "Ì" )
    ("@'I" "Í" )
    ("@^I" "Î" )
    ("@\"O" "Ö" )
    ("@`O" "Ò" )
    ("@'O" "Ó" )
    ("@~O" "Õ" )
    ("@^O" "Ô" )
    ("@\"U" "Ü" )
    ("@`U" "Ù" )
    ("@'U" "Ú" )
    ("@^U" "Û" )
    ("@~n" "ñ" )
    ("@~N" "Ñ" )
    ("@,{c}" "ç" )
    ("@,{C}" "Ç" )
    ("@ss{}" "ß" )
    ("@AE{}" "\306" )
    ("@ae{}" "\346" )
    ("@AA{}" "\305" )
    ("@aa{}" "\345" )
    ("@copyright{}" "\251" )
;    ("{\\\\pounds}")
;    ("¶" "{\\\\P}")
;    ("§" "{\\\\S}")
    ("@questiondown{}" "¿" )
    ("@exclamdown{}" "¡" )
    )
  "Translation table for translating texinfo sequences to ISO 8859-1 
characters.")



;;;###autoload
(defun iso-texi2iso (from to &optional buffer)
  "Translate texinfo sequences to ISO 8859-1 characters.
The region between FROM and TO is translated using the table TRANS-TAB.
Optional arg BUFFER is ignored (for use in `format-alist')."
  (interactive "*r")
  (iso-translate-conventions from to iso-texi2iso-trans-tab))







reply via email to

[Prev in Thread] Current Thread [Next in Thread]