Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 11088:e88e9a016cfa
(syms_of_window): Fix missing \n\.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 22 Mar 1995 17:44:18 +0000 |
parents | 5cb0747f521f |
children | 84acc3adcd63 |
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: | |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
25 ;; 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
|
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 (goto-char (point-min)) | |
90 (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
|
91 (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
|
92 (case-fold-search nil)) |
7260 | 93 (while work-tab |
94 (save-excursion | |
95 (let ((trans-this (car work-tab))) | |
96 (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
|
97 (replace-match (car (cdr trans-this)) t nil))) |
7260 | 98 (setq work-tab (cdr work-tab))))))) |
99 | |
100 (defun iso-spanish () | |
101 "Translate net conventions for Spanish to ISO 8859-1." | |
102 (interactive) | |
103 (iso-translate-conventions iso-spanish-trans-tab)) | |
104 | |
105 (defvar iso-aggressive-german-trans-tab | |
106 '( | |
107 ("\"a" "ä") | |
108 ("\"A" "Ä") | |
109 ("\"o" "ö") | |
110 ("\"O" "Ö") | |
111 ("\"u" "ü") | |
112 ("\"U" "Ü") | |
113 ("\"s" "ß") | |
114 ("\\\\3" "ß") | |
115 ) | |
116 "German translation table. | |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
117 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
|
118 translate too much.") |
7260 | 119 |
120 (defvar iso-conservative-german-trans-tab | |
121 '( | |
122 ("\\([-a-zA-Z\"`]\\)\"a" "\\1ä") | |
123 ("\\([-a-zA-Z\"`]\\)\"A" "\\1Ä") | |
124 ("\\([-a-zA-Z\"`]\\)\"o" "\\1ö") | |
125 ("\\([-a-zA-Z\"`]\\)\"O" "\\1Ö") | |
126 ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") | |
127 ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") | |
128 ("\\([-a-zA-Z\"`]\\)\"s" "\\1ß") | |
129 ("\\([-a-zA-Z\"`]\\)\\\\3" "\\1ß") | |
130 ) | |
131 "German translation table. | |
132 This table uses a conservative translation approach and may translate too | |
133 little.") | |
134 | |
135 | |
136 (defvar iso-german-trans-tab iso-aggressive-german-trans-tab | |
137 "Currently active translation table for German.") | |
138 | |
139 (defun iso-german () | |
140 "Translate net conventions for German to ISO 8859-1." | |
141 (interactive) | |
142 (iso-translate-conventions iso-german-trans-tab)) | |
143 | |
144 (defvar iso-iso2tex-trans-tab | |
145 '( | |
146 ("ä" "{\\\\\"a}") | |
147 ("à" "{\\\\`a}") | |
148 ("á" "{\\\\'a}") | |
149 ("ã" "{\\\\~a}") | |
150 ("â" "{\\\\^a}") | |
151 ("ë" "{\\\\\"e}") | |
152 ("è" "{\\\\`e}") | |
153 ("é" "{\\\\'e}") | |
154 ("ê" "{\\\\^e}") | |
155 ("ï" "{\\\\\"\\\\i}") | |
156 ("ì" "{\\\\`\\\\i}") | |
157 ("í" "{\\\\'\\\\i}") | |
158 ("î" "{\\\\^\\\\i}") | |
159 ("ö" "{\\\\\"o}") | |
160 ("ò" "{\\\\`o}") | |
161 ("ó" "{\\\\'o}") | |
162 ("õ" "{\\\\~o}") | |
163 ("ô" "{\\\\^o}") | |
164 ("ü" "{\\\\\"u}") | |
165 ("ù" "{\\\\`u}") | |
166 ("ú" "{\\\\'u}") | |
167 ("û" "{\\\\^u}") | |
168 ("Ä" "{\\\\\"A}") | |
169 ("À" "{\\\\`A}") | |
170 ("Á" "{\\\\'A}") | |
171 ("Ã" "{\\\\~A}") | |
172 ("Â" "{\\\\^A}") | |
173 ("Ë" "{\\\\\"E}") | |
174 ("È" "{\\\\`E}") | |
175 ("É" "{\\\\'E}") | |
176 ("Ê" "{\\\\^E}") | |
177 ("Ï" "{\\\\\"I}") | |
178 ("Ì" "{\\\\`I}") | |
179 ("Í" "{\\\\'I}") | |
180 ("Î" "{\\\\^I}") | |
181 ("Ö" "{\\\\\"O}") | |
182 ("Ò" "{\\\\`O}") | |
183 ("Ó" "{\\\\'O}") | |
184 ("Õ" "{\\\\~O}") | |
185 ("Ô" "{\\\\^O}") | |
186 ("Ü" "{\\\\\"U}") | |
187 ("Ù" "{\\\\`U}") | |
188 ("Ú" "{\\\\'U}") | |
189 ("Û" "{\\\\^U}") | |
190 ("ñ" "{\\\\~n}") | |
191 ("Ñ" "{\\\\~N}") | |
192 ("ç" "{\\\\c c}") | |
193 ("Ç" "{\\\\c C}") | |
194 ("ß" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
195 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
196 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
197 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
198 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
199 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
200 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
201 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
202 ("§" "{\\\\S}") |
7260 | 203 ("¿" "{?`}") |
204 ("¡" "{!`}") | |
205 ) | |
206 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
207 | |
208 | |
209 | |
210 | |
211 (defun iso-iso2tex () | |
212 "Translate ISO 8859-1 characters to TeX sequences." | |
213 (interactive) | |
214 (iso-translate-conventions iso-iso2tex-trans-tab)) | |
215 | |
216 | |
217 (defvar iso-tex2iso-trans-tab | |
218 '( | |
219 ("{\\\\\"a}" "ä") | |
220 ("{\\\\`a}" "à") | |
221 ("{\\\\'a}" "á") | |
222 ("{\\\\~a}" "ã") | |
223 ("{\\\\^a}" "â") | |
224 ("{\\\\\"e}" "ë") | |
225 ("{\\\\`e}" "è") | |
226 ("{\\\\'e}" "é") | |
227 ("{\\\\^e}" "ê") | |
228 ("{\\\\\"\\\\i}" "ï") | |
229 ("{\\\\`\\\\i}" "ì") | |
230 ("{\\\\'\\\\i}" "í") | |
231 ("{\\\\^\\\\i}" "î") | |
232 ("{\\\\\"i}" "ï") | |
233 ("{\\\\`i}" "ì") | |
234 ("{\\\\'i}" "í") | |
235 ("{\\\\^i}" "î") | |
236 ("{\\\\\"o}" "ö") | |
237 ("{\\\\`o}" "ò") | |
238 ("{\\\\'o}" "ó") | |
239 ("{\\\\~o}" "õ") | |
240 ("{\\\\^o}" "ô") | |
241 ("{\\\\\"u}" "ü") | |
242 ("{\\\\`u}" "ù") | |
243 ("{\\\\'u}" "ú") | |
244 ("{\\\\^u}" "û") | |
245 ("{\\\\\"A}" "Ä") | |
246 ("{\\\\`A}" "À") | |
247 ("{\\\\'A}" "Á") | |
248 ("{\\\\~A}" "Ã") | |
249 ("{\\\\^A}" "Â") | |
250 ("{\\\\\"E}" "Ë") | |
251 ("{\\\\`E}" "È") | |
252 ("{\\\\'E}" "É") | |
253 ("{\\\\^E}" "Ê") | |
254 ("{\\\\\"I}" "Ï") | |
255 ("{\\\\`I}" "Ì") | |
256 ("{\\\\'I}" "Í") | |
257 ("{\\\\^I}" "Î") | |
258 ("{\\\\\"O}" "Ö") | |
259 ("{\\\\`O}" "Ò") | |
260 ("{\\\\'O}" "Ó") | |
261 ("{\\\\~O}" "Õ") | |
262 ("{\\\\^O}" "Ô") | |
263 ("{\\\\\"U}" "Ü") | |
264 ("{\\\\`U}" "Ù") | |
265 ("{\\\\'U}" "Ú") | |
266 ("{\\\\^U}" "Û") | |
267 ("{\\\\~n}" "ñ") | |
268 ("{\\\\~N}" "Ñ") | |
269 ("{\\\\c c}" "ç") | |
270 ("{\\\\c C}" "Ç") | |
7861
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 ("\\\\~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 ("\\\\\"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 ("\\\\'e" "é") |
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 ("\\\\\"\\\\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 ("\\\\'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 ("\\\\\"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 ("\\\\~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 ("\\\\\"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 ("\\\\'u" "ú") |
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 ("\\\\\"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 ("\\\\~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 ("\\\\\"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 ("\\\\'E" "É") |
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 ("\\\\\"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 ("\\\\'I" "Í") |
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 ("\\\\\"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 ("\\\\~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 ("\\\\\"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 ("\\\\'U" "Ú") |
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 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
320 ("\\\\~N" "Ñ") |
7260 | 321 ("\\\\\"{a}" "ä") |
322 ("\\\\`{a}" "à") | |
323 ("\\\\'{a}" "á") | |
324 ("\\\\~{a}" "ã") | |
325 ("\\\\^{a}" "â") | |
326 ("\\\\\"{e}" "ë") | |
327 ("\\\\`{e}" "è") | |
328 ("\\\\'{e}" "é") | |
329 ("\\\\^{e}" "ê") | |
330 ("\\\\\"{\\\\i}" "ï") | |
331 ("\\\\`{\\\\i}" "ì") | |
332 ("\\\\'{\\\\i}" "í") | |
333 ("\\\\^{\\\\i}" "î") | |
334 ("\\\\\"{i}" "ï") | |
335 ("\\\\`{i}" "ì") | |
336 ("\\\\'{i}" "í") | |
337 ("\\\\^{i}" "î") | |
338 ("\\\\\"{o}" "ö") | |
339 ("\\\\`{o}" "ò") | |
340 ("\\\\'{o}" "ó") | |
341 ("\\\\~{o}" "õ") | |
342 ("\\\\^{o}" "ô") | |
343 ("\\\\\"{u}" "ü") | |
344 ("\\\\`{u}" "ù") | |
345 ("\\\\'{u}" "ú") | |
346 ("\\\\^{u}" "û") | |
347 ("\\\\\"{A}" "Ä") | |
348 ("\\\\`{A}" "À") | |
349 ("\\\\'{A}" "Á") | |
350 ("\\\\~{A}" "Ã") | |
351 ("\\\\^{A}" "Â") | |
352 ("\\\\\"{E}" "Ë") | |
353 ("\\\\`{E}" "È") | |
354 ("\\\\'{E}" "É") | |
355 ("\\\\^{E}" "Ê") | |
356 ("\\\\\"{I}" "Ï") | |
357 ("\\\\`{I}" "Ì") | |
358 ("\\\\'{I}" "Í") | |
359 ("\\\\^{I}" "Î") | |
360 ("\\\\\"{O}" "Ö") | |
361 ("\\\\`{O}" "Ò") | |
362 ("\\\\'{O}" "Ó") | |
363 ("\\\\~{O}" "Õ") | |
364 ("\\\\^{O}" "Ô") | |
365 ("\\\\\"{U}" "Ü") | |
366 ("\\\\`{U}" "Ù") | |
367 ("\\\\'{U}" "Ú") | |
368 ("\\\\^{U}" "Û") | |
369 ("\\\\~{n}" "ñ") | |
370 ("\\\\~{N}" "Ñ") | |
371 ("\\\\c{c}" "ç") | |
372 ("\\\\c{C}" "Ç") | |
373 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
374 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
375 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
376 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
377 ("{\\\\aa}" "\345") |
7861
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") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
380 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
381 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
382 ("{\\\\S}" "§" ) |
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{}" "§" ) |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
386 ("{\\?`}" "¿") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
387 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
388 ("\\?`" "¿") |
7260 | 389 ("!`" "¡") |
390 ) | |
391 "Translation table for translating TeX sequences to ISO 8859-1 characters. | |
392 This table is not exhaustive (and due to TeX's power can never be). It only | |
393 contains commonly used sequences.") | |
394 | |
395 (defun iso-tex2iso () | |
396 "Translate TeX sequences to ISO 8859-1 characters." | |
397 (interactive) | |
398 (iso-translate-conventions iso-tex2iso-trans-tab)) | |
399 | |
400 (defvar iso-gtex2iso-trans-tab | |
401 '( | |
402 ("{\\\\\"a}" "ä") | |
403 ("{\\\\`a}" "à") | |
404 ("{\\\\'a}" "á") | |
405 ("{\\\\~a}" "ã") | |
406 ("{\\\\^a}" "â") | |
407 ("{\\\\\"e}" "ë") | |
408 ("{\\\\`e}" "è") | |
409 ("{\\\\'e}" "é") | |
410 ("{\\\\^e}" "ê") | |
411 ("{\\\\\"\\\\i}" "ï") | |
412 ("{\\\\`\\\\i}" "ì") | |
413 ("{\\\\'\\\\i}" "í") | |
414 ("{\\\\^\\\\i}" "î") | |
415 ("{\\\\\"i}" "ï") | |
416 ("{\\\\`i}" "ì") | |
417 ("{\\\\'i}" "í") | |
418 ("{\\\\^i}" "î") | |
419 ("{\\\\\"o}" "ö") | |
420 ("{\\\\`o}" "ò") | |
421 ("{\\\\'o}" "ó") | |
422 ("{\\\\~o}" "õ") | |
423 ("{\\\\^o}" "ô") | |
424 ("{\\\\\"u}" "ü") | |
425 ("{\\\\`u}" "ù") | |
426 ("{\\\\'u}" "ú") | |
427 ("{\\\\^u}" "û") | |
428 ("{\\\\\"A}" "Ä") | |
429 ("{\\\\`A}" "À") | |
430 ("{\\\\'A}" "Á") | |
431 ("{\\\\~A}" "Ã") | |
432 ("{\\\\^A}" "Â") | |
433 ("{\\\\\"E}" "Ë") | |
434 ("{\\\\`E}" "È") | |
435 ("{\\\\'E}" "É") | |
436 ("{\\\\^E}" "Ê") | |
437 ("{\\\\\"I}" "Ï") | |
438 ("{\\\\`I}" "Ì") | |
439 ("{\\\\'I}" "Í") | |
440 ("{\\\\^I}" "Î") | |
441 ("{\\\\\"O}" "Ö") | |
442 ("{\\\\`O}" "Ò") | |
443 ("{\\\\'O}" "Ó") | |
444 ("{\\\\~O}" "Õ") | |
445 ("{\\\\^O}" "Ô") | |
446 ("{\\\\\"U}" "Ü") | |
447 ("{\\\\`U}" "Ù") | |
448 ("{\\\\'U}" "Ú") | |
449 ("{\\\\^U}" "Û") | |
450 ("{\\\\~n}" "ñ") | |
451 ("{\\\\~N}" "Ñ") | |
452 ("{\\\\c c}" "ç") | |
453 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
454 ("\\\\\"a" "ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
455 ("\\\\`a" "à") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
456 ("\\\\'a" "á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
457 ("\\\\~a" "ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
458 ("\\\\^a" "â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
459 ("\\\\\"e" "ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
460 ("\\\\`e" "è") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
461 ("\\\\'e" "é") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
462 ("\\\\^e" "ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
463 ("\\\\\"\\\\i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
464 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
465 ("\\\\'\\\\i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
466 ("\\\\^\\\\i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
467 ("\\\\\"i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
468 ("\\\\`i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
469 ("\\\\'i" "í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
470 ("\\\\^i" "î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
471 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
472 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
473 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
474 ("\\\\~o" "õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
475 ("\\\\^o" "ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
476 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
477 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
478 ("\\\\'u" "ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
479 ("\\\\^u" "û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
480 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
481 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
482 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
483 ("\\\\~A" "Ã") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
484 ("\\\\^A" "Â") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
485 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
486 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
487 ("\\\\'E" "É") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
488 ("\\\\^E" "Ê") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
489 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
490 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
491 ("\\\\'I" "Í") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
492 ("\\\\^I" "Î") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
493 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
494 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
495 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
496 ("\\\\~O" "Õ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
497 ("\\\\^O" "Ô") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
498 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
499 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
500 ("\\\\'U" "Ú") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
501 ("\\\\^U" "Û") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
502 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
503 ("\\\\~N" "Ñ") |
7260 | 504 ("\\\\\"{a}" "ä") |
505 ("\\\\`{a}" "à") | |
506 ("\\\\'{a}" "á") | |
507 ("\\\\~{a}" "ã") | |
508 ("\\\\^{a}" "â") | |
509 ("\\\\\"{e}" "ë") | |
510 ("\\\\`{e}" "è") | |
511 ("\\\\'{e}" "é") | |
512 ("\\\\^{e}" "ê") | |
513 ("\\\\\"{\\\\i}" "ï") | |
514 ("\\\\`{\\\\i}" "ì") | |
515 ("\\\\'{\\\\i}" "í") | |
516 ("\\\\^{\\\\i}" "î") | |
517 ("\\\\\"{i}" "ï") | |
518 ("\\\\`{i}" "ì") | |
519 ("\\\\'{i}" "í") | |
520 ("\\\\^{i}" "î") | |
521 ("\\\\\"{o}" "ö") | |
522 ("\\\\`{o}" "ò") | |
523 ("\\\\'{o}" "ó") | |
524 ("\\\\~{o}" "õ") | |
525 ("\\\\^{o}" "ô") | |
526 ("\\\\\"{u}" "ü") | |
527 ("\\\\`{u}" "ù") | |
528 ("\\\\'{u}" "ú") | |
529 ("\\\\^{u}" "û") | |
530 ("\\\\\"{A}" "Ä") | |
531 ("\\\\`{A}" "À") | |
532 ("\\\\'{A}" "Á") | |
533 ("\\\\~{A}" "Ã") | |
534 ("\\\\^{A}" "Â") | |
535 ("\\\\\"{E}" "Ë") | |
536 ("\\\\`{E}" "È") | |
537 ("\\\\'{E}" "É") | |
538 ("\\\\^{E}" "Ê") | |
539 ("\\\\\"{I}" "Ï") | |
540 ("\\\\`{I}" "Ì") | |
541 ("\\\\'{I}" "Í") | |
542 ("\\\\^{I}" "Î") | |
543 ("\\\\\"{O}" "Ö") | |
544 ("\\\\`{O}" "Ò") | |
545 ("\\\\'{O}" "Ó") | |
546 ("\\\\~{O}" "Õ") | |
547 ("\\\\^{O}" "Ô") | |
548 ("\\\\\"{U}" "Ü") | |
549 ("\\\\`{U}" "Ù") | |
550 ("\\\\'{U}" "Ú") | |
551 ("\\\\^{U}" "Û") | |
552 ("\\\\~{n}" "ñ") | |
553 ("\\\\~{N}" "Ñ") | |
554 ("\\\\c{c}" "ç") | |
555 ("\\\\c{C}" "Ç") | |
556 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
557 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
558 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
559 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
560 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
561 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
562 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
563 ("{\\\\pounds}" "£" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
564 ("{\\\\P}" "¶" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
565 ("{\\\\S}" "§" ) |
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{}" "§" ) |
7260 | 569 ("?`" "¿") |
570 ("!`" "¡") | |
571 ("{?`}" "¿") | |
572 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
573 ("\"a" "ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
574 ("\"A" "Ä") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
575 ("\"o" "ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
576 ("\"O" "Ö") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
577 ("\"u" "ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
578 ("\"U" "Ü") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
579 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
580 ("\\\\3" "ß") |
7260 | 581 ) |
582 "Translation table for translating German TeX sequences to ISO 8859-1. | |
583 This table is not exhaustive (and due to TeX's power can never be). It only | |
584 contains commonly used sequences.") | |
585 | |
586 (defvar iso-iso2gtex-trans-tab | |
587 '( | |
588 ("ä" "\"a") | |
589 ("à" "{\\\\`a}") | |
590 ("á" "{\\\\'a}") | |
591 ("ã" "{\\\\~a}") | |
592 ("â" "{\\\\^a}") | |
593 ("ë" "{\\\\\"e}") | |
594 ("è" "{\\\\`e}") | |
595 ("é" "{\\\\'e}") | |
596 ("ê" "{\\\\^e}") | |
597 ("ï" "{\\\\\"\\\\i}") | |
598 ("ì" "{\\\\`\\\\i}") | |
599 ("í" "{\\\\'\\\\i}") | |
600 ("î" "{\\\\^\\\\i}") | |
601 ("ö" "\"o") | |
602 ("ò" "{\\\\`o}") | |
603 ("ó" "{\\\\'o}") | |
604 ("õ" "{\\\\~o}") | |
605 ("ô" "{\\\\^o}") | |
606 ("ü" "\"u") | |
607 ("ù" "{\\\\`u}") | |
608 ("ú" "{\\\\'u}") | |
609 ("û" "{\\\\^u}") | |
610 ("Ä" "\"A") | |
611 ("À" "{\\\\`A}") | |
612 ("Á" "{\\\\'A}") | |
613 ("Ã" "{\\\\~A}") | |
614 ("Â" "{\\\\^A}") | |
615 ("Ë" "{\\\\\"E}") | |
616 ("È" "{\\\\`E}") | |
617 ("É" "{\\\\'E}") | |
618 ("Ê" "{\\\\^E}") | |
619 ("Ï" "{\\\\\"I}") | |
620 ("Ì" "{\\\\`I}") | |
621 ("Í" "{\\\\'I}") | |
622 ("Î" "{\\\\^I}") | |
623 ("Ö" "\"O") | |
624 ("Ò" "{\\\\`O}") | |
625 ("Ó" "{\\\\'O}") | |
626 ("Õ" "{\\\\~O}") | |
627 ("Ô" "{\\\\^O}") | |
628 ("Ü" "\"U") | |
629 ("Ù" "{\\\\`U}") | |
630 ("Ú" "{\\\\'U}") | |
631 ("Û" "{\\\\^U}") | |
632 ("ñ" "{\\\\~n}") | |
633 ("Ñ" "{\\\\~N}") | |
634 ("ç" "{\\\\c c}") | |
635 ("Ç" "{\\\\c C}") | |
636 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
637 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
638 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
639 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
640 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
641 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
642 ("£" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
643 ("¶" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
644 ("§" "{\\\\S}") |
7260 | 645 ("¿" "{?`}") |
646 ("¡" "{!`}") | |
647 ) | |
648 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
649 | |
650 (defun iso-gtex2iso () | |
651 "Translate German TeX sequences to ISO 8859-1 characters." | |
652 (interactive) | |
653 (iso-translate-conventions iso-gtex2iso-trans-tab)) | |
654 | |
655 | |
656 (defun iso-iso2gtex () | |
657 "Translate ISO 8859-1 characters to German TeX sequences." | |
658 (interactive) | |
659 (iso-translate-conventions iso-iso2gtex-trans-tab)) | |
660 | |
661 | |
662 (defun iso-german-tex-p () | |
663 "Check if tex buffer is German LaTeX." | |
664 (save-excursion | |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
665 (save-restriction |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
666 (widen) |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
667 (goto-char (point-min)) |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
668 (re-search-forward "\\\\documentstyle\\[.*german.*\\]" nil t)))) |
7260 | 669 |
670 (defun iso-fix-iso2tex () | |
671 "Turn ISO 8859-1 (aka. ISO Latin-1) buffer into TeX sequences. | |
672 If German TeX is used, German TeX sequences are generated." | |
673 (if (or (equal major-mode 'latex-mode) | |
674 (equal major-mode 'LaTeX-mode)) ; AucTeX wants this | |
675 (if (iso-german-tex-p) | |
676 (iso-iso2gtex) | |
677 (iso-iso2tex))) | |
678 (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
|
679 (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
|
680 (equal major-mode 'plain-tex-mode)) |
7260 | 681 (iso-iso2tex))) |
682 | |
683 (defun iso-fix-tex2iso () | |
684 "Turn TeX sequences into ISO 8859-1 (aka. ISO Latin-1) characters. | |
685 This function recognices German TeX buffers." | |
686 (if (or (equal major-mode 'latex-mode) | |
687 (equal major-mode 'Latex-mode)) ; AucTeX wants this | |
688 (if (iso-german-tex-p) | |
689 (iso-gtex2iso) | |
690 (iso-tex2iso))) | |
691 (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
|
692 (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
|
693 (equal major-mode 'plain-tex-mode)) |
7260 | 694 (iso-tex2iso))) |
695 | |
696 (defun iso-cvt-ffh () | |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
697 "find-file-hook for iso-cvt.el." |
7260 | 698 (iso-fix-tex2iso) |
699 (set-buffer-modified-p nil)) | |
700 | |
701 (defun iso-cvt-wfh () | |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
702 "write file hook for iso-cvt.el." |
7260 | 703 (iso-fix-iso2tex)) |
704 | |
705 (defun iso-cvt-ash () | |
10434
5cb0747f521f
(iso-aggressive-german-trans-tab): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
10081
diff
changeset
|
706 "after save hook for iso-cvt.el." |
7260 | 707 (iso-fix-tex2iso) |
708 (set-buffer-modified-p nil)) | |
709 | |
710 (add-hook 'find-file-hooks 'iso-cvt-ffh) | |
711 (add-hook 'write-file-hooks 'iso-cvt-wfh) | |
712 (add-hook 'after-save-hook 'iso-cvt-ash) | |
713 | |
714 ;;; iso-cvt.el ends here |