Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 8863:b5a4f7db03c7
(Fforward_comment): Do increment from, when reaching
single-char comment end going forward.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 17 Sep 1994 19:49:03 +0000 |
parents | 94145efe2ad8 |
children | 5e4ef35c904b |
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 (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. | |
117 This table uses an aggressive translation approach and may translate | |
118 erroneously translate too much.") | |
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}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
197 ("\305" "{\\\\o A}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
198 ("\345" "{\\\\o a}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
199 ("\251" "{\\\\copyright}") |
7260 | 200 ("¿" "{?`}") |
201 ("¡" "{!`}") | |
202 ) | |
203 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
204 | |
205 | |
206 | |
207 | |
208 (defun iso-iso2tex () | |
209 "Translate ISO 8859-1 characters to TeX sequences." | |
210 (interactive) | |
211 (iso-translate-conventions iso-iso2tex-trans-tab)) | |
212 | |
213 | |
214 (defvar iso-tex2iso-trans-tab | |
215 '( | |
216 ("{\\\\\"a}" "ä") | |
217 ("{\\\\`a}" "à") | |
218 ("{\\\\'a}" "á") | |
219 ("{\\\\~a}" "ã") | |
220 ("{\\\\^a}" "â") | |
221 ("{\\\\\"e}" "ë") | |
222 ("{\\\\`e}" "è") | |
223 ("{\\\\'e}" "é") | |
224 ("{\\\\^e}" "ê") | |
225 ("{\\\\\"\\\\i}" "ï") | |
226 ("{\\\\`\\\\i}" "ì") | |
227 ("{\\\\'\\\\i}" "í") | |
228 ("{\\\\^\\\\i}" "î") | |
229 ("{\\\\\"i}" "ï") | |
230 ("{\\\\`i}" "ì") | |
231 ("{\\\\'i}" "í") | |
232 ("{\\\\^i}" "î") | |
233 ("{\\\\\"o}" "ö") | |
234 ("{\\\\`o}" "ò") | |
235 ("{\\\\'o}" "ó") | |
236 ("{\\\\~o}" "õ") | |
237 ("{\\\\^o}" "ô") | |
238 ("{\\\\\"u}" "ü") | |
239 ("{\\\\`u}" "ù") | |
240 ("{\\\\'u}" "ú") | |
241 ("{\\\\^u}" "û") | |
242 ("{\\\\\"A}" "Ä") | |
243 ("{\\\\`A}" "À") | |
244 ("{\\\\'A}" "Á") | |
245 ("{\\\\~A}" "Ã") | |
246 ("{\\\\^A}" "Â") | |
247 ("{\\\\\"E}" "Ë") | |
248 ("{\\\\`E}" "È") | |
249 ("{\\\\'E}" "É") | |
250 ("{\\\\^E}" "Ê") | |
251 ("{\\\\\"I}" "Ï") | |
252 ("{\\\\`I}" "Ì") | |
253 ("{\\\\'I}" "Í") | |
254 ("{\\\\^I}" "Î") | |
255 ("{\\\\\"O}" "Ö") | |
256 ("{\\\\`O}" "Ò") | |
257 ("{\\\\'O}" "Ó") | |
258 ("{\\\\~O}" "Õ") | |
259 ("{\\\\^O}" "Ô") | |
260 ("{\\\\\"U}" "Ü") | |
261 ("{\\\\`U}" "Ù") | |
262 ("{\\\\'U}" "Ú") | |
263 ("{\\\\^U}" "Û") | |
264 ("{\\\\~n}" "ñ") | |
265 ("{\\\\~N}" "Ñ") | |
266 ("{\\\\c c}" "ç") | |
267 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
268 ("\\\\\"a" "ä") |
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 ("\\\\\"e" "ë") |
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 ("\\\\\"\\\\i" "ï") |
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 ("\\\\\"o" "ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
286 ("\\\\`o" "ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
287 ("\\\\'o" "ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
288 ("\\\\~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 ("\\\\\"u" "ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
291 ("\\\\`u" "ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
292 ("\\\\'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 ("\\\\\"A" "Ä") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
295 ("\\\\`A" "À") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
296 ("\\\\'A" "Á") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
297 ("\\\\~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 ("\\\\\"E" "Ë") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
300 ("\\\\`E" "È") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
301 ("\\\\'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 ("\\\\\"I" "Ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
304 ("\\\\`I" "Ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
305 ("\\\\'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 ("\\\\\"O" "Ö") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
308 ("\\\\`O" "Ò") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
309 ("\\\\'O" "Ó") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
310 ("\\\\~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 ("\\\\\"U" "Ü") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
313 ("\\\\`U" "Ù") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
314 ("\\\\'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 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
317 ("\\\\~N" "Ñ") |
7260 | 318 ("\\\\\"{a}" "ä") |
319 ("\\\\`{a}" "à") | |
320 ("\\\\'{a}" "á") | |
321 ("\\\\~{a}" "ã") | |
322 ("\\\\^{a}" "â") | |
323 ("\\\\\"{e}" "ë") | |
324 ("\\\\`{e}" "è") | |
325 ("\\\\'{e}" "é") | |
326 ("\\\\^{e}" "ê") | |
327 ("\\\\\"{\\\\i}" "ï") | |
328 ("\\\\`{\\\\i}" "ì") | |
329 ("\\\\'{\\\\i}" "í") | |
330 ("\\\\^{\\\\i}" "î") | |
331 ("\\\\\"{i}" "ï") | |
332 ("\\\\`{i}" "ì") | |
333 ("\\\\'{i}" "í") | |
334 ("\\\\^{i}" "î") | |
335 ("\\\\\"{o}" "ö") | |
336 ("\\\\`{o}" "ò") | |
337 ("\\\\'{o}" "ó") | |
338 ("\\\\~{o}" "õ") | |
339 ("\\\\^{o}" "ô") | |
340 ("\\\\\"{u}" "ü") | |
341 ("\\\\`{u}" "ù") | |
342 ("\\\\'{u}" "ú") | |
343 ("\\\\^{u}" "û") | |
344 ("\\\\\"{A}" "Ä") | |
345 ("\\\\`{A}" "À") | |
346 ("\\\\'{A}" "Á") | |
347 ("\\\\~{A}" "Ã") | |
348 ("\\\\^{A}" "Â") | |
349 ("\\\\\"{E}" "Ë") | |
350 ("\\\\`{E}" "È") | |
351 ("\\\\'{E}" "É") | |
352 ("\\\\^{E}" "Ê") | |
353 ("\\\\\"{I}" "Ï") | |
354 ("\\\\`{I}" "Ì") | |
355 ("\\\\'{I}" "Í") | |
356 ("\\\\^{I}" "Î") | |
357 ("\\\\\"{O}" "Ö") | |
358 ("\\\\`{O}" "Ò") | |
359 ("\\\\'{O}" "Ó") | |
360 ("\\\\~{O}" "Õ") | |
361 ("\\\\^{O}" "Ô") | |
362 ("\\\\\"{U}" "Ü") | |
363 ("\\\\`{U}" "Ù") | |
364 ("\\\\'{U}" "Ú") | |
365 ("\\\\^{U}" "Û") | |
366 ("\\\\~{n}" "ñ") | |
367 ("\\\\~{N}" "Ñ") | |
368 ("\\\\c{c}" "ç") | |
369 ("\\\\c{C}" "Ç") | |
370 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
371 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
372 ("{\\\\ae}" "\346") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
373 ("{\\\\o A}" "\305") |
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}" "\345") |
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 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
378 ("\\\\copyright{}" "\251") |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
379 ("{\\?`}" "¿") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
380 ("{!`}" "¡") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
381 ("\\?`" "¿") |
7260 | 382 ("!`" "¡") |
383 ) | |
384 "Translation table for translating TeX sequences to ISO 8859-1 characters. | |
385 This table is not exhaustive (and due to TeX's power can never be). It only | |
386 contains commonly used sequences.") | |
387 | |
388 (defun iso-tex2iso () | |
389 "Translate TeX sequences to ISO 8859-1 characters." | |
390 (interactive) | |
391 (iso-translate-conventions iso-tex2iso-trans-tab)) | |
392 | |
393 (defvar iso-gtex2iso-trans-tab | |
394 '( | |
395 ("{\\\\\"a}" "ä") | |
396 ("{\\\\`a}" "à") | |
397 ("{\\\\'a}" "á") | |
398 ("{\\\\~a}" "ã") | |
399 ("{\\\\^a}" "â") | |
400 ("{\\\\\"e}" "ë") | |
401 ("{\\\\`e}" "è") | |
402 ("{\\\\'e}" "é") | |
403 ("{\\\\^e}" "ê") | |
404 ("{\\\\\"\\\\i}" "ï") | |
405 ("{\\\\`\\\\i}" "ì") | |
406 ("{\\\\'\\\\i}" "í") | |
407 ("{\\\\^\\\\i}" "î") | |
408 ("{\\\\\"i}" "ï") | |
409 ("{\\\\`i}" "ì") | |
410 ("{\\\\'i}" "í") | |
411 ("{\\\\^i}" "î") | |
412 ("{\\\\\"o}" "ö") | |
413 ("{\\\\`o}" "ò") | |
414 ("{\\\\'o}" "ó") | |
415 ("{\\\\~o}" "õ") | |
416 ("{\\\\^o}" "ô") | |
417 ("{\\\\\"u}" "ü") | |
418 ("{\\\\`u}" "ù") | |
419 ("{\\\\'u}" "ú") | |
420 ("{\\\\^u}" "û") | |
421 ("{\\\\\"A}" "Ä") | |
422 ("{\\\\`A}" "À") | |
423 ("{\\\\'A}" "Á") | |
424 ("{\\\\~A}" "Ã") | |
425 ("{\\\\^A}" "Â") | |
426 ("{\\\\\"E}" "Ë") | |
427 ("{\\\\`E}" "È") | |
428 ("{\\\\'E}" "É") | |
429 ("{\\\\^E}" "Ê") | |
430 ("{\\\\\"I}" "Ï") | |
431 ("{\\\\`I}" "Ì") | |
432 ("{\\\\'I}" "Í") | |
433 ("{\\\\^I}" "Î") | |
434 ("{\\\\\"O}" "Ö") | |
435 ("{\\\\`O}" "Ò") | |
436 ("{\\\\'O}" "Ó") | |
437 ("{\\\\~O}" "Õ") | |
438 ("{\\\\^O}" "Ô") | |
439 ("{\\\\\"U}" "Ü") | |
440 ("{\\\\`U}" "Ù") | |
441 ("{\\\\'U}" "Ú") | |
442 ("{\\\\^U}" "Û") | |
443 ("{\\\\~n}" "ñ") | |
444 ("{\\\\~N}" "Ñ") | |
445 ("{\\\\c c}" "ç") | |
446 ("{\\\\c C}" "Ç") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
447 ("\\\\\"a" "ä") |
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 ("\\\\\"e" "ë") |
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 ("\\\\\"\\\\i" "ï") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
457 ("\\\\`\\\\i" "ì") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
458 ("\\\\'\\\\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 ("\\\\\"o" "ö") |
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 ("\\\\\"u" "ü") |
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 ("\\\\\"A" "Ä") |
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 ("\\\\\"E" "Ë") |
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 ("\\\\\"I" "Ï") |
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 ("\\\\\"O" "Ö") |
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 ("\\\\\"U" "Ü") |
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 ("\\\\~n" "ñ") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
496 ("\\\\~N" "Ñ") |
7260 | 497 ("\\\\\"{a}" "ä") |
498 ("\\\\`{a}" "à") | |
499 ("\\\\'{a}" "á") | |
500 ("\\\\~{a}" "ã") | |
501 ("\\\\^{a}" "â") | |
502 ("\\\\\"{e}" "ë") | |
503 ("\\\\`{e}" "è") | |
504 ("\\\\'{e}" "é") | |
505 ("\\\\^{e}" "ê") | |
506 ("\\\\\"{\\\\i}" "ï") | |
507 ("\\\\`{\\\\i}" "ì") | |
508 ("\\\\'{\\\\i}" "í") | |
509 ("\\\\^{\\\\i}" "î") | |
510 ("\\\\\"{i}" "ï") | |
511 ("\\\\`{i}" "ì") | |
512 ("\\\\'{i}" "í") | |
513 ("\\\\^{i}" "î") | |
514 ("\\\\\"{o}" "ö") | |
515 ("\\\\`{o}" "ò") | |
516 ("\\\\'{o}" "ó") | |
517 ("\\\\~{o}" "õ") | |
518 ("\\\\^{o}" "ô") | |
519 ("\\\\\"{u}" "ü") | |
520 ("\\\\`{u}" "ù") | |
521 ("\\\\'{u}" "ú") | |
522 ("\\\\^{u}" "û") | |
523 ("\\\\\"{A}" "Ä") | |
524 ("\\\\`{A}" "À") | |
525 ("\\\\'{A}" "Á") | |
526 ("\\\\~{A}" "Ã") | |
527 ("\\\\^{A}" "Â") | |
528 ("\\\\\"{E}" "Ë") | |
529 ("\\\\`{E}" "È") | |
530 ("\\\\'{E}" "É") | |
531 ("\\\\^{E}" "Ê") | |
532 ("\\\\\"{I}" "Ï") | |
533 ("\\\\`{I}" "Ì") | |
534 ("\\\\'{I}" "Í") | |
535 ("\\\\^{I}" "Î") | |
536 ("\\\\\"{O}" "Ö") | |
537 ("\\\\`{O}" "Ò") | |
538 ("\\\\'{O}" "Ó") | |
539 ("\\\\~{O}" "Õ") | |
540 ("\\\\^{O}" "Ô") | |
541 ("\\\\\"{U}" "Ü") | |
542 ("\\\\`{U}" "Ù") | |
543 ("\\\\'{U}" "Ú") | |
544 ("\\\\^{U}" "Û") | |
545 ("\\\\~{n}" "ñ") | |
546 ("\\\\~{N}" "Ñ") | |
547 ("\\\\c{c}" "ç") | |
548 ("\\\\c{C}" "Ç") | |
549 ("{\\\\ss}" "ß") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
550 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
551 ("{\\\\ae}" "\346") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
552 ("{\\\\o A}" "\305") |
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}" "\345") |
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 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
557 ("\\\\copyright{}" "\251") |
7260 | 558 ("?`" "¿") |
559 ("!`" "¡") | |
560 ("{?`}" "¿") | |
561 ("{!`}" "¡") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
562 ("\"a" "ä") |
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 ("\"o" "ö") |
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 ("\"u" "ü") |
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 ("\"s" "ß") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
569 ("\\\\3" "ß") |
7260 | 570 ) |
571 "Translation table for translating German TeX sequences to ISO 8859-1. | |
572 This table is not exhaustive (and due to TeX's power can never be). It only | |
573 contains commonly used sequences.") | |
574 | |
575 (defvar iso-iso2gtex-trans-tab | |
576 '( | |
577 ("ä" "\"a") | |
578 ("à" "{\\\\`a}") | |
579 ("á" "{\\\\'a}") | |
580 ("ã" "{\\\\~a}") | |
581 ("â" "{\\\\^a}") | |
582 ("ë" "{\\\\\"e}") | |
583 ("è" "{\\\\`e}") | |
584 ("é" "{\\\\'e}") | |
585 ("ê" "{\\\\^e}") | |
586 ("ï" "{\\\\\"\\\\i}") | |
587 ("ì" "{\\\\`\\\\i}") | |
588 ("í" "{\\\\'\\\\i}") | |
589 ("î" "{\\\\^\\\\i}") | |
590 ("ö" "\"o") | |
591 ("ò" "{\\\\`o}") | |
592 ("ó" "{\\\\'o}") | |
593 ("õ" "{\\\\~o}") | |
594 ("ô" "{\\\\^o}") | |
595 ("ü" "\"u") | |
596 ("ù" "{\\\\`u}") | |
597 ("ú" "{\\\\'u}") | |
598 ("û" "{\\\\^u}") | |
599 ("Ä" "\"A") | |
600 ("À" "{\\\\`A}") | |
601 ("Á" "{\\\\'A}") | |
602 ("Ã" "{\\\\~A}") | |
603 ("Â" "{\\\\^A}") | |
604 ("Ë" "{\\\\\"E}") | |
605 ("È" "{\\\\`E}") | |
606 ("É" "{\\\\'E}") | |
607 ("Ê" "{\\\\^E}") | |
608 ("Ï" "{\\\\\"I}") | |
609 ("Ì" "{\\\\`I}") | |
610 ("Í" "{\\\\'I}") | |
611 ("Î" "{\\\\^I}") | |
612 ("Ö" "\"O") | |
613 ("Ò" "{\\\\`O}") | |
614 ("Ó" "{\\\\'O}") | |
615 ("Õ" "{\\\\~O}") | |
616 ("Ô" "{\\\\^O}") | |
617 ("Ü" "\"U") | |
618 ("Ù" "{\\\\`U}") | |
619 ("Ú" "{\\\\'U}") | |
620 ("Û" "{\\\\^U}") | |
621 ("ñ" "{\\\\~n}") | |
622 ("Ñ" "{\\\\~N}") | |
623 ("ç" "{\\\\c c}") | |
624 ("Ç" "{\\\\c C}") | |
625 ("ß" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
626 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
627 ("\346" "{\\\\ae}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
628 ("\305" "{\\\\o A}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
629 ("\345" "{\\\\o a}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
630 ("\251" "{\\\\copyright}") |
7260 | 631 ("¿" "{?`}") |
632 ("¡" "{!`}") | |
633 ) | |
634 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
635 | |
636 (defun iso-gtex2iso () | |
637 "Translate German TeX sequences to ISO 8859-1 characters." | |
638 (interactive) | |
639 (iso-translate-conventions iso-gtex2iso-trans-tab)) | |
640 | |
641 | |
642 (defun iso-iso2gtex () | |
643 "Translate ISO 8859-1 characters to German TeX sequences." | |
644 (interactive) | |
645 (iso-translate-conventions iso-iso2gtex-trans-tab)) | |
646 | |
647 | |
648 (defun iso-german-tex-p () | |
649 "Check if tex buffer is German LaTeX." | |
650 (save-excursion | |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
651 (save-restriction |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
652 (widen) |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
653 (goto-char (point-min)) |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
654 (re-search-forward "\\\\documentstyle\\[.*german.*\\]" nil t)))) |
7260 | 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) | |
8433
b14b118e6724
(iso-fix-iso2tex, iso-fix-tex2iso): Check plain-text-mode.
Richard M. Stallman <rms@gnu.org>
parents:
7861
diff
changeset
|
665 (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
|
666 (equal major-mode 'plain-tex-mode)) |
7260 | 667 (iso-iso2tex))) |
668 | |
669 (defun iso-fix-tex2iso () | |
670 "Turn TeX sequences into ISO 8859-1 (aka. ISO Latin-1) characters. | |
671 This function recognices German TeX buffers." | |
672 (if (or (equal major-mode 'latex-mode) | |
673 (equal major-mode 'Latex-mode)) ; AucTeX wants this | |
674 (if (iso-german-tex-p) | |
675 (iso-gtex2iso) | |
676 (iso-tex2iso))) | |
677 (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
|
678 (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
|
679 (equal major-mode 'plain-tex-mode)) |
7260 | 680 (iso-tex2iso))) |
681 | |
682 (defun iso-cvt-ffh () | |
683 "find-file-hook for iso-cvt-cvt.el." | |
684 (iso-fix-tex2iso) | |
685 (set-buffer-modified-p nil)) | |
686 | |
687 (defun iso-cvt-wfh () | |
688 "write file hook for iso-cvt-cvt.el." | |
689 (iso-fix-iso2tex)) | |
690 | |
691 (defun iso-cvt-ash () | |
692 "after save hook for iso-cvt-cvt.el." | |
693 (iso-fix-tex2iso) | |
694 (set-buffer-modified-p nil)) | |
695 | |
696 (add-hook 'find-file-hooks 'iso-cvt-ffh) | |
697 (add-hook 'write-file-hooks 'iso-cvt-wfh) | |
698 (add-hook 'after-save-hook 'iso-cvt-ash) | |
699 | |
700 ;;; iso-cvt.el ends here |