Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 8016:51c69c76c3cc
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 23 Jun 1994 13:56:21 +0000 |
parents | 8996abee8718 |
children | b14b118e6724 |
rev | line source |
---|---|
7260 | 1 ;; iso-cvt.el -- translate to ISO 8859-1 from/to net/TeX conventions |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
2 ;; Copyright © 1993, 1994 Free Software Foundation, Inc. |
7260 | 3 ;; Was formerly called gm-lingo.el. |
4 | |
5 ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> | |
6 ;; Keywords: tex, iso, latin, i18n | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to | |
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
23 | |
24 ;;; Commentary: | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
25 ;; This lisp code server two purposes, both of which involve |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
26 ;; the translation of various conventions for representing European |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
27 ;; character sets to ISO 8859-1. |
7260 | 28 |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
29 ; Net support: |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
30 ; Various conventions exist in Newsgroups on how to represent national |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
31 ; characters. The functions provided here translate these net conventions |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
32 ; to ISO. |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
33 ; |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
34 ; Calling `iso-german' will turn the net convention for umlauts ("a etc.) |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
35 ; into ISO latin1 umlaute for easy reading. |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
36 ; 'iso-spanish' will turn net conventions for representing spanish |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
37 ; to ISO latin1. (Note that accents are omitted in news posts most |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
38 ; of the time, only enye is escaped.) |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
39 |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
40 ; TeX support |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
41 ; This mode installs hooks which change TeX files to ISO Latin-1 for |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
42 ; simplified editing. When the TeX file is saved, ISO latin1 characters are |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
43 ; translated back to escape sequences. |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
44 ; |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
45 ; An alternative is a TeX style that handles 8 bit ISO files |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
46 ; (available on ftp.vlsivie.tuwien.ac.at in /pub/8bit) |
7260 | 47 ; - but these files are difficult to transmit ... so while the net is |
48 ; still @ 7 bit this may be useful | |
49 | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
50 ;; TO DO: |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
51 ; The net support should install hooks (like TeX support does) |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
52 ; which recognizes certains news groups and translates all articles from |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
53 ; those groups. |
7260 | 54 ; |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
55 ; Cover more cases for translation (There is an infinite number of ways to |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
56 ; represent accented characters in TeX) |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
57 |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
58 ;; SEE ALSO: |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
59 ; If you are interested in questions related to using the ISO 8859-1 |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
60 ; characters set (configuring emacs, Unix, etc. to use ISO), then you |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
61 ; can get the ISO 8859-1 FAQ via anonymous ftp from |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
62 ; ftp.vlsivie.tuwien.ac.at in /pub/bit/FAQ-ISO-8859-1 |
7260 | 63 |
64 ;;; Code: | |
65 | |
66 (provide 'iso-cvt) | |
67 | |
68 (defvar iso-spanish-trans-tab | |
69 '( | |
70 ("~n" "ñ") | |
71 ("\([a-zA-Z]\)#" "\\1ñ") | |
72 ("~N" "Ñ") | |
73 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
74 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
75 ("\\([-a-zA-Z]\\)'o" "\\1ó") | |
76 ("\\([-a-zA-Z]\\)'O" "\\Ó") | |
77 ("\\([-a-zA-Z]\\)'e" "\\1é") | |
78 ("\\([-a-zA-Z]\\)'E" "\\1É") | |
79 ("\\([-a-zA-Z]\\)'a" "\\1á") | |
80 ("\\([-a-zA-Z]\\)'A" "\\1A") | |
81 ("\\([-a-zA-Z]\\)'i" "\\1í") | |
82 ("\\([-a-zA-Z]\\)'I" "\\1Í") | |
83 ) | |
84 "Spanish translation table.") | |
85 | |
86 (defun iso-translate-conventions (trans-tab) | |
7850
b6f3dd2511bc
(iso-translate-conventions): Get rid of interactive spec.
Richard M. Stallman <rms@gnu.org>
parents:
7831
diff
changeset
|
87 "Use the translation table TRANS-TAB to translate the current buffer." |
7260 | 88 (save-excursion |
89 (widen) | |
90 (goto-char (point-min)) | |
91 (let ((work-tab trans-tab) | |
7831
343a21c51172
(iso-translate-conventions): Use case-dependent search and don't alter case.
Richard M. Stallman <rms@gnu.org>
parents:
7425
diff
changeset
|
92 (buffer-read-only nil) |
343a21c51172
(iso-translate-conventions): Use case-dependent search and don't alter case.
Richard M. Stallman <rms@gnu.org>
parents:
7425
diff
changeset
|
93 (case-fold-search nil)) |
7260 | 94 (while work-tab |
95 (save-excursion | |
96 (let ((trans-this (car work-tab))) | |
97 (while (re-search-forward (car trans-this) nil t) | |
7831
343a21c51172
(iso-translate-conventions): Use case-dependent search and don't alter case.
Richard M. Stallman <rms@gnu.org>
parents:
7425
diff
changeset
|
98 (replace-match (car (cdr trans-this)) t nil))) |
7260 | 99 (setq work-tab (cdr work-tab))))))) |
100 | |
101 (defun iso-spanish () | |
102 "Translate net conventions for Spanish to ISO 8859-1." | |
103 (interactive) | |
104 (iso-translate-conventions iso-spanish-trans-tab)) | |
105 | |
106 (defvar iso-aggressive-german-trans-tab | |
107 '( | |
108 ("\"a" "ä") | |
109 ("\"A" "Ä") | |
110 ("\"o" "ö") | |
111 ("\"O" "Ö") | |
112 ("\"u" "ü") | |
113 ("\"U" "Ü") | |
114 ("\"s" "ß") | |
115 ("\\\\3" "ß") | |
116 ) | |
117 "German translation table. | |
118 This table uses an aggressive translation approach and may translate | |
119 erroneously translate too much.") | |
120 | |
121 (defvar iso-conservative-german-trans-tab | |
122 '( | |
123 ("\\([-a-zA-Z\"`]\\)\"a" "\\1ä") | |
124 ("\\([-a-zA-Z\"`]\\)\"A" "\\1Ä") | |
125 ("\\([-a-zA-Z\"`]\\)\"o" "\\1ö") | |
126 ("\\([-a-zA-Z\"`]\\)\"O" "\\1Ö") | |
127 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
128 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
129 ("\\([-a-zA-Z\"`]\\)\"s" "\\1ß") | |
130 ("\\([-a-zA-Z\"`]\\)\\\\3" "\\1ß") | |
131 ) | |
132 "German translation table. | |
133 This table uses a conservative translation approach and may translate too | |
134 little.") | |
135 | |
136 | |
137 (defvar iso-german-trans-tab iso-aggressive-german-trans-tab | |
138 "Currently active translation table for German.") | |
139 | |
140 (defun iso-german () | |
141 "Translate net conventions for German to ISO 8859-1." | |
142 (interactive) | |
143 (iso-translate-conventions iso-german-trans-tab)) | |
144 | |
145 (defvar iso-iso2tex-trans-tab | |
146 '( | |
147 ("ä" "{\\\\\"a}") | |
148 ("à" "{\\\\`a}") | |
149 ("á" "{\\\\'a}") | |
150 ("ã" "{\\\\~a}") | |
151 ("â" "{\\\\^a}") | |
152 ("ë" "{\\\\\"e}") | |
153 ("è" "{\\\\`e}") | |
154 ("é" "{\\\\'e}") | |
155 ("ê" "{\\\\^e}") | |
156 ("ï" "{\\\\\"\\\\i}") | |
157 ("ì" "{\\\\`\\\\i}") | |
158 ("í" "{\\\\'\\\\i}") | |
159 ("î" "{\\\\^\\\\i}") | |
160 ("ö" "{\\\\\"o}") | |
161 ("ò" "{\\\\`o}") | |
162 ("ó" "{\\\\'o}") | |
163 ("õ" "{\\\\~o}") | |
164 ("ô" "{\\\\^o}") | |
165 ("ü" "{\\\\\"u}") | |
166 ("ù" "{\\\\`u}") | |
167 ("ú" "{\\\\'u}") | |
168 ("û" "{\\\\^u}") | |
169 ("Ä" "{\\\\\"A}") | |
170 ("À" "{\\\\`A}") | |
171 ("Á" "{\\\\'A}") | |
172 ("Ã" "{\\\\~A}") | |
173 ("Â" "{\\\\^A}") | |
174 ("Ë" "{\\\\\"E}") | |
175 ("È" "{\\\\`E}") | |
176 ("É" "{\\\\'E}") | |
177 ("Ê" "{\\\\^E}") | |
178 ("Ï" "{\\\\\"I}") | |
179 ("Ì" "{\\\\`I}") | |
180 ("Í" "{\\\\'I}") | |
181 ("Î" "{\\\\^I}") | |
182 ("Ö" "{\\\\\"O}") | |
183 ("Ò" "{\\\\`O}") | |
184 ("Ó" "{\\\\'O}") | |
185 ("Õ" "{\\\\~O}") | |
186 ("Ô" "{\\\\^O}") | |
187 ("Ü" "{\\\\\"U}") | |
188 ("Ù" "{\\\\`U}") | |
189 ("Ú" "{\\\\'U}") | |
190 ("Û" "{\\\\^U}") | |
191 ("ñ" "{\\\\~n}") | |
192 ("Ñ" "{\\\\~N}") | |
193 ("ç" "{\\\\c c}") | |
194 ("Ç" "{\\\\c C}") | |
195 ("ß" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
196 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
197 ("\346" "{\\\\ae}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
198 ("\305" "{\\\\o A}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
199 ("\345" "{\\\\o a}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
200 ("\251" "{\\\\copyright}") |
7260 | 201 ("¿" "{?`}") |
202 ("¡" "{!`}") | |
203 ) | |
204 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
205 | |
206 | |
207 | |
208 | |
209 (defun iso-iso2tex () | |
210 "Translate ISO 8859-1 characters to TeX sequences." | |
211 (interactive) | |
212 (iso-translate-conventions iso-iso2tex-trans-tab)) | |
213 | |
214 | |
215 (defvar iso-tex2iso-trans-tab | |
216 '( | |
217 ("{\\\\\"a}" "ä") | |
218 ("{\\\\`a}" "à") | |
219 ("{\\\\'a}" "á") | |
220 ("{\\\\~a}" "ã") | |
221 ("{\\\\^a}" "â") | |
222 ("{\\\\\"e}" "ë") | |
223 ("{\\\\`e}" "è") | |
224 ("{\\\\'e}" "é") | |
225 ("{\\\\^e}" "ê") | |
226 ("{\\\\\"\\\\i}" "ï") | |
227 ("{\\\\`\\\\i}" "ì") | |
228 ("{\\\\'\\\\i}" "í") | |
229 ("{\\\\^\\\\i}" "î") | |
230 ("{\\\\\"i}" "ï") | |
231 ("{\\\\`i}" "ì") | |
232 ("{\\\\'i}" "í") | |
233 ("{\\\\^i}" "î") | |
234 ("{\\\\\"o}" "ö") | |
235 ("{\\\\`o}" "ò") | |
236 ("{\\\\'o}" "ó") | |
237 ("{\\\\~o}" "õ") | |
238 ("{\\\\^o}" "ô") | |
239 ("{\\\\\"u}" "ü") | |
240 ("{\\\\`u}" "ù") | |
241 ("{\\\\'u}" "ú") | |
242 ("{\\\\^u}" "û") | |
243 ("{\\\\\"A}" "Ä") | |
244 ("{\\\\`A}" "À") | |
245 ("{\\\\'A}" "Á") | |
246 ("{\\\\~A}" "Ã") | |
247 ("{\\\\^A}" "Â") | |
248 ("{\\\\\"E}" "Ë") | |
249 ("{\\\\`E}" "È") | |
250 ("{\\\\'E}" "É") | |
251 ("{\\\\^E}" "Ê") | |
252 ("{\\\\\"I}" "Ï") | |
253 ("{\\\\`I}" "Ì") | |
254 ("{\\\\'I}" "Í") | |
255 ("{\\\\^I}" "Î") | |
256 ("{\\\\\"O}" "Ö") | |
257 ("{\\\\`O}" "Ò") | |
258 ("{\\\\'O}" "Ó") | |
259 ("{\\\\~O}" "Õ") | |
260 ("{\\\\^O}" "Ô") | |
261 ("{\\\\\"U}" "Ü") | |
262 ("{\\\\`U}" "Ù") | |
263 ("{\\\\'U}" "Ú") | |
264 ("{\\\\^U}" "Û") | |
265 ("{\\\\~n}" "ñ") | |
266 ("{\\\\~N}" "Ñ") | |
267 ("{\\\\c c}" "ç") | |
268 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
269 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
270 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
271 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
272 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
273 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
274 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
275 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
276 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
277 ("\\\\^e" "ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
278 ("\\\\\"\\\\i" "ï") |
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 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
284 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
285 ("\\\\^i" "î") |
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 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
289 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
290 ("\\\\^o" "ô") |
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 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
293 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
294 ("\\\\^u" "û") |
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 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
298 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
299 ("\\\\^A" "Â") |
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 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
302 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
303 ("\\\\^E" "Ê") |
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 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
306 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
307 ("\\\\^I" "Î") |
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 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
311 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
312 ("\\\\^O" "Ô") |
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 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
315 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
316 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
317 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
318 ("\\\\~N" "Ñ") |
7260 | 319 ("\\\\\"{a}" "ä") |
320 ("\\\\`{a}" "à") | |
321 ("\\\\'{a}" "á") | |
322 ("\\\\~{a}" "ã") | |
323 ("\\\\^{a}" "â") | |
324 ("\\\\\"{e}" "ë") | |
325 ("\\\\`{e}" "è") | |
326 ("\\\\'{e}" "é") | |
327 ("\\\\^{e}" "ê") | |
328 ("\\\\\"{\\\\i}" "ï") | |
329 ("\\\\`{\\\\i}" "ì") | |
330 ("\\\\'{\\\\i}" "í") | |
331 ("\\\\^{\\\\i}" "î") | |
332 ("\\\\\"{i}" "ï") | |
333 ("\\\\`{i}" "ì") | |
334 ("\\\\'{i}" "í") | |
335 ("\\\\^{i}" "î") | |
336 ("\\\\\"{o}" "ö") | |
337 ("\\\\`{o}" "ò") | |
338 ("\\\\'{o}" "ó") | |
339 ("\\\\~{o}" "õ") | |
340 ("\\\\^{o}" "ô") | |
341 ("\\\\\"{u}" "ü") | |
342 ("\\\\`{u}" "ù") | |
343 ("\\\\'{u}" "ú") | |
344 ("\\\\^{u}" "û") | |
345 ("\\\\\"{A}" "Ä") | |
346 ("\\\\`{A}" "À") | |
347 ("\\\\'{A}" "Á") | |
348 ("\\\\~{A}" "Ã") | |
349 ("\\\\^{A}" "Â") | |
350 ("\\\\\"{E}" "Ë") | |
351 ("\\\\`{E}" "È") | |
352 ("\\\\'{E}" "É") | |
353 ("\\\\^{E}" "Ê") | |
354 ("\\\\\"{I}" "Ï") | |
355 ("\\\\`{I}" "Ì") | |
356 ("\\\\'{I}" "Í") | |
357 ("\\\\^{I}" "Î") | |
358 ("\\\\\"{O}" "Ö") | |
359 ("\\\\`{O}" "Ò") | |
360 ("\\\\'{O}" "Ó") | |
361 ("\\\\~{O}" "Õ") | |
362 ("\\\\^{O}" "Ô") | |
363 ("\\\\\"{U}" "Ü") | |
364 ("\\\\`{U}" "Ù") | |
365 ("\\\\'{U}" "Ú") | |
366 ("\\\\^{U}" "Û") | |
367 ("\\\\~{n}" "ñ") | |
368 ("\\\\~{N}" "Ñ") | |
369 ("\\\\c{c}" "ç") | |
370 ("\\\\c{C}" "Ç") | |
371 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
372 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
373 ("{\\\\ae}" "\346") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
374 ("{\\\\o A}" "\305") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
375 ("\\\\o{A}" "\305") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
376 ("{\\\\o a}" "\345") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
377 ("\\\\o{a}" "\345") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
378 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
379 ("\\\\copyright{}" "\251") |
7260 | 380 ("?`" "¿") |
381 ("!`" "¡") | |
382 ("{?`}" "¿") | |
383 ("{!`}" "¡") | |
384 ) | |
385 "Translation table for translating TeX sequences to ISO 8859-1 characters. | |
386 This table is not exhaustive (and due to TeX's power can never be). It only | |
387 contains commonly used sequences.") | |
388 | |
389 (defun iso-tex2iso () | |
390 "Translate TeX sequences to ISO 8859-1 characters." | |
391 (interactive) | |
392 (iso-translate-conventions iso-tex2iso-trans-tab)) | |
393 | |
394 (defvar iso-gtex2iso-trans-tab | |
395 '( | |
396 ("{\\\\\"a}" "ä") | |
397 ("{\\\\`a}" "à") | |
398 ("{\\\\'a}" "á") | |
399 ("{\\\\~a}" "ã") | |
400 ("{\\\\^a}" "â") | |
401 ("{\\\\\"e}" "ë") | |
402 ("{\\\\`e}" "è") | |
403 ("{\\\\'e}" "é") | |
404 ("{\\\\^e}" "ê") | |
405 ("{\\\\\"\\\\i}" "ï") | |
406 ("{\\\\`\\\\i}" "ì") | |
407 ("{\\\\'\\\\i}" "í") | |
408 ("{\\\\^\\\\i}" "î") | |
409 ("{\\\\\"i}" "ï") | |
410 ("{\\\\`i}" "ì") | |
411 ("{\\\\'i}" "í") | |
412 ("{\\\\^i}" "î") | |
413 ("{\\\\\"o}" "ö") | |
414 ("{\\\\`o}" "ò") | |
415 ("{\\\\'o}" "ó") | |
416 ("{\\\\~o}" "õ") | |
417 ("{\\\\^o}" "ô") | |
418 ("{\\\\\"u}" "ü") | |
419 ("{\\\\`u}" "ù") | |
420 ("{\\\\'u}" "ú") | |
421 ("{\\\\^u}" "û") | |
422 ("{\\\\\"A}" "Ä") | |
423 ("{\\\\`A}" "À") | |
424 ("{\\\\'A}" "Á") | |
425 ("{\\\\~A}" "Ã") | |
426 ("{\\\\^A}" "Â") | |
427 ("{\\\\\"E}" "Ë") | |
428 ("{\\\\`E}" "È") | |
429 ("{\\\\'E}" "É") | |
430 ("{\\\\^E}" "Ê") | |
431 ("{\\\\\"I}" "Ï") | |
432 ("{\\\\`I}" "Ì") | |
433 ("{\\\\'I}" "Í") | |
434 ("{\\\\^I}" "Î") | |
435 ("{\\\\\"O}" "Ö") | |
436 ("{\\\\`O}" "Ò") | |
437 ("{\\\\'O}" "Ó") | |
438 ("{\\\\~O}" "Õ") | |
439 ("{\\\\^O}" "Ô") | |
440 ("{\\\\\"U}" "Ü") | |
441 ("{\\\\`U}" "Ù") | |
442 ("{\\\\'U}" "Ú") | |
443 ("{\\\\^U}" "Û") | |
444 ("{\\\\~n}" "ñ") | |
445 ("{\\\\~N}" "Ñ") | |
446 ("{\\\\c c}" "ç") | |
447 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
448 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
449 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
450 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
451 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
452 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
453 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
454 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
455 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
456 ("\\\\^e" "ê") |
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 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
459 ("\\\\'\\\\i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
460 ("\\\\^\\\\i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
461 ("\\\\\"i" "ï") |
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 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
466 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
467 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
468 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
469 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
470 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
471 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
472 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
473 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
474 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
475 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
476 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
477 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
478 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
479 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
480 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
481 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
482 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
483 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
484 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
485 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
486 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
487 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
488 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
489 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
490 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
491 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
492 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
493 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
494 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
495 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
496 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
497 ("\\\\~N" "Ñ") |
7260 | 498 ("\\\\\"{a}" "ä") |
499 ("\\\\`{a}" "à") | |
500 ("\\\\'{a}" "á") | |
501 ("\\\\~{a}" "ã") | |
502 ("\\\\^{a}" "â") | |
503 ("\\\\\"{e}" "ë") | |
504 ("\\\\`{e}" "è") | |
505 ("\\\\'{e}" "é") | |
506 ("\\\\^{e}" "ê") | |
507 ("\\\\\"{\\\\i}" "ï") | |
508 ("\\\\`{\\\\i}" "ì") | |
509 ("\\\\'{\\\\i}" "í") | |
510 ("\\\\^{\\\\i}" "î") | |
511 ("\\\\\"{i}" "ï") | |
512 ("\\\\`{i}" "ì") | |
513 ("\\\\'{i}" "í") | |
514 ("\\\\^{i}" "î") | |
515 ("\\\\\"{o}" "ö") | |
516 ("\\\\`{o}" "ò") | |
517 ("\\\\'{o}" "ó") | |
518 ("\\\\~{o}" "õ") | |
519 ("\\\\^{o}" "ô") | |
520 ("\\\\\"{u}" "ü") | |
521 ("\\\\`{u}" "ù") | |
522 ("\\\\'{u}" "ú") | |
523 ("\\\\^{u}" "û") | |
524 ("\\\\\"{A}" "Ä") | |
525 ("\\\\`{A}" "À") | |
526 ("\\\\'{A}" "Á") | |
527 ("\\\\~{A}" "Ã") | |
528 ("\\\\^{A}" "Â") | |
529 ("\\\\\"{E}" "Ë") | |
530 ("\\\\`{E}" "È") | |
531 ("\\\\'{E}" "É") | |
532 ("\\\\^{E}" "Ê") | |
533 ("\\\\\"{I}" "Ï") | |
534 ("\\\\`{I}" "Ì") | |
535 ("\\\\'{I}" "Í") | |
536 ("\\\\^{I}" "Î") | |
537 ("\\\\\"{O}" "Ö") | |
538 ("\\\\`{O}" "Ò") | |
539 ("\\\\'{O}" "Ó") | |
540 ("\\\\~{O}" "Õ") | |
541 ("\\\\^{O}" "Ô") | |
542 ("\\\\\"{U}" "Ü") | |
543 ("\\\\`{U}" "Ù") | |
544 ("\\\\'{U}" "Ú") | |
545 ("\\\\^{U}" "Û") | |
546 ("\\\\~{n}" "ñ") | |
547 ("\\\\~{N}" "Ñ") | |
548 ("\\\\c{c}" "ç") | |
549 ("\\\\c{C}" "Ç") | |
550 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
551 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
552 ("{\\\\ae}" "\346") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
553 ("{\\\\o A}" "\305") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
554 ("\\\\o{A}" "\305") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
555 ("{\\\\o a}" "\345") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
556 ("\\\\o{a}" "\345") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
557 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
558 ("\\\\copyright{}" "\251") |
7260 | 559 ("?`" "¿") |
560 ("!`" "¡") | |
561 ("{?`}" "¿") | |
562 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
563 ("\"a" "ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
564 ("\"A" "Ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
565 ("\"o" "ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
566 ("\"O" "Ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
567 ("\"u" "ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
568 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
569 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
570 ("\\\\3" "ß") |
7260 | 571 ) |
572 "Translation table for translating German TeX sequences to ISO 8859-1. | |
573 This table is not exhaustive (and due to TeX's power can never be). It only | |
574 contains commonly used sequences.") | |
575 | |
576 (defvar iso-iso2gtex-trans-tab | |
577 '( | |
578 ("ä" "\"a") | |
579 ("à" "{\\\\`a}") | |
580 ("á" "{\\\\'a}") | |
581 ("ã" "{\\\\~a}") | |
582 ("â" "{\\\\^a}") | |
583 ("ë" "{\\\\\"e}") | |
584 ("è" "{\\\\`e}") | |
585 ("é" "{\\\\'e}") | |
586 ("ê" "{\\\\^e}") | |
587 ("ï" "{\\\\\"\\\\i}") | |
588 ("ì" "{\\\\`\\\\i}") | |
589 ("í" "{\\\\'\\\\i}") | |
590 ("î" "{\\\\^\\\\i}") | |
591 ("ö" "\"o") | |
592 ("ò" "{\\\\`o}") | |
593 ("ó" "{\\\\'o}") | |
594 ("õ" "{\\\\~o}") | |
595 ("ô" "{\\\\^o}") | |
596 ("ü" "\"u") | |
597 ("ù" "{\\\\`u}") | |
598 ("ú" "{\\\\'u}") | |
599 ("û" "{\\\\^u}") | |
600 ("Ä" "\"A") | |
601 ("À" "{\\\\`A}") | |
602 ("Á" "{\\\\'A}") | |
603 ("Ã" "{\\\\~A}") | |
604 ("Â" "{\\\\^A}") | |
605 ("Ë" "{\\\\\"E}") | |
606 ("È" "{\\\\`E}") | |
607 ("É" "{\\\\'E}") | |
608 ("Ê" "{\\\\^E}") | |
609 ("Ï" "{\\\\\"I}") | |
610 ("Ì" "{\\\\`I}") | |
611 ("Í" "{\\\\'I}") | |
612 ("Î" "{\\\\^I}") | |
613 ("Ö" "\"O") | |
614 ("Ò" "{\\\\`O}") | |
615 ("Ó" "{\\\\'O}") | |
616 ("Õ" "{\\\\~O}") | |
617 ("Ô" "{\\\\^O}") | |
618 ("Ü" "\"U") | |
619 ("Ù" "{\\\\`U}") | |
620 ("Ú" "{\\\\'U}") | |
621 ("Û" "{\\\\^U}") | |
622 ("ñ" "{\\\\~n}") | |
623 ("Ñ" "{\\\\~N}") | |
624 ("ç" "{\\\\c c}") | |
625 ("Ç" "{\\\\c C}") | |
626 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
627 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
628 ("\346" "{\\\\ae}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
629 ("\305" "{\\\\o A}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
630 ("\345" "{\\\\o a}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
631 ("\251" "{\\\\copyright}") |
7260 | 632 ("¿" "{?`}") |
633 ("¡" "{!`}") | |
634 ) | |
635 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
636 | |
637 (defun iso-gtex2iso () | |
638 "Translate German TeX sequences to ISO 8859-1 characters." | |
639 (interactive) | |
640 (iso-translate-conventions iso-gtex2iso-trans-tab)) | |
641 | |
642 | |
643 (defun iso-iso2gtex () | |
644 "Translate ISO 8859-1 characters to German TeX sequences." | |
645 (interactive) | |
646 (iso-translate-conventions iso-iso2gtex-trans-tab)) | |
647 | |
648 | |
649 (defun iso-german-tex-p () | |
650 "Check if tex buffer is German LaTeX." | |
651 (save-excursion | |
652 (widen) | |
653 (goto-char (point-min)) | |
654 (re-search-forward "\\\\documentstyle\\[.*german.*\\]" nil t))) | |
655 | |
656 (defun iso-fix-iso2tex () | |
657 "Turn ISO 8859-1 (aka. ISO Latin-1) buffer into TeX sequences. | |
658 If German TeX is used, German TeX sequences are generated." | |
659 (if (or (equal major-mode 'latex-mode) | |
660 (equal major-mode 'LaTeX-mode)) ; AucTeX wants this | |
661 (if (iso-german-tex-p) | |
662 (iso-iso2gtex) | |
663 (iso-iso2tex))) | |
664 (if (or (equal major-mode 'tex-mode) | |
665 (equal major-mode 'TeX-mode)) ; AucTeX wants this | |
666 (iso-iso2tex))) | |
667 | |
668 (defun iso-fix-tex2iso () | |
669 "Turn TeX sequences into ISO 8859-1 (aka. ISO Latin-1) characters. | |
670 This function recognices German TeX buffers." | |
671 (if (or (equal major-mode 'latex-mode) | |
672 (equal major-mode 'Latex-mode)) ; AucTeX wants this | |
673 (if (iso-german-tex-p) | |
674 (iso-gtex2iso) | |
675 (iso-tex2iso))) | |
676 (if (or (equal major-mode 'tex-mode) | |
677 (equal major-mode 'TeX-mode)) ;; AucTeX wants this | |
678 (iso-tex2iso))) | |
679 | |
680 (defun iso-cvt-ffh () | |
681 "find-file-hook for iso-cvt-cvt.el." | |
682 (iso-fix-tex2iso) | |
683 (set-buffer-modified-p nil)) | |
684 | |
685 (defun iso-cvt-wfh () | |
686 "write file hook for iso-cvt-cvt.el." | |
687 (iso-fix-iso2tex)) | |
688 | |
689 (defun iso-cvt-ash () | |
690 "after save hook for iso-cvt-cvt.el." | |
691 (iso-fix-tex2iso) | |
692 (set-buffer-modified-p nil)) | |
693 | |
694 (add-hook 'find-file-hooks 'iso-cvt-ffh) | |
695 (add-hook 'write-file-hooks 'iso-cvt-wfh) | |
696 (add-hook 'after-save-hook 'iso-cvt-ash) | |
697 | |
698 ;;; iso-cvt.el ends here |