Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 95496:70d2e07fa023
(ELCFILES): Add $(lisp)/language/hanja-util.elc.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 03 Jun 2008 04:59:34 +0000 |
parents | 889bc336b89b |
children | a9dc0e7c3f2b |
rev | line source |
---|---|
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34753
diff
changeset
|
1 ;;; iso-cvt.el --- translate ISO 8859-1 from/to various encodings -*- coding: iso-latin-1 -*- |
13337 | 2 ;; This file was formerly called gm-lingo.el. |
3 | |
74544 | 4 ;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, |
79709 | 5 ;; 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
7260 | 6 |
7 ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> | |
8 ;; Keywords: tex, iso, latin, i18n | |
9 | |
10 ;; This file is part of GNU Emacs. | |
11 | |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
7260 | 13 ;; it under the terms of the GNU General Public License as published by |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
15 ;; (at your option) any later version. |
7260 | 16 |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
7260 | 24 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
25 ;;; Commentary: |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
26 ;; This lisp code is a general framework for translating various |
18228 | 27 ;; representations of the same data. |
28 ;; among other things it can be used to translate TeX, HTML, and compressed | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
29 ;; files to ISO 8859-1. It can also be used to translate different charsets |
18228 | 30 ;; such as IBM PC, Macintosh or HP Roman8. |
31 ;; Note that many translations use the GNU recode tool to do the actual | |
32 ;; conversion. So you might want to install that tool to get the full | |
33 ;; benefit of iso-cvt.el | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
34 |
18228 | 35 ; TO DO: |
28393 | 36 ; Cover more cases for translation. (There is an infinite number of ways to |
18228 | 37 ; represent accented characters in TeX) |
7260 | 38 |
18228 | 39 ;; SEE ALSO: |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
40 ; If you are interested in questions related to using the ISO 8859-1 |
18228 | 41 ; characters set (configuring emacs, Unix, etc. to use ISO), then you |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
42 ; can get the ISO 8859-1 FAQ via anonymous ftp from |
28425
6cc408ca6aef
Fix comment. Don't bother to require format.
Dave Love <fx@gnu.org>
parents:
28393
diff
changeset
|
43 ; ftp.vlsivie.tuwien.ac.at in /pub/8bit/FAQ-ISO-8859-1 |
7260 | 44 |
45 ;;; Code: | |
46 | |
47 (defvar iso-spanish-trans-tab | |
48 '( | |
49 ("~n" "ñ") | |
50 ("\([a-zA-Z]\)#" "\\1ñ") | |
51 ("~N" "Ñ") | |
52 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
53 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
54 ("\\([-a-zA-Z]\\)'o" "\\1ó") | |
55 ("\\([-a-zA-Z]\\)'O" "\\Ó") | |
56 ("\\([-a-zA-Z]\\)'e" "\\1é") | |
57 ("\\([-a-zA-Z]\\)'E" "\\1É") | |
58 ("\\([-a-zA-Z]\\)'a" "\\1á") | |
59 ("\\([-a-zA-Z]\\)'A" "\\1A") | |
60 ("\\([-a-zA-Z]\\)'i" "\\1í") | |
61 ("\\([-a-zA-Z]\\)'I" "\\1Í") | |
62 ) | |
63 "Spanish translation table.") | |
64 | |
18228 | 65 (defun iso-translate-conventions (from to trans-tab) |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
66 "Translate between FROM and TO using the translation table TRANS-TAB." |
7260 | 67 (save-excursion |
18228 | 68 (save-restriction |
69 (narrow-to-region from to) | |
70 (goto-char from) | |
71 (let ((work-tab trans-tab) | |
72 (buffer-read-only nil) | |
73 (case-fold-search nil)) | |
74 (while work-tab | |
75 (save-excursion | |
76 (let ((trans-this (car work-tab))) | |
77 (while (re-search-forward (car trans-this) nil t) | |
78 (replace-match (car (cdr trans-this)) t nil))) | |
79 (setq work-tab (cdr work-tab))))) | |
80 (point-max)))) | |
7260 | 81 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
82 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
83 (defun iso-spanish (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
84 "Translate net conventions for Spanish to ISO 8859-1. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
85 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
86 `iso-spanish-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
87 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
88 (interactive "*r") |
18228 | 89 (iso-translate-conventions from to iso-spanish-trans-tab)) |
7260 | 90 |
91 (defvar iso-aggressive-german-trans-tab | |
92 '( | |
93 ("\"a" "ä") | |
94 ("\"A" "Ä") | |
95 ("\"o" "ö") | |
96 ("\"O" "Ö") | |
97 ("\"u" "ü") | |
98 ("\"U" "Ü") | |
99 ("\"s" "ß") | |
100 ("\\\\3" "ß") | |
101 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
102 "German translation table. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
103 This table uses an aggressive translation approach |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
104 and may erroneously translate too much.") |
7260 | 105 |
106 (defvar iso-conservative-german-trans-tab | |
107 '( | |
108 ("\\([-a-zA-Z\"`]\\)\"a" "\\1ä") | |
109 ("\\([-a-zA-Z\"`]\\)\"A" "\\1Ä") | |
110 ("\\([-a-zA-Z\"`]\\)\"o" "\\1ö") | |
111 ("\\([-a-zA-Z\"`]\\)\"O" "\\1Ö") | |
112 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
113 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
114 ("\\([-a-zA-Z\"`]\\)\"s" "\\1ß") | |
115 ("\\([-a-zA-Z\"`]\\)\\\\3" "\\1ß") | |
116 ) | |
117 "German translation table. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
118 This table uses a conservative translation approach |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
119 and may translate too little.") |
7260 | 120 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
121 (defvar iso-german-trans-tab iso-aggressive-german-trans-tab |
7260 | 122 "Currently active translation table for German.") |
123 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
124 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
125 (defun iso-german (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
126 "Translate net conventions for German to ISO 8859-1. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
127 Translate the region FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
128 `iso-german-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
129 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
130 (interactive "*r") |
18228 | 131 (iso-translate-conventions from to iso-german-trans-tab)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
132 |
7260 | 133 (defvar iso-iso2tex-trans-tab |
134 '( | |
135 ("ä" "{\\\\\"a}") | |
136 ("à" "{\\\\`a}") | |
137 ("á" "{\\\\'a}") | |
138 ("ã" "{\\\\~a}") | |
139 ("â" "{\\\\^a}") | |
140 ("ë" "{\\\\\"e}") | |
141 ("è" "{\\\\`e}") | |
142 ("é" "{\\\\'e}") | |
143 ("ê" "{\\\\^e}") | |
144 ("ï" "{\\\\\"\\\\i}") | |
145 ("ì" "{\\\\`\\\\i}") | |
146 ("í" "{\\\\'\\\\i}") | |
147 ("î" "{\\\\^\\\\i}") | |
148 ("ö" "{\\\\\"o}") | |
149 ("ò" "{\\\\`o}") | |
150 ("ó" "{\\\\'o}") | |
151 ("õ" "{\\\\~o}") | |
152 ("ô" "{\\\\^o}") | |
153 ("ü" "{\\\\\"u}") | |
154 ("ù" "{\\\\`u}") | |
155 ("ú" "{\\\\'u}") | |
156 ("û" "{\\\\^u}") | |
157 ("Ä" "{\\\\\"A}") | |
158 ("À" "{\\\\`A}") | |
159 ("Á" "{\\\\'A}") | |
160 ("Ã" "{\\\\~A}") | |
161 ("Â" "{\\\\^A}") | |
162 ("Ë" "{\\\\\"E}") | |
163 ("È" "{\\\\`E}") | |
164 ("É" "{\\\\'E}") | |
165 ("Ê" "{\\\\^E}") | |
166 ("Ï" "{\\\\\"I}") | |
167 ("Ì" "{\\\\`I}") | |
168 ("Í" "{\\\\'I}") | |
169 ("Î" "{\\\\^I}") | |
170 ("Ö" "{\\\\\"O}") | |
171 ("Ò" "{\\\\`O}") | |
172 ("Ó" "{\\\\'O}") | |
173 ("Õ" "{\\\\~O}") | |
174 ("Ô" "{\\\\^O}") | |
175 ("Ü" "{\\\\\"U}") | |
176 ("Ù" "{\\\\`U}") | |
177 ("Ú" "{\\\\'U}") | |
178 ("Û" "{\\\\^U}") | |
179 ("ñ" "{\\\\~n}") | |
180 ("Ñ" "{\\\\~N}") | |
181 ("ç" "{\\\\c c}") | |
182 ("Ç" "{\\\\c C}") | |
183 ("ß" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
184 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
185 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
186 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
187 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
188 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
189 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
190 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
191 ("§" "{\\\\S}") |
7260 | 192 ("¿" "{?`}") |
193 ("¡" "{!`}") | |
194 ) | |
195 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
196 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
197 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
198 (defun iso-iso2tex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
199 "Translate ISO 8859-1 characters to TeX sequences. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
200 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
201 `iso-iso2tex-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
202 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
203 (interactive "*r") |
18228 | 204 (iso-translate-conventions from to iso-iso2tex-trans-tab)) |
7260 | 205 |
206 (defvar iso-tex2iso-trans-tab | |
207 '( | |
208 ("{\\\\\"a}" "ä") | |
209 ("{\\\\`a}" "à") | |
210 ("{\\\\'a}" "á") | |
211 ("{\\\\~a}" "ã") | |
212 ("{\\\\^a}" "â") | |
213 ("{\\\\\"e}" "ë") | |
214 ("{\\\\`e}" "è") | |
215 ("{\\\\'e}" "é") | |
216 ("{\\\\^e}" "ê") | |
217 ("{\\\\\"\\\\i}" "ï") | |
218 ("{\\\\`\\\\i}" "ì") | |
219 ("{\\\\'\\\\i}" "í") | |
220 ("{\\\\^\\\\i}" "î") | |
221 ("{\\\\\"i}" "ï") | |
222 ("{\\\\`i}" "ì") | |
223 ("{\\\\'i}" "í") | |
224 ("{\\\\^i}" "î") | |
225 ("{\\\\\"o}" "ö") | |
226 ("{\\\\`o}" "ò") | |
227 ("{\\\\'o}" "ó") | |
228 ("{\\\\~o}" "õ") | |
229 ("{\\\\^o}" "ô") | |
230 ("{\\\\\"u}" "ü") | |
231 ("{\\\\`u}" "ù") | |
232 ("{\\\\'u}" "ú") | |
233 ("{\\\\^u}" "û") | |
234 ("{\\\\\"A}" "Ä") | |
235 ("{\\\\`A}" "À") | |
236 ("{\\\\'A}" "Á") | |
237 ("{\\\\~A}" "Ã") | |
238 ("{\\\\^A}" "Â") | |
239 ("{\\\\\"E}" "Ë") | |
240 ("{\\\\`E}" "È") | |
241 ("{\\\\'E}" "É") | |
242 ("{\\\\^E}" "Ê") | |
243 ("{\\\\\"I}" "Ï") | |
244 ("{\\\\`I}" "Ì") | |
245 ("{\\\\'I}" "Í") | |
246 ("{\\\\^I}" "Î") | |
247 ("{\\\\\"O}" "Ö") | |
248 ("{\\\\`O}" "Ò") | |
249 ("{\\\\'O}" "Ó") | |
250 ("{\\\\~O}" "Õ") | |
251 ("{\\\\^O}" "Ô") | |
252 ("{\\\\\"U}" "Ü") | |
253 ("{\\\\`U}" "Ù") | |
254 ("{\\\\'U}" "Ú") | |
255 ("{\\\\^U}" "Û") | |
256 ("{\\\\~n}" "ñ") | |
257 ("{\\\\~N}" "Ñ") | |
258 ("{\\\\c c}" "ç") | |
259 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
260 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
261 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
262 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
263 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
264 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
265 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
266 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
267 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
268 ("\\\\^e" "ê") |
58278
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
269 ;; Discard spaces and/or one EOF after macro \i. |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
270 ;; Converting it back will use braces. |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
271 ("\\\\\"\\\\i *\n\n" "ï\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
272 ("\\\\\"\\\\i *\n?" "ï") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
273 ("\\\\`\\\\i *\n\n" "ì\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
274 ("\\\\`\\\\i *\n?" "ì") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
275 ("\\\\'\\\\i *\n\n" "í\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
276 ("\\\\'\\\\i *\n?" "í") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
277 ("\\\\^\\\\i *\n\n" "î\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
278 ("\\\\^\\\\i *\n?" "î") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
279 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
280 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
281 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
282 ("\\\\^i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
283 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
284 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
285 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
286 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
287 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
288 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
289 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
290 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
291 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
292 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
293 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
294 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
295 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
296 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
297 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
298 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
299 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
300 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
301 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
302 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
303 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
304 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
305 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
306 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
307 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
308 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
309 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
310 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
311 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
312 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
313 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
314 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
315 ("\\\\~N" "Ñ") |
7260 | 316 ("\\\\\"{a}" "ä") |
317 ("\\\\`{a}" "à") | |
318 ("\\\\'{a}" "á") | |
319 ("\\\\~{a}" "ã") | |
320 ("\\\\^{a}" "â") | |
321 ("\\\\\"{e}" "ë") | |
322 ("\\\\`{e}" "è") | |
323 ("\\\\'{e}" "é") | |
324 ("\\\\^{e}" "ê") | |
325 ("\\\\\"{\\\\i}" "ï") | |
326 ("\\\\`{\\\\i}" "ì") | |
327 ("\\\\'{\\\\i}" "í") | |
328 ("\\\\^{\\\\i}" "î") | |
329 ("\\\\\"{i}" "ï") | |
330 ("\\\\`{i}" "ì") | |
331 ("\\\\'{i}" "í") | |
332 ("\\\\^{i}" "î") | |
333 ("\\\\\"{o}" "ö") | |
334 ("\\\\`{o}" "ò") | |
335 ("\\\\'{o}" "ó") | |
336 ("\\\\~{o}" "õ") | |
337 ("\\\\^{o}" "ô") | |
338 ("\\\\\"{u}" "ü") | |
339 ("\\\\`{u}" "ù") | |
340 ("\\\\'{u}" "ú") | |
341 ("\\\\^{u}" "û") | |
342 ("\\\\\"{A}" "Ä") | |
343 ("\\\\`{A}" "À") | |
344 ("\\\\'{A}" "Á") | |
345 ("\\\\~{A}" "Ã") | |
346 ("\\\\^{A}" "Â") | |
347 ("\\\\\"{E}" "Ë") | |
348 ("\\\\`{E}" "È") | |
349 ("\\\\'{E}" "É") | |
350 ("\\\\^{E}" "Ê") | |
351 ("\\\\\"{I}" "Ï") | |
352 ("\\\\`{I}" "Ì") | |
353 ("\\\\'{I}" "Í") | |
354 ("\\\\^{I}" "Î") | |
355 ("\\\\\"{O}" "Ö") | |
356 ("\\\\`{O}" "Ò") | |
357 ("\\\\'{O}" "Ó") | |
358 ("\\\\~{O}" "Õ") | |
359 ("\\\\^{O}" "Ô") | |
360 ("\\\\\"{U}" "Ü") | |
361 ("\\\\`{U}" "Ù") | |
362 ("\\\\'{U}" "Ú") | |
363 ("\\\\^{U}" "Û") | |
364 ("\\\\~{n}" "ñ") | |
365 ("\\\\~{N}" "Ñ") | |
366 ("\\\\c{c}" "ç") | |
367 ("\\\\c{C}" "Ç") | |
368 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
369 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
370 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
371 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
372 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
373 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
374 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
375 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
376 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
377 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
378 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
379 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
380 ("\\\\S{}" "§" ) |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
381 ("{\\?`}" "¿") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
382 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
383 ("\\?`" "¿") |
7260 | 384 ("!`" "¡") |
385 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
386 "Translation table for translating TeX sequences to ISO 8859-1 characters. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
387 This table is not exhaustive (and due to TeX's power can never be). |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
388 It only contains commonly used sequences.") |
7260 | 389 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
390 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
391 (defun iso-tex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
392 "Translate TeX sequences to ISO 8859-1 characters. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
393 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
394 `iso-tex2iso-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
395 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
396 (interactive "*r") |
18228 | 397 (iso-translate-conventions from to iso-tex2iso-trans-tab)) |
7260 | 398 |
399 (defvar iso-gtex2iso-trans-tab | |
400 '( | |
401 ("{\\\\\"a}" "ä") | |
402 ("{\\\\`a}" "à") | |
403 ("{\\\\'a}" "á") | |
404 ("{\\\\~a}" "ã") | |
405 ("{\\\\^a}" "â") | |
406 ("{\\\\\"e}" "ë") | |
407 ("{\\\\`e}" "è") | |
408 ("{\\\\'e}" "é") | |
409 ("{\\\\^e}" "ê") | |
410 ("{\\\\\"\\\\i}" "ï") | |
411 ("{\\\\`\\\\i}" "ì") | |
412 ("{\\\\'\\\\i}" "í") | |
413 ("{\\\\^\\\\i}" "î") | |
414 ("{\\\\\"i}" "ï") | |
415 ("{\\\\`i}" "ì") | |
416 ("{\\\\'i}" "í") | |
417 ("{\\\\^i}" "î") | |
418 ("{\\\\\"o}" "ö") | |
419 ("{\\\\`o}" "ò") | |
420 ("{\\\\'o}" "ó") | |
421 ("{\\\\~o}" "õ") | |
422 ("{\\\\^o}" "ô") | |
423 ("{\\\\\"u}" "ü") | |
424 ("{\\\\`u}" "ù") | |
425 ("{\\\\'u}" "ú") | |
426 ("{\\\\^u}" "û") | |
427 ("{\\\\\"A}" "Ä") | |
428 ("{\\\\`A}" "À") | |
429 ("{\\\\'A}" "Á") | |
430 ("{\\\\~A}" "Ã") | |
431 ("{\\\\^A}" "Â") | |
432 ("{\\\\\"E}" "Ë") | |
433 ("{\\\\`E}" "È") | |
434 ("{\\\\'E}" "É") | |
435 ("{\\\\^E}" "Ê") | |
436 ("{\\\\\"I}" "Ï") | |
437 ("{\\\\`I}" "Ì") | |
438 ("{\\\\'I}" "Í") | |
439 ("{\\\\^I}" "Î") | |
440 ("{\\\\\"O}" "Ö") | |
441 ("{\\\\`O}" "Ò") | |
442 ("{\\\\'O}" "Ó") | |
443 ("{\\\\~O}" "Õ") | |
444 ("{\\\\^O}" "Ô") | |
445 ("{\\\\\"U}" "Ü") | |
446 ("{\\\\`U}" "Ù") | |
447 ("{\\\\'U}" "Ú") | |
448 ("{\\\\^U}" "Û") | |
449 ("{\\\\~n}" "ñ") | |
450 ("{\\\\~N}" "Ñ") | |
451 ("{\\\\c c}" "ç") | |
452 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
453 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
454 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
455 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
456 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
457 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
458 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
459 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
460 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
461 ("\\\\^e" "ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
462 ("\\\\\"\\\\i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
463 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
464 ("\\\\'\\\\i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
465 ("\\\\^\\\\i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
466 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
467 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
468 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
469 ("\\\\^i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
470 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
471 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
472 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
473 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
474 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
475 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
476 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
477 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
478 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
479 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
480 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
481 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
482 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
483 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
484 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
485 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
486 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
487 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
488 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
489 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
490 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
491 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
492 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
493 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
494 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
495 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
496 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
497 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
498 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
499 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
500 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
501 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
502 ("\\\\~N" "Ñ") |
7260 | 503 ("\\\\\"{a}" "ä") |
504 ("\\\\`{a}" "à") | |
505 ("\\\\'{a}" "á") | |
506 ("\\\\~{a}" "ã") | |
507 ("\\\\^{a}" "â") | |
508 ("\\\\\"{e}" "ë") | |
509 ("\\\\`{e}" "è") | |
510 ("\\\\'{e}" "é") | |
511 ("\\\\^{e}" "ê") | |
512 ("\\\\\"{\\\\i}" "ï") | |
513 ("\\\\`{\\\\i}" "ì") | |
514 ("\\\\'{\\\\i}" "í") | |
515 ("\\\\^{\\\\i}" "î") | |
516 ("\\\\\"{i}" "ï") | |
517 ("\\\\`{i}" "ì") | |
518 ("\\\\'{i}" "í") | |
519 ("\\\\^{i}" "î") | |
520 ("\\\\\"{o}" "ö") | |
521 ("\\\\`{o}" "ò") | |
522 ("\\\\'{o}" "ó") | |
523 ("\\\\~{o}" "õ") | |
524 ("\\\\^{o}" "ô") | |
525 ("\\\\\"{u}" "ü") | |
526 ("\\\\`{u}" "ù") | |
527 ("\\\\'{u}" "ú") | |
528 ("\\\\^{u}" "û") | |
529 ("\\\\\"{A}" "Ä") | |
530 ("\\\\`{A}" "À") | |
531 ("\\\\'{A}" "Á") | |
532 ("\\\\~{A}" "Ã") | |
533 ("\\\\^{A}" "Â") | |
534 ("\\\\\"{E}" "Ë") | |
535 ("\\\\`{E}" "È") | |
536 ("\\\\'{E}" "É") | |
537 ("\\\\^{E}" "Ê") | |
538 ("\\\\\"{I}" "Ï") | |
539 ("\\\\`{I}" "Ì") | |
540 ("\\\\'{I}" "Í") | |
541 ("\\\\^{I}" "Î") | |
542 ("\\\\\"{O}" "Ö") | |
543 ("\\\\`{O}" "Ò") | |
544 ("\\\\'{O}" "Ó") | |
545 ("\\\\~{O}" "Õ") | |
546 ("\\\\^{O}" "Ô") | |
547 ("\\\\\"{U}" "Ü") | |
548 ("\\\\`{U}" "Ù") | |
549 ("\\\\'{U}" "Ú") | |
550 ("\\\\^{U}" "Û") | |
551 ("\\\\~{n}" "ñ") | |
552 ("\\\\~{N}" "Ñ") | |
553 ("\\\\c{c}" "ç") | |
554 ("\\\\c{C}" "Ç") | |
555 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
556 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
557 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
558 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
559 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
560 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
561 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
562 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
563 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
564 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
565 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
566 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
567 ("\\\\S{}" "§" ) |
7260 | 568 ("?`" "¿") |
569 ("!`" "¡") | |
570 ("{?`}" "¿") | |
571 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
572 ("\"a" "ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
573 ("\"A" "Ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
574 ("\"o" "ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
575 ("\"O" "Ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
576 ("\"u" "ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
577 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
578 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
579 ("\\\\3" "ß") |
7260 | 580 ) |
581 "Translation table for translating German TeX sequences to ISO 8859-1. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
582 This table is not exhaustive (and due to TeX's power can never be). |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
583 It only contains commonly used sequences.") |
7260 | 584 |
585 (defvar iso-iso2gtex-trans-tab | |
586 '( | |
587 ("ä" "\"a") | |
588 ("à" "{\\\\`a}") | |
589 ("á" "{\\\\'a}") | |
590 ("ã" "{\\\\~a}") | |
591 ("â" "{\\\\^a}") | |
592 ("ë" "{\\\\\"e}") | |
593 ("è" "{\\\\`e}") | |
594 ("é" "{\\\\'e}") | |
595 ("ê" "{\\\\^e}") | |
596 ("ï" "{\\\\\"\\\\i}") | |
597 ("ì" "{\\\\`\\\\i}") | |
598 ("í" "{\\\\'\\\\i}") | |
599 ("î" "{\\\\^\\\\i}") | |
600 ("ö" "\"o") | |
601 ("ò" "{\\\\`o}") | |
602 ("ó" "{\\\\'o}") | |
603 ("õ" "{\\\\~o}") | |
604 ("ô" "{\\\\^o}") | |
605 ("ü" "\"u") | |
606 ("ù" "{\\\\`u}") | |
607 ("ú" "{\\\\'u}") | |
608 ("û" "{\\\\^u}") | |
609 ("Ä" "\"A") | |
610 ("À" "{\\\\`A}") | |
611 ("Á" "{\\\\'A}") | |
612 ("Ã" "{\\\\~A}") | |
613 ("Â" "{\\\\^A}") | |
614 ("Ë" "{\\\\\"E}") | |
615 ("È" "{\\\\`E}") | |
616 ("É" "{\\\\'E}") | |
617 ("Ê" "{\\\\^E}") | |
618 ("Ï" "{\\\\\"I}") | |
619 ("Ì" "{\\\\`I}") | |
620 ("Í" "{\\\\'I}") | |
621 ("Î" "{\\\\^I}") | |
622 ("Ö" "\"O") | |
623 ("Ò" "{\\\\`O}") | |
624 ("Ó" "{\\\\'O}") | |
625 ("Õ" "{\\\\~O}") | |
626 ("Ô" "{\\\\^O}") | |
627 ("Ü" "\"U") | |
628 ("Ù" "{\\\\`U}") | |
629 ("Ú" "{\\\\'U}") | |
630 ("Û" "{\\\\^U}") | |
631 ("ñ" "{\\\\~n}") | |
632 ("Ñ" "{\\\\~N}") | |
633 ("ç" "{\\\\c c}") | |
634 ("Ç" "{\\\\c C}") | |
635 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
636 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
637 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
638 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
639 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
640 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
641 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
642 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
643 ("§" "{\\\\S}") |
7260 | 644 ("¿" "{?`}") |
645 ("¡" "{!`}") | |
646 ) | |
647 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
648 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
649 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
650 (defun iso-gtex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
651 "Translate German TeX sequences to ISO 8859-1 characters. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
652 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
653 `iso-gtex2iso-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
654 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
655 (interactive "*r") |
18228 | 656 (iso-translate-conventions from to iso-gtex2iso-trans-tab)) |
7260 | 657 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
658 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
659 (defun iso-iso2gtex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
660 "Translate ISO 8859-1 characters to German TeX sequences. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
661 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
662 `iso-iso2gtex-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
663 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
664 (interactive "*r") |
18228 | 665 (iso-translate-conventions from to iso-iso2gtex-trans-tab)) |
666 | |
667 (defvar iso-iso2duden-trans-tab | |
668 '(("ä" "ae") | |
669 ("Ä" "Ae") | |
670 ("ö" "oe") | |
671 ("Ö" "Oe") | |
672 ("ü" "ue") | |
673 ("Ü" "Ue") | |
79357
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
674 ("ß" "ss")) |
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
675 "Translation table for translating ISO 8859-1 characters to Duden sequences.") |
18228 | 676 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
677 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
678 (defun iso-iso2duden (from to &optional buffer) |
79357
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
679 "Translate ISO 8859-1 characters to Duden sequences. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
680 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
681 `iso-iso2duden-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
682 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
683 (interactive "*r") |
18228 | 684 (iso-translate-conventions from to iso-iso2duden-trans-tab)) |
7260 | 685 |
28393 | 686 (defvar iso-iso2sgml-trans-tab |
687 '(("À" "À") | |
688 ("Á" "Á") | |
689 ("Â" "Â") | |
690 ("Ã" "Ã") | |
691 ("Ä" "Ä") | |
692 ("Å" "Å") | |
693 ("Æ" "Æ") | |
694 ("Ç" "Ç") | |
695 ("È" "È") | |
696 ("É" "É") | |
697 ("Ê" "Ê") | |
698 ("Ë" "Ë") | |
699 ("Ì" "Ì") | |
700 ("Í" "Í") | |
701 ("Î" "Î") | |
702 ("Ï" "Ï") | |
703 ("Ð" "Ð") | |
704 ("Ñ" "Ñ") | |
705 ("Ò" "Ò") | |
706 ("Ó" "Ó") | |
707 ("Ô" "Ô") | |
708 ("Õ" "Õ") | |
709 ("Ö" "Ö") | |
710 ("Ø" "Ø") | |
711 ("Ù" "Ù") | |
712 ("Ú" "Ú") | |
713 ("Û" "Û") | |
714 ("Ü" "Ü") | |
715 ("Ý" "Ý") | |
716 ("Þ" "Þ") | |
717 ("ß" "ß") | |
718 ("à" "à") | |
719 ("á" "á") | |
720 ("â" "â") | |
721 ("ã" "ã") | |
722 ("ä" "ä") | |
723 ("å" "å") | |
724 ("æ" "æ") | |
725 ("ç" "ç") | |
726 ("è" "è") | |
727 ("é" "é") | |
728 ("ê" "ê") | |
729 ("ë" "ë") | |
730 ("ì" "ì") | |
731 ("í" "í") | |
732 ("î" "î") | |
733 ("ï" "ï") | |
734 ("ð" "ð") | |
735 ("ñ" "ñ") | |
736 ("ò" "ò") | |
737 ("ó" "ó") | |
738 ("ô" "ô") | |
739 ("õ" "õ") | |
740 ("ö" "ö") | |
741 ("ø" "ø") | |
742 ("ù" "ù") | |
743 ("ú" "ú") | |
744 ("û" "û") | |
745 ("ü" "ü") | |
746 ("ý" "ý") | |
747 ("þ" "þ") | |
748 ("ÿ" "ÿ"))) | |
749 | |
750 (defvar iso-sgml2iso-trans-tab | |
751 '(("À" "À") | |
752 ("Á" "Á") | |
753 ("Â" "Â") | |
754 ("Ã" "Ã") | |
755 ("Ä" "Ä") | |
756 ("Å" "Å") | |
757 ("Æ" "Æ") | |
758 ("Ç" "Ç") | |
759 ("È" "È") | |
760 ("É" "É") | |
761 ("Ê" "Ê") | |
762 ("Ë" "Ë") | |
763 ("Ì" "Ì") | |
764 ("Í" "Í") | |
765 ("Î" "Î") | |
766 ("Ï" "Ï") | |
767 ("Ð" "Ð") | |
768 ("Ñ" "Ñ") | |
769 ("Ò" "Ò") | |
770 ("Ó" "Ó") | |
771 ("Ô" "Ô") | |
772 ("Õ" "Õ") | |
773 ("Ö" "Ö") | |
774 ("Ø" "Ø") | |
775 ("Ù" "Ù") | |
776 ("Ú" "Ú") | |
777 ("Û" "Û") | |
778 ("Ü" "Ü") | |
779 ("Ý" "Ý") | |
780 ("Þ" "Þ") | |
781 ("ß" "ß") | |
782 ("à" "à") | |
783 ("á" "á") | |
784 ("â" "â") | |
785 ("ã" "ã") | |
786 ("ä" "ä") | |
787 ("å" "å") | |
788 ("æ" "æ") | |
789 ("ç" "ç") | |
790 ("è" "è") | |
791 ("é" "é") | |
792 ("ê" "ê") | |
793 ("ë" "ë") | |
794 ("ì" "ì") | |
795 ("í" "í") | |
796 ("î" "î") | |
797 ("ï" "ï") | |
798 ("ð" "ð") | |
799 ("ñ" "ñ") | |
63102
608496528c29
(iso-sgml2iso-trans-tab): Add NBSP.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62274
diff
changeset
|
800 (" " " ") |
28393 | 801 ("ò" "ò") |
802 ("ó" "ó") | |
803 ("ô" "ô") | |
804 ("õ" "õ") | |
805 ("ö" "ö") | |
806 ("ø" "ø") | |
807 ("ù" "ù") | |
808 ("ú" "ú") | |
809 ("û" "û") | |
810 ("ü" "ü") | |
811 ("ý" "ý") | |
812 ("þ" "þ") | |
813 ("ÿ" "ÿ"))) | |
814 | |
815 ;;;###autoload | |
816 (defun iso-iso2sgml (from to &optional buffer) | |
817 "Translate ISO 8859-1 characters in the region to SGML entities. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
818 Use entities from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
819 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 820 (interactive "*r") |
821 (iso-translate-conventions from to iso-iso2sgml-trans-tab)) | |
822 | |
823 ;;;###autoload | |
824 (defun iso-sgml2iso (from to &optional buffer) | |
825 "Translate SGML entities in the region to ISO 8859-1 characters. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
826 Use entities from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
827 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 828 (interactive "*r") |
829 (iso-translate-conventions from to iso-sgml2iso-trans-tab)) | |
830 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
831 ;;;###autoload |
77673
3424ba548b6f
(iso-cvt-read-only): Ignore arguments.
Richard M. Stallman <rms@gnu.org>
parents:
75347
diff
changeset
|
832 (defun iso-cvt-read-only (&rest ignore) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
833 "Warn that format is read-only." |
18228 | 834 (interactive) |
835 (error "This format is read-only; specify another format for writing")) | |
836 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
837 ;;;###autoload |
77673
3424ba548b6f
(iso-cvt-read-only): Ignore arguments.
Richard M. Stallman <rms@gnu.org>
parents:
75347
diff
changeset
|
838 (defun iso-cvt-write-only (&rest ignore) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
839 "Warn that format is write-only." |
18228 | 840 (interactive) |
841 (error "This format is write-only")) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
842 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
843 ;;;###autoload |
18228 | 844 (defun iso-cvt-define-menu () |
58007
a8e3cd5a8156
(iso-cvt-define-menu): menu-bar-files-menu renamed to menu-bar-file-menu.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
845 "Add submenus to the File menu, to convert to and from various formats." |
18228 | 846 (interactive) |
847 | |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
848 (let ((load-as-menu-map (make-sparse-keymap "Load As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
849 (insert-as-menu-map (make-sparse-keymap "Insert As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
850 (write-as-menu-map (make-sparse-keymap "Write As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
851 (translate-to-menu-map (make-sparse-keymap "Translate to...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
852 (translate-from-menu-map (make-sparse-keymap "Translate from...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
853 (menu menu-bar-file-menu)) |
79357
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
854 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
855 (define-key menu [load-as-separator] '("--")) |
18228 | 856 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
857 (define-key menu [load-as] '("Load As..." . iso-cvt-load-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
858 (fset 'iso-cvt-load-as load-as-menu-map) |
7260 | 859 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
860 ;;(define-key menu [insert-as] '("Insert As..." . iso-cvt-insert-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
861 (fset 'iso-cvt-insert-as insert-as-menu-map) |
18228 | 862 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
863 (define-key menu [write-as] '("Write As..." . iso-cvt-write-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
864 (fset 'iso-cvt-write-as write-as-menu-map) |
18228 | 865 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
866 (define-key menu [translate-separator] '("--")) |
18228 | 867 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
868 (define-key menu [translate-to] '("Translate to..." . iso-cvt-translate-to)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
869 (fset 'iso-cvt-translate-to translate-to-menu-map) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
870 |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
871 (define-key menu [translate-from] '("Translate from..." . iso-cvt-translate-from)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
872 (fset 'iso-cvt-translate-from translate-from-menu-map) |
7260 | 873 |
58156
f5edf9775fb5
(iso-cvt-define-menu): Fix typo.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58111
diff
changeset
|
874 (dolist (file-type (reverse format-alist)) |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
875 (let ((name (car file-type)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
876 (str-name (cadr file-type))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
877 (if (stringp str-name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
878 (progn |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
879 (define-key load-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
880 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
881 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
882 (interactive ,(format "FFind file (as %s): " name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
883 (format-find-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
884 (define-key insert-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
885 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
886 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
887 (interactive (format "FInsert file (as %s): " ,name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
888 (format-insert-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
889 (define-key write-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
890 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
891 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
892 (interactive (format "FWrite file (as %s): " ,name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
893 (format-write-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
894 (define-key translate-to-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
895 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
896 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
897 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
898 (format-encode-buffer ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
899 (define-key translate-from-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
900 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
901 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
902 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
903 (format-decode-buffer ',name)))))))))) |
28393 | 904 |
905 (provide 'iso-cvt) | |
7260 | 906 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
907 ;; arch-tag: 64ae843f-ed0e-43e1-ba50-ffd581b90840 |
7260 | 908 ;;; iso-cvt.el ends here |