From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jemarch@gnu.org Newsgroups: gmane.emacs.devel,gmane.comp.tex.texinfo.bugs Subject: texinfo support for iso-cvt Date: Thu, 30 Oct 2003 21:31:05 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <16289.29961.72087.871294@termi.eui.upm.es> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1067599245 9137 80.91.224.253 (31 Oct 2003 11:20:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2003 11:20:45 +0000 (UTC) Cc: bug-texinfo@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Oct 31 12:20:42 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AFXKc-0004WH-00 for ; Fri, 31 Oct 2003 12:20:42 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AFXKc-0007DG-00 for ; Fri, 31 Oct 2003 12:20:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AFXHo-00008e-6U for emacs-devel@quimby.gnus.org; Fri, 31 Oct 2003 06:17:48 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AFXH5-00007l-Jb for emacs-devel@gnu.org; Fri, 31 Oct 2003 06:17:03 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AFXGZ-0008QU-2g for emacs-devel@gnu.org; Fri, 31 Oct 2003 06:17:02 -0500 Original-Received: from [138.100.158.159] (helo=termi.eui.upm.es.gnu.org) by monty-python.gnu.org with asmtp (Exim 4.24) id 1AFXDC-0007HX-M3; Fri, 31 Oct 2003 06:13:02 -0500 Original-To: emacs-devel@gnu.org X-Mailer: VM 7.17 under Emacs 21.2.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17630 gmane.comp.tex.texinfo.bugs:1309 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17630 Hi, I wrote translation tables and iso-* routines for iso-cvt texinfo support.=20 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): ; ("=A3" "{\\\\pounds}") ; ("=B6" "{\\\\P}") ; ("=A7" "{\\\\S}") so these are commented out on the code.=20 Also, there are texinfo sequences for whose i do not know=20 the corresponding ISO 8859-1 symbols (if these exist at all): @=3Do o=3D 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 '( ("=E4" "@\"a") ("=E0" "@`a") ("=E1" "@'a") ("=E3" "@~a") ("=E2" "@^a") ("=EB" "@\"e") ("=E8" "@`e") ("=E9" "@'e") ("=EA" "@^e") ("=EF" "@\"i") ("=EC" "@`i") ("=ED" "@'i") ("=EE" "@^i") ("=F6" "@\"o") ("=F2" "@`o") ("=F3" "@'o") ("=F5" "@~o") ("=F4" "@^o") ("=FC" "@\"u") ("=F9" "@`u") ("=FA" "@'u") ("=FB" "@^u") ("=C4" "@\"A") ("=C0" "@`A") ("=C1" "@'A") ("=C3" "@~A") ("=C2" "@^A") ("=CB" "@\"E") ("=C8" "@`E") ("=C9" "@'E") ("=CA" "@^E") ("=CF" "@\"I") ("=CC" "@`I") ("=CD" "@'I") ("=CE" "@^I") ("=D6" "@\"O") ("=D2" "@`O") ("=D3" "@'O") ("=D5" "@~O") ("=D4" "@^O") ("=DC" "@\"U") ("=D9" "@`U") ("=DA" "@'U") ("=DB" "@^U") ("=F1" "@~n") ("=D1" "@~N") ("=E7" "@,{c}") ("=C7" "@,{C}") ("=DF" "@ss{}") ("\306" "@AE{}") ("\346" "@ae{}") ("\305" "@AA{}") ("\345" "@aa{}") ("\251" "@copyright{}") ; ("=A3" "{\\\\pounds}") ; ("=B6" "{\\\\P}") ; ("=A7" "{\\\\S}") ("=BF" "@questiondown{}") ("=A1" "@exclamdown{}") ) "Translation table for translating ISO 8859-1 characters to texinfo s= equences.") ;;;###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" "=E4") ("@`a" "=E0" ) ("@'a" "=E1" ) ("@~a" "=E3") ("@^a" "=E2" ) ("@\"e" "=EB" ) ("@`e" "=E8" ) ("@'e" "=E9" ) ("@^e" "=EA" ) ("@\"i" "=EF" ) ("@`i" "=EC" ) ("@'i" "=ED" ) ("@^i" "=EE" ) ("@\"o" "=F6" ) ("@`o" "=F2" ) ("@'o" "=F3" ) ("@~o" "=F5" ) ("@^o" "=F4" ) ("@\"u" "=FC" ) ("@`u" "=F9" ) ("@'u" "=FA" ) ("@^u" "=FB" ) ("@\"A" "=C4" ) ("@`A" "=C0" ) ("@'A" "=C1" ) ("@~A" "=C3" ) ("@^A" "=C2" ) ("@\"E" "=CB" ) ("@`E" "=C8" ) ("@'E" "=C9" ) ("@^E" "=CA" ) ("@\"I" "=CF" ) ("@`I" "=CC" ) ("@'I" "=CD" ) ("@^I" "=CE" ) ("@\"O" "=D6" ) ("@`O" "=D2" ) ("@'O" "=D3" ) ("@~O" "=D5" ) ("@^O" "=D4" ) ("@\"U" "=DC" ) ("@`U" "=D9" ) ("@'U" "=DA" ) ("@^U" "=DB" ) ("@~n" "=F1" ) ("@~N" "=D1" ) ("@,{c}" "=E7" ) ("@,{C}" "=C7" ) ("@ss{}" "=DF" ) ("@AE{}" "\306" ) ("@ae{}" "\346" ) ("@AA{}" "\305" ) ("@aa{}" "\345" ) ("@copyright{}" "\251" ) ; ("{\\\\pounds}") ; ("=B6" "{\\\\P}") ; ("=A7" "{\\\\S}") ("@questiondown{}" "=BF" ) ("@exclamdown{}" "=A1" ) ) "Translation table for translating texinfo sequences to ISO 8859-1 ch= aracters.") ;;;###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))