Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 19869:3c4025f3be8f
(kkc-mode-map): Bind meta-prefix-char to a
map which only has default key binding to
quail-execute-non-quail-command.
(kkc-non-kkc-command): Handle the key sequence as the same way as
universal-argument-other-key.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 11 Sep 1997 11:52:38 +0000 |
parents | 81fa1f5547eb |
children | d6b8d9997907 |
rev | line source |
---|---|
18228 | 1 ;;; iso-cvt.-el -- translate ISO 8859-1 from/to various encodings |
13337 | 2 ;; This file was formerly called gm-lingo.el. |
3 | |
18228 | 4 ;; Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. |
7260 | 5 |
6 ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> | |
7 ;; Keywords: tex, iso, latin, i18n | |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
14169 | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
24 ;; Boston, MA 02111-1307, USA. | |
7260 | 25 |
26 ;;; Commentary: | |
18228 | 27 ;; This lisp code is a general framework for translating various |
28 ;; representations of the same data. | |
29 ;; among other things it can be used to translate TeX, HTML, and compressed | |
30 ;; files to ISO 8859-1. It can also be used to translate different charsets | |
31 ;; such as IBM PC, Macintosh or HP Roman8. | |
32 ;; Note that many translations use the GNU recode tool to do the actual | |
33 ;; conversion. So you might want to install that tool to get the full | |
34 ;; benefit of iso-cvt.el | |
35 ; | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
36 |
18228 | 37 ; TO DO: |
38 ; Cover more cases for translation (There is an infinite number of ways to | |
39 ; represent accented characters in TeX) | |
7260 | 40 |
18228 | 41 ;; SEE ALSO: |
42 ; If you are interested in questions related to using the ISO 8859-1 | |
43 ; characters set (configuring emacs, Unix, etc. to use ISO), then you | |
44 ; can get the ISO 8859-1 FAQ via anonymous ftp from | |
45 ; ftp.vlsivie.tuwien.ac.at in /pub/bit/FAQ-ISO-8859-1 | |
7260 | 46 |
47 ;;; Code: | |
48 | |
49 (provide 'iso-cvt) | |
18228 | 50 (require 'format) |
7260 | 51 |
52 (defvar iso-spanish-trans-tab | |
53 '( | |
54 ("~n" "ñ") | |
55 ("\([a-zA-Z]\)#" "\\1ñ") | |
56 ("~N" "Ñ") | |
57 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
58 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
59 ("\\([-a-zA-Z]\\)'o" "\\1ó") | |
60 ("\\([-a-zA-Z]\\)'O" "\\Ó") | |
61 ("\\([-a-zA-Z]\\)'e" "\\1é") | |
62 ("\\([-a-zA-Z]\\)'E" "\\1É") | |
63 ("\\([-a-zA-Z]\\)'a" "\\1á") | |
64 ("\\([-a-zA-Z]\\)'A" "\\1A") | |
65 ("\\([-a-zA-Z]\\)'i" "\\1í") | |
66 ("\\([-a-zA-Z]\\)'I" "\\1Í") | |
67 ) | |
68 "Spanish translation table.") | |
69 | |
18228 | 70 (defun iso-translate-conventions (from to trans-tab) |
7850
b6f3dd2511bc
(iso-translate-conventions): Get rid of interactive spec.
Richard M. Stallman <rms@gnu.org>
parents:
7831
diff
changeset
|
71 "Use the translation table TRANS-TAB to translate the current buffer." |
7260 | 72 (save-excursion |
18228 | 73 (save-restriction |
74 (narrow-to-region from to) | |
75 (goto-char from) | |
76 (let ((work-tab trans-tab) | |
77 (buffer-read-only nil) | |
78 (case-fold-search nil)) | |
79 (while work-tab | |
80 (save-excursion | |
81 (let ((trans-this (car work-tab))) | |
82 (while (re-search-forward (car trans-this) nil t) | |
83 (replace-match (car (cdr trans-this)) t nil))) | |
84 (setq work-tab (cdr work-tab))))) | |
85 (point-max)))) | |
7260 | 86 |
18228 | 87 (defun iso-spanish (from to) |
7260 | 88 "Translate net conventions for Spanish to ISO 8859-1." |
89 (interactive) | |
18228 | 90 (iso-translate-conventions from to iso-spanish-trans-tab)) |
7260 | 91 |
92 (defvar iso-aggressive-german-trans-tab | |
93 '( | |
94 ("\"a" "ä") | |
95 ("\"A" "Ä") | |
96 ("\"o" "ö") | |
97 ("\"O" "Ö") | |
98 ("\"u" "ü") | |
99 ("\"U" "Ü") | |
100 ("\"s" "ß") | |
101 ("\\\\3" "ß") | |
102 ) | |
103 "German translation table. | |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
104 This table uses an aggressive translation approach and may erroneously |
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
105 translate too much.") |
7260 | 106 |
107 (defvar iso-conservative-german-trans-tab | |
108 '( | |
109 ("\\([-a-zA-Z\"`]\\)\"a" "\\1ä") | |
110 ("\\([-a-zA-Z\"`]\\)\"A" "\\1Ä") | |
111 ("\\([-a-zA-Z\"`]\\)\"o" "\\1ö") | |
112 ("\\([-a-zA-Z\"`]\\)\"O" "\\1Ö") | |
113 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
114 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
115 ("\\([-a-zA-Z\"`]\\)\"s" "\\1ß") | |
116 ("\\([-a-zA-Z\"`]\\)\\\\3" "\\1ß") | |
117 ) | |
118 "German translation table. | |
119 This table uses a conservative translation approach and may translate too | |
120 little.") | |
121 | |
122 | |
123 (defvar iso-german-trans-tab iso-aggressive-german-trans-tab | |
124 "Currently active translation table for German.") | |
125 | |
18228 | 126 (defun iso-german (from to) |
7260 | 127 "Translate net conventions for German to ISO 8859-1." |
128 (interactive) | |
18228 | 129 (iso-translate-conventions from to iso-german-trans-tab)) |
7260 | 130 |
131 (defvar iso-iso2tex-trans-tab | |
132 '( | |
133 ("ä" "{\\\\\"a}") | |
134 ("à" "{\\\\`a}") | |
135 ("á" "{\\\\'a}") | |
136 ("ã" "{\\\\~a}") | |
137 ("â" "{\\\\^a}") | |
138 ("ë" "{\\\\\"e}") | |
139 ("è" "{\\\\`e}") | |
140 ("é" "{\\\\'e}") | |
141 ("ê" "{\\\\^e}") | |
142 ("ï" "{\\\\\"\\\\i}") | |
143 ("ì" "{\\\\`\\\\i}") | |
144 ("í" "{\\\\'\\\\i}") | |
145 ("î" "{\\\\^\\\\i}") | |
146 ("ö" "{\\\\\"o}") | |
147 ("ò" "{\\\\`o}") | |
148 ("ó" "{\\\\'o}") | |
149 ("õ" "{\\\\~o}") | |
150 ("ô" "{\\\\^o}") | |
151 ("ü" "{\\\\\"u}") | |
152 ("ù" "{\\\\`u}") | |
153 ("ú" "{\\\\'u}") | |
154 ("û" "{\\\\^u}") | |
155 ("Ä" "{\\\\\"A}") | |
156 ("À" "{\\\\`A}") | |
157 ("Á" "{\\\\'A}") | |
158 ("Ã" "{\\\\~A}") | |
159 ("Â" "{\\\\^A}") | |
160 ("Ë" "{\\\\\"E}") | |
161 ("È" "{\\\\`E}") | |
162 ("É" "{\\\\'E}") | |
163 ("Ê" "{\\\\^E}") | |
164 ("Ï" "{\\\\\"I}") | |
165 ("Ì" "{\\\\`I}") | |
166 ("Í" "{\\\\'I}") | |
167 ("Î" "{\\\\^I}") | |
168 ("Ö" "{\\\\\"O}") | |
169 ("Ò" "{\\\\`O}") | |
170 ("Ó" "{\\\\'O}") | |
171 ("Õ" "{\\\\~O}") | |
172 ("Ô" "{\\\\^O}") | |
173 ("Ü" "{\\\\\"U}") | |
174 ("Ù" "{\\\\`U}") | |
175 ("Ú" "{\\\\'U}") | |
176 ("Û" "{\\\\^U}") | |
177 ("ñ" "{\\\\~n}") | |
178 ("Ñ" "{\\\\~N}") | |
179 ("ç" "{\\\\c c}") | |
180 ("Ç" "{\\\\c C}") | |
181 ("ß" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
182 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
183 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
184 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
185 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
186 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
187 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
188 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
189 ("§" "{\\\\S}") |
7260 | 190 ("¿" "{?`}") |
191 ("¡" "{!`}") | |
192 ) | |
193 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
194 | |
195 | |
196 | |
197 | |
18228 | 198 (defun iso-iso2tex (from to) |
7260 | 199 "Translate ISO 8859-1 characters to TeX sequences." |
200 (interactive) | |
18228 | 201 (iso-translate-conventions from to iso-iso2tex-trans-tab)) |
7260 | 202 |
203 | |
204 (defvar iso-tex2iso-trans-tab | |
205 '( | |
206 ("{\\\\\"a}" "ä") | |
207 ("{\\\\`a}" "à") | |
208 ("{\\\\'a}" "á") | |
209 ("{\\\\~a}" "ã") | |
210 ("{\\\\^a}" "â") | |
211 ("{\\\\\"e}" "ë") | |
212 ("{\\\\`e}" "è") | |
213 ("{\\\\'e}" "é") | |
214 ("{\\\\^e}" "ê") | |
215 ("{\\\\\"\\\\i}" "ï") | |
216 ("{\\\\`\\\\i}" "ì") | |
217 ("{\\\\'\\\\i}" "í") | |
218 ("{\\\\^\\\\i}" "î") | |
219 ("{\\\\\"i}" "ï") | |
220 ("{\\\\`i}" "ì") | |
221 ("{\\\\'i}" "í") | |
222 ("{\\\\^i}" "î") | |
223 ("{\\\\\"o}" "ö") | |
224 ("{\\\\`o}" "ò") | |
225 ("{\\\\'o}" "ó") | |
226 ("{\\\\~o}" "õ") | |
227 ("{\\\\^o}" "ô") | |
228 ("{\\\\\"u}" "ü") | |
229 ("{\\\\`u}" "ù") | |
230 ("{\\\\'u}" "ú") | |
231 ("{\\\\^u}" "û") | |
232 ("{\\\\\"A}" "Ä") | |
233 ("{\\\\`A}" "À") | |
234 ("{\\\\'A}" "Á") | |
235 ("{\\\\~A}" "Ã") | |
236 ("{\\\\^A}" "Â") | |
237 ("{\\\\\"E}" "Ë") | |
238 ("{\\\\`E}" "È") | |
239 ("{\\\\'E}" "É") | |
240 ("{\\\\^E}" "Ê") | |
241 ("{\\\\\"I}" "Ï") | |
242 ("{\\\\`I}" "Ì") | |
243 ("{\\\\'I}" "Í") | |
244 ("{\\\\^I}" "Î") | |
245 ("{\\\\\"O}" "Ö") | |
246 ("{\\\\`O}" "Ò") | |
247 ("{\\\\'O}" "Ó") | |
248 ("{\\\\~O}" "Õ") | |
249 ("{\\\\^O}" "Ô") | |
250 ("{\\\\\"U}" "Ü") | |
251 ("{\\\\`U}" "Ù") | |
252 ("{\\\\'U}" "Ú") | |
253 ("{\\\\^U}" "Û") | |
254 ("{\\\\~n}" "ñ") | |
255 ("{\\\\~N}" "Ñ") | |
256 ("{\\\\c c}" "ç") | |
257 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
258 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
259 ("\\\\`a" "à") |
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 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
264 ("\\\\`e" "è") |
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 ("\\\\\"\\\\i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
268 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
269 ("\\\\'\\\\i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
270 ("\\\\^\\\\i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
271 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
272 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
273 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
274 ("\\\\^i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
275 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
276 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
277 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
278 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
279 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
280 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
281 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
282 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
283 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
284 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
285 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
286 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
287 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
288 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
289 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
290 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
291 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
292 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
293 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
294 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
295 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
296 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
297 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
298 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
299 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
300 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
301 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
302 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
303 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
304 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
305 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
306 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
307 ("\\\\~N" "Ñ") |
7260 | 308 ("\\\\\"{a}" "ä") |
309 ("\\\\`{a}" "à") | |
310 ("\\\\'{a}" "á") | |
311 ("\\\\~{a}" "ã") | |
312 ("\\\\^{a}" "â") | |
313 ("\\\\\"{e}" "ë") | |
314 ("\\\\`{e}" "è") | |
315 ("\\\\'{e}" "é") | |
316 ("\\\\^{e}" "ê") | |
317 ("\\\\\"{\\\\i}" "ï") | |
318 ("\\\\`{\\\\i}" "ì") | |
319 ("\\\\'{\\\\i}" "í") | |
320 ("\\\\^{\\\\i}" "î") | |
321 ("\\\\\"{i}" "ï") | |
322 ("\\\\`{i}" "ì") | |
323 ("\\\\'{i}" "í") | |
324 ("\\\\^{i}" "î") | |
325 ("\\\\\"{o}" "ö") | |
326 ("\\\\`{o}" "ò") | |
327 ("\\\\'{o}" "ó") | |
328 ("\\\\~{o}" "õ") | |
329 ("\\\\^{o}" "ô") | |
330 ("\\\\\"{u}" "ü") | |
331 ("\\\\`{u}" "ù") | |
332 ("\\\\'{u}" "ú") | |
333 ("\\\\^{u}" "û") | |
334 ("\\\\\"{A}" "Ä") | |
335 ("\\\\`{A}" "À") | |
336 ("\\\\'{A}" "Á") | |
337 ("\\\\~{A}" "Ã") | |
338 ("\\\\^{A}" "Â") | |
339 ("\\\\\"{E}" "Ë") | |
340 ("\\\\`{E}" "È") | |
341 ("\\\\'{E}" "É") | |
342 ("\\\\^{E}" "Ê") | |
343 ("\\\\\"{I}" "Ï") | |
344 ("\\\\`{I}" "Ì") | |
345 ("\\\\'{I}" "Í") | |
346 ("\\\\^{I}" "Î") | |
347 ("\\\\\"{O}" "Ö") | |
348 ("\\\\`{O}" "Ò") | |
349 ("\\\\'{O}" "Ó") | |
350 ("\\\\~{O}" "Õ") | |
351 ("\\\\^{O}" "Ô") | |
352 ("\\\\\"{U}" "Ü") | |
353 ("\\\\`{U}" "Ù") | |
354 ("\\\\'{U}" "Ú") | |
355 ("\\\\^{U}" "Û") | |
356 ("\\\\~{n}" "ñ") | |
357 ("\\\\~{N}" "Ñ") | |
358 ("\\\\c{c}" "ç") | |
359 ("\\\\c{C}" "Ç") | |
360 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
361 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
362 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
363 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
364 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
365 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
366 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
367 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
368 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
369 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
370 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
371 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
372 ("\\\\S{}" "§" ) |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
373 ("{\\?`}" "¿") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
374 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
375 ("\\?`" "¿") |
7260 | 376 ("!`" "¡") |
377 ) | |
378 "Translation table for translating TeX sequences to ISO 8859-1 characters. | |
379 This table is not exhaustive (and due to TeX's power can never be). It only | |
380 contains commonly used sequences.") | |
381 | |
18228 | 382 (defun iso-tex2iso (from to) |
7260 | 383 "Translate TeX sequences to ISO 8859-1 characters." |
384 (interactive) | |
18228 | 385 (iso-translate-conventions from to iso-tex2iso-trans-tab)) |
7260 | 386 |
387 (defvar iso-gtex2iso-trans-tab | |
388 '( | |
389 ("{\\\\\"a}" "ä") | |
390 ("{\\\\`a}" "à") | |
391 ("{\\\\'a}" "á") | |
392 ("{\\\\~a}" "ã") | |
393 ("{\\\\^a}" "â") | |
394 ("{\\\\\"e}" "ë") | |
395 ("{\\\\`e}" "è") | |
396 ("{\\\\'e}" "é") | |
397 ("{\\\\^e}" "ê") | |
398 ("{\\\\\"\\\\i}" "ï") | |
399 ("{\\\\`\\\\i}" "ì") | |
400 ("{\\\\'\\\\i}" "í") | |
401 ("{\\\\^\\\\i}" "î") | |
402 ("{\\\\\"i}" "ï") | |
403 ("{\\\\`i}" "ì") | |
404 ("{\\\\'i}" "í") | |
405 ("{\\\\^i}" "î") | |
406 ("{\\\\\"o}" "ö") | |
407 ("{\\\\`o}" "ò") | |
408 ("{\\\\'o}" "ó") | |
409 ("{\\\\~o}" "õ") | |
410 ("{\\\\^o}" "ô") | |
411 ("{\\\\\"u}" "ü") | |
412 ("{\\\\`u}" "ù") | |
413 ("{\\\\'u}" "ú") | |
414 ("{\\\\^u}" "û") | |
415 ("{\\\\\"A}" "Ä") | |
416 ("{\\\\`A}" "À") | |
417 ("{\\\\'A}" "Á") | |
418 ("{\\\\~A}" "Ã") | |
419 ("{\\\\^A}" "Â") | |
420 ("{\\\\\"E}" "Ë") | |
421 ("{\\\\`E}" "È") | |
422 ("{\\\\'E}" "É") | |
423 ("{\\\\^E}" "Ê") | |
424 ("{\\\\\"I}" "Ï") | |
425 ("{\\\\`I}" "Ì") | |
426 ("{\\\\'I}" "Í") | |
427 ("{\\\\^I}" "Î") | |
428 ("{\\\\\"O}" "Ö") | |
429 ("{\\\\`O}" "Ò") | |
430 ("{\\\\'O}" "Ó") | |
431 ("{\\\\~O}" "Õ") | |
432 ("{\\\\^O}" "Ô") | |
433 ("{\\\\\"U}" "Ü") | |
434 ("{\\\\`U}" "Ù") | |
435 ("{\\\\'U}" "Ú") | |
436 ("{\\\\^U}" "Û") | |
437 ("{\\\\~n}" "ñ") | |
438 ("{\\\\~N}" "Ñ") | |
439 ("{\\\\c c}" "ç") | |
440 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
441 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
442 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
443 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
444 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
445 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
446 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
447 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
448 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
449 ("\\\\^e" "ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
450 ("\\\\\"\\\\i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
451 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
452 ("\\\\'\\\\i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
453 ("\\\\^\\\\i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
454 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
455 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
456 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
457 ("\\\\^i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
458 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
459 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
460 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
461 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
462 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
463 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
464 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
465 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
466 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
467 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
468 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
469 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
470 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
471 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
472 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
473 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
474 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
475 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
476 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
477 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
478 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
479 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
480 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
481 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
482 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
483 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
484 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
485 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
486 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
487 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
488 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
489 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
490 ("\\\\~N" "Ñ") |
7260 | 491 ("\\\\\"{a}" "ä") |
492 ("\\\\`{a}" "à") | |
493 ("\\\\'{a}" "á") | |
494 ("\\\\~{a}" "ã") | |
495 ("\\\\^{a}" "â") | |
496 ("\\\\\"{e}" "ë") | |
497 ("\\\\`{e}" "è") | |
498 ("\\\\'{e}" "é") | |
499 ("\\\\^{e}" "ê") | |
500 ("\\\\\"{\\\\i}" "ï") | |
501 ("\\\\`{\\\\i}" "ì") | |
502 ("\\\\'{\\\\i}" "í") | |
503 ("\\\\^{\\\\i}" "î") | |
504 ("\\\\\"{i}" "ï") | |
505 ("\\\\`{i}" "ì") | |
506 ("\\\\'{i}" "í") | |
507 ("\\\\^{i}" "î") | |
508 ("\\\\\"{o}" "ö") | |
509 ("\\\\`{o}" "ò") | |
510 ("\\\\'{o}" "ó") | |
511 ("\\\\~{o}" "õ") | |
512 ("\\\\^{o}" "ô") | |
513 ("\\\\\"{u}" "ü") | |
514 ("\\\\`{u}" "ù") | |
515 ("\\\\'{u}" "ú") | |
516 ("\\\\^{u}" "û") | |
517 ("\\\\\"{A}" "Ä") | |
518 ("\\\\`{A}" "À") | |
519 ("\\\\'{A}" "Á") | |
520 ("\\\\~{A}" "Ã") | |
521 ("\\\\^{A}" "Â") | |
522 ("\\\\\"{E}" "Ë") | |
523 ("\\\\`{E}" "È") | |
524 ("\\\\'{E}" "É") | |
525 ("\\\\^{E}" "Ê") | |
526 ("\\\\\"{I}" "Ï") | |
527 ("\\\\`{I}" "Ì") | |
528 ("\\\\'{I}" "Í") | |
529 ("\\\\^{I}" "Î") | |
530 ("\\\\\"{O}" "Ö") | |
531 ("\\\\`{O}" "Ò") | |
532 ("\\\\'{O}" "Ó") | |
533 ("\\\\~{O}" "Õ") | |
534 ("\\\\^{O}" "Ô") | |
535 ("\\\\\"{U}" "Ü") | |
536 ("\\\\`{U}" "Ù") | |
537 ("\\\\'{U}" "Ú") | |
538 ("\\\\^{U}" "Û") | |
539 ("\\\\~{n}" "ñ") | |
540 ("\\\\~{N}" "Ñ") | |
541 ("\\\\c{c}" "ç") | |
542 ("\\\\c{C}" "Ç") | |
543 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
544 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
545 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
546 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
547 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
548 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
549 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
550 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
551 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
552 ("{\\\\S}" "§" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
553 ("\\\\pounds{}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
554 ("\\\\P{}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
555 ("\\\\S{}" "§" ) |
7260 | 556 ("?`" "¿") |
557 ("!`" "¡") | |
558 ("{?`}" "¿") | |
559 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
560 ("\"a" "ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
561 ("\"A" "Ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
562 ("\"o" "ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
563 ("\"O" "Ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
564 ("\"u" "ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
565 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
566 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
567 ("\\\\3" "ß") |
7260 | 568 ) |
569 "Translation table for translating German TeX sequences to ISO 8859-1. | |
570 This table is not exhaustive (and due to TeX's power can never be). It only | |
571 contains commonly used sequences.") | |
572 | |
573 (defvar iso-iso2gtex-trans-tab | |
574 '( | |
575 ("ä" "\"a") | |
576 ("à" "{\\\\`a}") | |
577 ("á" "{\\\\'a}") | |
578 ("ã" "{\\\\~a}") | |
579 ("â" "{\\\\^a}") | |
580 ("ë" "{\\\\\"e}") | |
581 ("è" "{\\\\`e}") | |
582 ("é" "{\\\\'e}") | |
583 ("ê" "{\\\\^e}") | |
584 ("ï" "{\\\\\"\\\\i}") | |
585 ("ì" "{\\\\`\\\\i}") | |
586 ("í" "{\\\\'\\\\i}") | |
587 ("î" "{\\\\^\\\\i}") | |
588 ("ö" "\"o") | |
589 ("ò" "{\\\\`o}") | |
590 ("ó" "{\\\\'o}") | |
591 ("õ" "{\\\\~o}") | |
592 ("ô" "{\\\\^o}") | |
593 ("ü" "\"u") | |
594 ("ù" "{\\\\`u}") | |
595 ("ú" "{\\\\'u}") | |
596 ("û" "{\\\\^u}") | |
597 ("Ä" "\"A") | |
598 ("À" "{\\\\`A}") | |
599 ("Á" "{\\\\'A}") | |
600 ("Ã" "{\\\\~A}") | |
601 ("Â" "{\\\\^A}") | |
602 ("Ë" "{\\\\\"E}") | |
603 ("È" "{\\\\`E}") | |
604 ("É" "{\\\\'E}") | |
605 ("Ê" "{\\\\^E}") | |
606 ("Ï" "{\\\\\"I}") | |
607 ("Ì" "{\\\\`I}") | |
608 ("Í" "{\\\\'I}") | |
609 ("Î" "{\\\\^I}") | |
610 ("Ö" "\"O") | |
611 ("Ò" "{\\\\`O}") | |
612 ("Ó" "{\\\\'O}") | |
613 ("Õ" "{\\\\~O}") | |
614 ("Ô" "{\\\\^O}") | |
615 ("Ü" "\"U") | |
616 ("Ù" "{\\\\`U}") | |
617 ("Ú" "{\\\\'U}") | |
618 ("Û" "{\\\\^U}") | |
619 ("ñ" "{\\\\~n}") | |
620 ("Ñ" "{\\\\~N}") | |
621 ("ç" "{\\\\c c}") | |
622 ("Ç" "{\\\\c C}") | |
623 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
624 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
625 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
626 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
627 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
628 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
629 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
630 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
631 ("§" "{\\\\S}") |
7260 | 632 ("¿" "{?`}") |
633 ("¡" "{!`}") | |
634 ) | |
635 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
636 | |
18228 | 637 (defun iso-gtex2iso (from to) |
7260 | 638 "Translate German TeX sequences to ISO 8859-1 characters." |
639 (interactive) | |
18228 | 640 (iso-translate-conventions from to iso-gtex2iso-trans-tab)) |
7260 | 641 |
642 | |
18228 | 643 (defun iso-iso2gtex (from to) |
644 "Translate ISO 8859-1 characters to German TeX sequences." | |
645 (interactive) | |
646 (iso-translate-conventions from to iso-iso2gtex-trans-tab)) | |
647 | |
648 (defvar iso-iso2duden-trans-tab | |
649 '(("ä" "ae") | |
650 ("Ä" "Ae") | |
651 ("ö" "oe") | |
652 ("Ö" "Oe") | |
653 ("ü" "ue") | |
654 ("Ü" "Ue") | |
655 ("ß" "ss"))) | |
656 | |
657 (defun iso-iso2duden (from to) | |
658 "Translate ISO 8859-1 characters to German TeX sequences." | |
659 (interactive) | |
660 (iso-translate-conventions from to iso-iso2duden-trans-tab)) | |
7260 | 661 |
18228 | 662 (defun iso-cvt-read-only () |
663 (interactive) | |
664 (error "This format is read-only; specify another format for writing")) | |
665 | |
666 (defun iso-cvt-write-only () | |
667 (interactive) | |
668 (error "This format is write-only")) | |
669 | |
670 (defun iso-cvt-define-menu () | |
671 "Add submenus to the Files menu, to convert to and from various formats." | |
672 (interactive) | |
673 | |
674 (define-key menu-bar-files-menu [load-as-separator] '("--")) | |
675 | |
676 (define-key menu-bar-files-menu [load-as] '("Load As..." . load-as)) | |
677 (defvar load-as-menu-map (make-sparse-keymap "Load As...")) | |
678 (fset 'load-as load-as-menu-map) | |
679 | |
680 ;;(define-key menu-bar-files-menu [insert-as] '("Insert As..." . insert-as)) | |
681 (defvar insert-as-menu-map (make-sparse-keymap "Insert As...")) | |
682 (fset 'insert-as insert-as-menu-map) | |
7260 | 683 |
18228 | 684 (define-key menu-bar-files-menu [write-as] '("Write As..." . write-as)) |
685 (defvar write-as-menu-map (make-sparse-keymap "Write As...")) | |
686 (fset 'write-as write-as-menu-map) | |
687 | |
688 (define-key menu-bar-files-menu [translate-separator] '("--")) | |
689 | |
690 (define-key menu-bar-files-menu [translate-to] '("Translate to..." . translate-to)) | |
691 (defvar translate-to-menu-map (make-sparse-keymap "Translate to...")) | |
692 (fset 'translate-to translate-to-menu-map) | |
693 | |
694 (define-key menu-bar-files-menu [translate-from] '("Translate from..." . translate-from)) | |
695 (defvar translate-from-menu-map (make-sparse-keymap "Translate from...")) | |
696 (fset 'translate-from translate-from-menu-map) | |
7260 | 697 |
18228 | 698 (let ((file-types (reverse format-alist)) |
699 name | |
700 str-name) | |
701 (while file-types | |
702 (setq name (car (car file-types)) | |
703 str-name (car (cdr (car file-types))) | |
704 file-types (cdr file-types)) | |
705 (if (stringp str-name) | |
706 (progn | |
707 (define-key load-as-menu-map (vector name) | |
708 (cons str-name | |
709 (list 'lambda '(file) (list 'interactive (format "FFind file (as %s): " name)) | |
710 (list 'format-find-file 'file (list 'quote name))))) | |
711 (define-key insert-as-menu-map (vector name) | |
712 (cons str-name | |
713 (list 'lambda '(file) (list 'interactive (format "FInsert file (as %s): " name)) | |
714 (list 'format-insert-file 'file (list 'quote name))))) | |
715 (define-key write-as-menu-map (vector name) | |
716 (cons str-name | |
717 (list 'lambda '(file) (list 'interactive (format "FWrite file (as %s): " name)) | |
718 (list 'format-write-file 'file (list 'quote (list name)))))) | |
719 (define-key translate-to-menu-map (vector name) | |
720 (cons str-name | |
721 (list 'lambda '() '(interactive) | |
722 (list 'format-encode-buffer (list 'quote name))))) | |
723 (define-key translate-from-menu-map (vector name) | |
724 (cons str-name | |
725 (list 'lambda '() '(interactive) | |
726 (list 'format-decode-buffer (list 'quote (list name)))))) | |
727 ))))) | |
7260 | 728 |
729 ;;; iso-cvt.el ends here |