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