Mercurial > emacs
annotate lisp/international/iso-cvt.el @ 102567:711fac9bee34
macos.texi (Mac / GNUstep Basics): remove references to Prefs panel
and NS resources following recent changes.
author | David Reitter <david.reitter@gmail.com> |
---|---|
date | Sat, 14 Mar 2009 21:30:12 +0000 (2009-03-14) |
parents | a9dc0e7c3f2b |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34753
diff
changeset
|
1 ;;; iso-cvt.el --- translate ISO 8859-1 from/to various encodings -*- coding: iso-latin-1 -*- |
13337 | 2 ;; This file was formerly called gm-lingo.el. |
3 | |
74544 | 4 ;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, |
100908 | 5 ;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
7260 | 6 |
7 ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> | |
8 ;; Keywords: tex, iso, latin, i18n | |
9 | |
10 ;; This file is part of GNU Emacs. | |
11 | |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
7260 | 13 ;; it under the terms of the GNU General Public License as published by |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
15 ;; (at your option) any later version. |
7260 | 16 |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79709
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
7260 | 24 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
25 ;;; Commentary: |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
26 ;; This lisp code is a general framework for translating various |
18228 | 27 ;; representations of the same data. |
28 ;; among other things it can be used to translate TeX, HTML, and compressed | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
29 ;; files to ISO 8859-1. It can also be used to translate different charsets |
18228 | 30 ;; such as IBM PC, Macintosh or HP Roman8. |
31 ;; Note that many translations use the GNU recode tool to do the actual | |
32 ;; conversion. So you might want to install that tool to get the full | |
33 ;; benefit of iso-cvt.el | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
34 |
18228 | 35 ; TO DO: |
28393 | 36 ; Cover more cases for translation. (There is an infinite number of ways to |
18228 | 37 ; represent accented characters in TeX) |
7260 | 38 |
18228 | 39 ;; SEE ALSO: |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
40 ; If you are interested in questions related to using the ISO 8859-1 |
18228 | 41 ; characters set (configuring emacs, Unix, etc. to use ISO), then you |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
42 ; can get the ISO 8859-1 FAQ via anonymous ftp from |
28425
6cc408ca6aef
Fix comment. Don't bother to require format.
Dave Love <fx@gnu.org>
parents:
28393
diff
changeset
|
43 ; ftp.vlsivie.tuwien.ac.at in /pub/8bit/FAQ-ISO-8859-1 |
7260 | 44 |
45 ;;; Code: | |
46 | |
47 (defvar iso-spanish-trans-tab | |
48 '( | |
49 ("~n" "�") | |
50 ("\([a-zA-Z]\)#" "\\1�") | |
51 ("~N" "�") | |
52 ("\\([-a-zA-Z\"`]\\)\"u" "\\1�") | |
53 ("\\([-a-zA-Z\"`]\\)\"U" "\\1�") | |
54 ("\\([-a-zA-Z]\\)'o" "\\1�") | |
55 ("\\([-a-zA-Z]\\)'O" "\\�") | |
56 ("\\([-a-zA-Z]\\)'e" "\\1�") | |
57 ("\\([-a-zA-Z]\\)'E" "\\1�") | |
58 ("\\([-a-zA-Z]\\)'a" "\\1�") | |
59 ("\\([-a-zA-Z]\\)'A" "\\1A") | |
60 ("\\([-a-zA-Z]\\)'i" "\\1�") | |
61 ("\\([-a-zA-Z]\\)'I" "\\1�") | |
62 ) | |
63 "Spanish translation table.") | |
64 | |
18228 | 65 (defun iso-translate-conventions (from to trans-tab) |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
66 "Translate between FROM and TO using the translation table TRANS-TAB." |
7260 | 67 (save-excursion |
18228 | 68 (save-restriction |
69 (narrow-to-region from to) | |
70 (goto-char from) | |
71 (let ((work-tab trans-tab) | |
72 (buffer-read-only nil) | |
73 (case-fold-search nil)) | |
74 (while work-tab | |
75 (save-excursion | |
76 (let ((trans-this (car work-tab))) | |
77 (while (re-search-forward (car trans-this) nil t) | |
78 (replace-match (car (cdr trans-this)) t nil))) | |
79 (setq work-tab (cdr work-tab))))) | |
80 (point-max)))) | |
7260 | 81 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
82 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
83 (defun iso-spanish (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
84 "Translate net conventions for Spanish to ISO 8859-1. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
85 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
86 `iso-spanish-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
87 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
88 (interactive "*r") |
18228 | 89 (iso-translate-conventions from to iso-spanish-trans-tab)) |
7260 | 90 |
91 (defvar iso-aggressive-german-trans-tab | |
92 '( | |
93 ("\"a" "�") | |
94 ("\"A" "�") | |
95 ("\"o" "�") | |
96 ("\"O" "�") | |
97 ("\"u" "�") | |
98 ("\"U" "�") | |
99 ("\"s" "�") | |
100 ("\\\\3" "�") | |
101 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
102 "German translation table. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
103 This table uses an aggressive translation approach |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
104 and may erroneously translate too much.") |
7260 | 105 |
106 (defvar iso-conservative-german-trans-tab | |
107 '( | |
108 ("\\([-a-zA-Z\"`]\\)\"a" "\\1�") | |
109 ("\\([-a-zA-Z\"`]\\)\"A" "\\1�") | |
110 ("\\([-a-zA-Z\"`]\\)\"o" "\\1�") | |
111 ("\\([-a-zA-Z\"`]\\)\"O" "\\1�") | |
112 ("\\([-a-zA-Z\"`]\\)\"u" "\\1�") | |
113 ("\\([-a-zA-Z\"`]\\)\"U" "\\1�") | |
114 ("\\([-a-zA-Z\"`]\\)\"s" "\\1�") | |
115 ("\\([-a-zA-Z\"`]\\)\\\\3" "\\1�") | |
116 ) | |
117 "German translation table. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
118 This table uses a conservative translation approach |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
119 and may translate too little.") |
7260 | 120 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
121 (defvar iso-german-trans-tab iso-aggressive-german-trans-tab |
7260 | 122 "Currently active translation table for German.") |
123 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
124 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
125 (defun iso-german (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
126 "Translate net conventions for German to ISO 8859-1. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
127 Translate the region FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
128 `iso-german-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
129 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
130 (interactive "*r") |
18228 | 131 (iso-translate-conventions from to iso-german-trans-tab)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
132 |
7260 | 133 (defvar iso-iso2tex-trans-tab |
134 '( | |
135 ("�" "{\\\\\"a}") | |
136 ("�" "{\\\\`a}") | |
137 ("�" "{\\\\'a}") | |
138 ("�" "{\\\\~a}") | |
139 ("�" "{\\\\^a}") | |
140 ("�" "{\\\\\"e}") | |
141 ("�" "{\\\\`e}") | |
142 ("�" "{\\\\'e}") | |
143 ("�" "{\\\\^e}") | |
144 ("�" "{\\\\\"\\\\i}") | |
145 ("�" "{\\\\`\\\\i}") | |
146 ("�" "{\\\\'\\\\i}") | |
147 ("�" "{\\\\^\\\\i}") | |
148 ("�" "{\\\\\"o}") | |
149 ("�" "{\\\\`o}") | |
150 ("�" "{\\\\'o}") | |
151 ("�" "{\\\\~o}") | |
152 ("�" "{\\\\^o}") | |
153 ("�" "{\\\\\"u}") | |
154 ("�" "{\\\\`u}") | |
155 ("�" "{\\\\'u}") | |
156 ("�" "{\\\\^u}") | |
157 ("�" "{\\\\\"A}") | |
158 ("�" "{\\\\`A}") | |
159 ("�" "{\\\\'A}") | |
160 ("�" "{\\\\~A}") | |
161 ("�" "{\\\\^A}") | |
162 ("�" "{\\\\\"E}") | |
163 ("�" "{\\\\`E}") | |
164 ("�" "{\\\\'E}") | |
165 ("�" "{\\\\^E}") | |
166 ("�" "{\\\\\"I}") | |
167 ("�" "{\\\\`I}") | |
168 ("�" "{\\\\'I}") | |
169 ("�" "{\\\\^I}") | |
170 ("�" "{\\\\\"O}") | |
171 ("�" "{\\\\`O}") | |
172 ("�" "{\\\\'O}") | |
173 ("�" "{\\\\~O}") | |
174 ("�" "{\\\\^O}") | |
175 ("�" "{\\\\\"U}") | |
176 ("�" "{\\\\`U}") | |
177 ("�" "{\\\\'U}") | |
178 ("�" "{\\\\^U}") | |
179 ("�" "{\\\\~n}") | |
180 ("�" "{\\\\~N}") | |
181 ("�" "{\\\\c c}") | |
182 ("�" "{\\\\c C}") | |
183 ("�" "{\\\\ss}") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
184 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
185 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
186 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
187 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
188 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
189 ("�" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
190 ("�" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
191 ("�" "{\\\\S}") |
7260 | 192 ("�" "{?`}") |
193 ("�" "{!`}") | |
194 ) | |
195 "Translation table for translating ISO 8859-1 characters to TeX sequences.") | |
196 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
197 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
198 (defun iso-iso2tex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
199 "Translate ISO 8859-1 characters to TeX sequences. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
200 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
201 `iso-iso2tex-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
202 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
203 (interactive "*r") |
18228 | 204 (iso-translate-conventions from to iso-iso2tex-trans-tab)) |
7260 | 205 |
206 (defvar iso-tex2iso-trans-tab | |
207 '( | |
208 ("{\\\\\"a}" "�") | |
209 ("{\\\\`a}" "�") | |
210 ("{\\\\'a}" "�") | |
211 ("{\\\\~a}" "�") | |
212 ("{\\\\^a}" "�") | |
213 ("{\\\\\"e}" "�") | |
214 ("{\\\\`e}" "�") | |
215 ("{\\\\'e}" "�") | |
216 ("{\\\\^e}" "�") | |
217 ("{\\\\\"\\\\i}" "�") | |
218 ("{\\\\`\\\\i}" "�") | |
219 ("{\\\\'\\\\i}" "�") | |
220 ("{\\\\^\\\\i}" "�") | |
221 ("{\\\\\"i}" "�") | |
222 ("{\\\\`i}" "�") | |
223 ("{\\\\'i}" "�") | |
224 ("{\\\\^i}" "�") | |
225 ("{\\\\\"o}" "�") | |
226 ("{\\\\`o}" "�") | |
227 ("{\\\\'o}" "�") | |
228 ("{\\\\~o}" "�") | |
229 ("{\\\\^o}" "�") | |
230 ("{\\\\\"u}" "�") | |
231 ("{\\\\`u}" "�") | |
232 ("{\\\\'u}" "�") | |
233 ("{\\\\^u}" "�") | |
234 ("{\\\\\"A}" "�") | |
235 ("{\\\\`A}" "�") | |
236 ("{\\\\'A}" "�") | |
237 ("{\\\\~A}" "�") | |
238 ("{\\\\^A}" "�") | |
239 ("{\\\\\"E}" "�") | |
240 ("{\\\\`E}" "�") | |
241 ("{\\\\'E}" "�") | |
242 ("{\\\\^E}" "�") | |
243 ("{\\\\\"I}" "�") | |
244 ("{\\\\`I}" "�") | |
245 ("{\\\\'I}" "�") | |
246 ("{\\\\^I}" "�") | |
247 ("{\\\\\"O}" "�") | |
248 ("{\\\\`O}" "�") | |
249 ("{\\\\'O}" "�") | |
250 ("{\\\\~O}" "�") | |
251 ("{\\\\^O}" "�") | |
252 ("{\\\\\"U}" "�") | |
253 ("{\\\\`U}" "�") | |
254 ("{\\\\'U}" "�") | |
255 ("{\\\\^U}" "�") | |
256 ("{\\\\~n}" "�") | |
257 ("{\\\\~N}" "�") | |
258 ("{\\\\c c}" "�") | |
259 ("{\\\\c C}" "�") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
260 ("\\\\\"a" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
261 ("\\\\`a" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
262 ("\\\\'a" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
263 ("\\\\~a" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
264 ("\\\\^a" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
265 ("\\\\\"e" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
266 ("\\\\`e" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
267 ("\\\\'e" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
268 ("\\\\^e" "�") |
58278
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
269 ;; Discard spaces and/or one EOF after macro \i. |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
270 ;; Converting it back will use braces. |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
271 ("\\\\\"\\\\i *\n\n" "�\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
272 ("\\\\\"\\\\i *\n?" "�") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
273 ("\\\\`\\\\i *\n\n" "�\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
274 ("\\\\`\\\\i *\n?" "�") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
275 ("\\\\'\\\\i *\n\n" "�\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
276 ("\\\\'\\\\i *\n?" "�") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
277 ("\\\\^\\\\i *\n\n" "�\n\n") |
31a2a9c6a64d
(iso-tex2iso-trans-tab): Discard spaces after \i according to TeX rules.
Richard M. Stallman <rms@gnu.org>
parents:
58156
diff
changeset
|
278 ("\\\\^\\\\i *\n?" "�") |
7861
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 ("\\\\\"o" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
284 ("\\\\`o" "�") |
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 ("\\\\\"u" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
289 ("\\\\`u" "�") |
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 ("\\\\\"A" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
293 ("\\\\`A" "�") |
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 ("\\\\\"E" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
298 ("\\\\`E" "�") |
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 ("\\\\\"I" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
302 ("\\\\`I" "�") |
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 ("\\\\\"O" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
306 ("\\\\`O" "�") |
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 ("\\\\\"U" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
311 ("\\\\`U" "�") |
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 ("\\\\~n" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
315 ("\\\\~N" "�") |
7260 | 316 ("\\\\\"{a}" "�") |
317 ("\\\\`{a}" "�") | |
318 ("\\\\'{a}" "�") | |
319 ("\\\\~{a}" "�") | |
320 ("\\\\^{a}" "�") | |
321 ("\\\\\"{e}" "�") | |
322 ("\\\\`{e}" "�") | |
323 ("\\\\'{e}" "�") | |
324 ("\\\\^{e}" "�") | |
325 ("\\\\\"{\\\\i}" "�") | |
326 ("\\\\`{\\\\i}" "�") | |
327 ("\\\\'{\\\\i}" "�") | |
328 ("\\\\^{\\\\i}" "�") | |
329 ("\\\\\"{i}" "�") | |
330 ("\\\\`{i}" "�") | |
331 ("\\\\'{i}" "�") | |
332 ("\\\\^{i}" "�") | |
333 ("\\\\\"{o}" "�") | |
334 ("\\\\`{o}" "�") | |
335 ("\\\\'{o}" "�") | |
336 ("\\\\~{o}" "�") | |
337 ("\\\\^{o}" "�") | |
338 ("\\\\\"{u}" "�") | |
339 ("\\\\`{u}" "�") | |
340 ("\\\\'{u}" "�") | |
341 ("\\\\^{u}" "�") | |
342 ("\\\\\"{A}" "�") | |
343 ("\\\\`{A}" "�") | |
344 ("\\\\'{A}" "�") | |
345 ("\\\\~{A}" "�") | |
346 ("\\\\^{A}" "�") | |
347 ("\\\\\"{E}" "�") | |
348 ("\\\\`{E}" "�") | |
349 ("\\\\'{E}" "�") | |
350 ("\\\\^{E}" "�") | |
351 ("\\\\\"{I}" "�") | |
352 ("\\\\`{I}" "�") | |
353 ("\\\\'{I}" "�") | |
354 ("\\\\^{I}" "�") | |
355 ("\\\\\"{O}" "�") | |
356 ("\\\\`{O}" "�") | |
357 ("\\\\'{O}" "�") | |
358 ("\\\\~{O}" "�") | |
359 ("\\\\^{O}" "�") | |
360 ("\\\\\"{U}" "�") | |
361 ("\\\\`{U}" "�") | |
362 ("\\\\'{U}" "�") | |
363 ("\\\\^{U}" "�") | |
364 ("\\\\~{n}" "�") | |
365 ("\\\\~{N}" "�") | |
366 ("\\\\c{c}" "�") | |
367 ("\\\\c{C}" "�") | |
368 ("{\\\\ss}" "�") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
369 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
370 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
371 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
372 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
373 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
374 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
375 ("{\\\\pounds}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
376 ("{\\\\P}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
377 ("{\\\\S}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
378 ("\\\\pounds{}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
379 ("\\\\P{}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
380 ("\\\\S{}" "�" ) |
8538
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
381 ("{\\?`}" "�") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
382 ("{!`}" "�") |
94145efe2ad8
(iso-tex2iso-trans-tab): Put the sequences with braces
Richard M. Stallman <rms@gnu.org>
parents:
8433
diff
changeset
|
383 ("\\?`" "�") |
7260 | 384 ("!`" "�") |
385 ) | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
386 "Translation table for translating TeX sequences to ISO 8859-1 characters. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
387 This table is not exhaustive (and due to TeX's power can never be). |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
388 It only contains commonly used sequences.") |
7260 | 389 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
390 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
391 (defun iso-tex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
392 "Translate TeX sequences to ISO 8859-1 characters. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
393 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
394 `iso-tex2iso-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
395 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
396 (interactive "*r") |
18228 | 397 (iso-translate-conventions from to iso-tex2iso-trans-tab)) |
7260 | 398 |
399 (defvar iso-gtex2iso-trans-tab | |
400 '( | |
401 ("{\\\\\"a}" "�") | |
402 ("{\\\\`a}" "�") | |
403 ("{\\\\'a}" "�") | |
404 ("{\\\\~a}" "�") | |
405 ("{\\\\^a}" "�") | |
406 ("{\\\\\"e}" "�") | |
407 ("{\\\\`e}" "�") | |
408 ("{\\\\'e}" "�") | |
409 ("{\\\\^e}" "�") | |
410 ("{\\\\\"\\\\i}" "�") | |
411 ("{\\\\`\\\\i}" "�") | |
412 ("{\\\\'\\\\i}" "�") | |
413 ("{\\\\^\\\\i}" "�") | |
414 ("{\\\\\"i}" "�") | |
415 ("{\\\\`i}" "�") | |
416 ("{\\\\'i}" "�") | |
417 ("{\\\\^i}" "�") | |
418 ("{\\\\\"o}" "�") | |
419 ("{\\\\`o}" "�") | |
420 ("{\\\\'o}" "�") | |
421 ("{\\\\~o}" "�") | |
422 ("{\\\\^o}" "�") | |
423 ("{\\\\\"u}" "�") | |
424 ("{\\\\`u}" "�") | |
425 ("{\\\\'u}" "�") | |
426 ("{\\\\^u}" "�") | |
427 ("{\\\\\"A}" "�") | |
428 ("{\\\\`A}" "�") | |
429 ("{\\\\'A}" "�") | |
430 ("{\\\\~A}" "�") | |
431 ("{\\\\^A}" "�") | |
432 ("{\\\\\"E}" "�") | |
433 ("{\\\\`E}" "�") | |
434 ("{\\\\'E}" "�") | |
435 ("{\\\\^E}" "�") | |
436 ("{\\\\\"I}" "�") | |
437 ("{\\\\`I}" "�") | |
438 ("{\\\\'I}" "�") | |
439 ("{\\\\^I}" "�") | |
440 ("{\\\\\"O}" "�") | |
441 ("{\\\\`O}" "�") | |
442 ("{\\\\'O}" "�") | |
443 ("{\\\\~O}" "�") | |
444 ("{\\\\^O}" "�") | |
445 ("{\\\\\"U}" "�") | |
446 ("{\\\\`U}" "�") | |
447 ("{\\\\'U}" "�") | |
448 ("{\\\\^U}" "�") | |
449 ("{\\\\~n}" "�") | |
450 ("{\\\\~N}" "�") | |
451 ("{\\\\c c}" "�") | |
452 ("{\\\\c C}" "�") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
453 ("\\\\\"a" "�") |
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 ("\\\\\"e" "�") |
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 ("\\\\\"\\\\i" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
463 ("\\\\`\\\\i" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
464 ("\\\\'\\\\i" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
465 ("\\\\^\\\\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 ("\\\\\"o" "�") |
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 ("\\\\\"u" "�") |
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 ("\\\\\"A" "�") |
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 ("\\\\\"E" "�") |
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 ("\\\\\"I" "�") |
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 ("\\\\\"O" "�") |
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 ("\\\\\"U" "�") |
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 ("\\\\~n" "�") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
502 ("\\\\~N" "�") |
7260 | 503 ("\\\\\"{a}" "�") |
504 ("\\\\`{a}" "�") | |
505 ("\\\\'{a}" "�") | |
506 ("\\\\~{a}" "�") | |
507 ("\\\\^{a}" "�") | |
508 ("\\\\\"{e}" "�") | |
509 ("\\\\`{e}" "�") | |
510 ("\\\\'{e}" "�") | |
511 ("\\\\^{e}" "�") | |
512 ("\\\\\"{\\\\i}" "�") | |
513 ("\\\\`{\\\\i}" "�") | |
514 ("\\\\'{\\\\i}" "�") | |
515 ("\\\\^{\\\\i}" "�") | |
516 ("\\\\\"{i}" "�") | |
517 ("\\\\`{i}" "�") | |
518 ("\\\\'{i}" "�") | |
519 ("\\\\^{i}" "�") | |
520 ("\\\\\"{o}" "�") | |
521 ("\\\\`{o}" "�") | |
522 ("\\\\'{o}" "�") | |
523 ("\\\\~{o}" "�") | |
524 ("\\\\^{o}" "�") | |
525 ("\\\\\"{u}" "�") | |
526 ("\\\\`{u}" "�") | |
527 ("\\\\'{u}" "�") | |
528 ("\\\\^{u}" "�") | |
529 ("\\\\\"{A}" "�") | |
530 ("\\\\`{A}" "�") | |
531 ("\\\\'{A}" "�") | |
532 ("\\\\~{A}" "�") | |
533 ("\\\\^{A}" "�") | |
534 ("\\\\\"{E}" "�") | |
535 ("\\\\`{E}" "�") | |
536 ("\\\\'{E}" "�") | |
537 ("\\\\^{E}" "�") | |
538 ("\\\\\"{I}" "�") | |
539 ("\\\\`{I}" "�") | |
540 ("\\\\'{I}" "�") | |
541 ("\\\\^{I}" "�") | |
542 ("\\\\\"{O}" "�") | |
543 ("\\\\`{O}" "�") | |
544 ("\\\\'{O}" "�") | |
545 ("\\\\~{O}" "�") | |
546 ("\\\\^{O}" "�") | |
547 ("\\\\\"{U}" "�") | |
548 ("\\\\`{U}" "�") | |
549 ("\\\\'{U}" "�") | |
550 ("\\\\^{U}" "�") | |
551 ("\\\\~{n}" "�") | |
552 ("\\\\~{N}" "�") | |
553 ("\\\\c{c}" "�") | |
554 ("\\\\c{C}" "�") | |
555 ("{\\\\ss}" "�") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
556 ("{\\\\AE}" "\306") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
557 ("{\\\\ae}" "\346") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
558 ("{\\\\AA}" "\305") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
559 ("{\\\\aa}" "\345") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
560 ("{\\\\copyright}" "\251") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
561 ("\\\\copyright{}" "\251") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
562 ("{\\\\pounds}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
563 ("{\\\\P}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
564 ("{\\\\S}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
565 ("\\\\pounds{}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
566 ("\\\\P{}" "�" ) |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
567 ("\\\\S{}" "�" ) |
7260 | 568 ("?`" "�") |
569 ("!`" "�") | |
570 ("{?`}" "�") | |
571 ("{!`}" "�") | |
7425
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
572 ("\"a" "�") |
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 ("\"o" "�") |
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 ("\"u" "�") |
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 ("\"s" "�") |
eb4b69bf2d4e
(iso-gtex2iso-trans-tab): Redorder this list.
Richard M. Stallman <rms@gnu.org>
parents:
7260
diff
changeset
|
579 ("\\\\3" "�") |
7260 | 580 ) |
581 "Translation table for translating German TeX sequences to ISO 8859-1. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
582 This table is not exhaustive (and due to TeX's power can never be). |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
583 It only contains commonly used sequences.") |
7260 | 584 |
585 (defvar iso-iso2gtex-trans-tab | |
586 '( | |
587 ("�" "\"a") | |
588 ("�" "{\\\\`a}") | |
589 ("�" "{\\\\'a}") | |
590 ("�" "{\\\\~a}") | |
591 ("�" "{\\\\^a}") | |
592 ("�" "{\\\\\"e}") | |
593 ("�" "{\\\\`e}") | |
594 ("�" "{\\\\'e}") | |
595 ("�" "{\\\\^e}") | |
596 ("�" "{\\\\\"\\\\i}") | |
597 ("�" "{\\\\`\\\\i}") | |
598 ("�" "{\\\\'\\\\i}") | |
599 ("�" "{\\\\^\\\\i}") | |
600 ("�" "\"o") | |
601 ("�" "{\\\\`o}") | |
602 ("�" "{\\\\'o}") | |
603 ("�" "{\\\\~o}") | |
604 ("�" "{\\\\^o}") | |
605 ("�" "\"u") | |
606 ("�" "{\\\\`u}") | |
607 ("�" "{\\\\'u}") | |
608 ("�" "{\\\\^u}") | |
609 ("�" "\"A") | |
610 ("�" "{\\\\`A}") | |
611 ("�" "{\\\\'A}") | |
612 ("�" "{\\\\~A}") | |
613 ("�" "{\\\\^A}") | |
614 ("�" "{\\\\\"E}") | |
615 ("�" "{\\\\`E}") | |
616 ("�" "{\\\\'E}") | |
617 ("�" "{\\\\^E}") | |
618 ("�" "{\\\\\"I}") | |
619 ("�" "{\\\\`I}") | |
620 ("�" "{\\\\'I}") | |
621 ("�" "{\\\\^I}") | |
622 ("�" "\"O") | |
623 ("�" "{\\\\`O}") | |
624 ("�" "{\\\\'O}") | |
625 ("�" "{\\\\~O}") | |
626 ("�" "{\\\\^O}") | |
627 ("�" "\"U") | |
628 ("�" "{\\\\`U}") | |
629 ("�" "{\\\\'U}") | |
630 ("�" "{\\\\^U}") | |
631 ("�" "{\\\\~n}") | |
632 ("�" "{\\\\~N}") | |
633 ("�" "{\\\\c c}") | |
634 ("�" "{\\\\c C}") | |
635 ("�" "\"s") | |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
636 ("\306" "{\\\\AE}") |
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
637 ("\346" "{\\\\ae}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
638 ("\305" "{\\\\AA}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
639 ("\345" "{\\\\aa}") |
7861
8996abee8718
(iso-iso2tex-trans-tab): Change a few characters.
Richard M. Stallman <rms@gnu.org>
parents:
7850
diff
changeset
|
640 ("\251" "{\\\\copyright}") |
10081
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
641 ("�" "{\\\\pounds}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
642 ("�" "{\\\\P}") |
5e4ef35c904b
Handle pilcrow, paragraph and pound signs.
Richard M. Stallman <rms@gnu.org>
parents:
8538
diff
changeset
|
643 ("�" "{\\\\S}") |
7260 | 644 ("�" "{?`}") |
645 ("�" "{!`}") | |
646 ) | |
647 "Translation table for translating ISO 8859-1 characters to German TeX.") | |
648 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
649 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
650 (defun iso-gtex2iso (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
651 "Translate German TeX sequences to ISO 8859-1 characters. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
652 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
653 `iso-gtex2iso-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
654 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
655 (interactive "*r") |
18228 | 656 (iso-translate-conventions from to iso-gtex2iso-trans-tab)) |
7260 | 657 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
658 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
659 (defun iso-iso2gtex (from to &optional buffer) |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
660 "Translate ISO 8859-1 characters to German TeX sequences. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
661 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
662 `iso-iso2gtex-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
663 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
664 (interactive "*r") |
18228 | 665 (iso-translate-conventions from to iso-iso2gtex-trans-tab)) |
666 | |
667 (defvar iso-iso2duden-trans-tab | |
668 '(("�" "ae") | |
669 ("�" "Ae") | |
670 ("�" "oe") | |
671 ("�" "Oe") | |
672 ("�" "ue") | |
673 ("�" "Ue") | |
79357
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
674 ("�" "ss")) |
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
675 "Translation table for translating ISO 8859-1 characters to Duden sequences.") |
18228 | 676 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
677 ;;;###autoload |
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
678 (defun iso-iso2duden (from to &optional buffer) |
79357
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
679 "Translate ISO 8859-1 characters to Duden sequences. |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
680 Translate the region between FROM and TO using the table |
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
681 `iso-iso2duden-trans-tab'. |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
682 Optional arg BUFFER is ignored (for use in `format-alist')." |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
683 (interactive "*r") |
18228 | 684 (iso-translate-conventions from to iso-iso2duden-trans-tab)) |
7260 | 685 |
28393 | 686 (defvar iso-iso2sgml-trans-tab |
687 '(("�" "À") | |
688 ("�" "Á") | |
689 ("�" "Â") | |
690 ("�" "Ã") | |
691 ("�" "Ä") | |
692 ("�" "Å") | |
693 ("�" "Æ") | |
694 ("�" "Ç") | |
695 ("�" "È") | |
696 ("�" "É") | |
697 ("�" "Ê") | |
698 ("�" "Ë") | |
699 ("�" "Ì") | |
700 ("�" "Í") | |
701 ("�" "Î") | |
702 ("�" "Ï") | |
703 ("�" "Ð") | |
704 ("�" "Ñ") | |
705 ("�" "Ò") | |
706 ("�" "Ó") | |
707 ("�" "Ô") | |
708 ("�" "Õ") | |
709 ("�" "Ö") | |
710 ("�" "Ø") | |
711 ("�" "Ù") | |
712 ("�" "Ú") | |
713 ("�" "Û") | |
714 ("�" "Ü") | |
715 ("�" "Ý") | |
716 ("�" "Þ") | |
717 ("�" "ß") | |
718 ("�" "à") | |
719 ("�" "á") | |
720 ("�" "â") | |
721 ("�" "ã") | |
722 ("�" "ä") | |
723 ("�" "å") | |
724 ("�" "æ") | |
725 ("�" "ç") | |
726 ("�" "è") | |
727 ("�" "é") | |
728 ("�" "ê") | |
729 ("�" "ë") | |
730 ("�" "ì") | |
731 ("�" "í") | |
732 ("�" "î") | |
733 ("�" "ï") | |
734 ("�" "ð") | |
735 ("�" "ñ") | |
736 ("�" "ò") | |
737 ("�" "ó") | |
738 ("�" "ô") | |
739 ("�" "õ") | |
740 ("�" "ö") | |
741 ("�" "ø") | |
742 ("�" "ù") | |
743 ("�" "ú") | |
744 ("�" "û") | |
745 ("�" "ü") | |
746 ("�" "ý") | |
747 ("�" "þ") | |
748 ("�" "ÿ"))) | |
749 | |
750 (defvar iso-sgml2iso-trans-tab | |
751 '(("À" "�") | |
752 ("Á" "�") | |
753 ("Â" "�") | |
754 ("Ã" "�") | |
755 ("Ä" "�") | |
756 ("Å" "�") | |
757 ("Æ" "�") | |
758 ("Ç" "�") | |
759 ("È" "�") | |
760 ("É" "�") | |
761 ("Ê" "�") | |
762 ("Ë" "�") | |
763 ("Ì" "�") | |
764 ("Í" "�") | |
765 ("Î" "�") | |
766 ("Ï" "�") | |
767 ("Ð" "�") | |
768 ("Ñ" "�") | |
769 ("Ò" "�") | |
770 ("Ó" "�") | |
771 ("Ô" "�") | |
772 ("Õ" "�") | |
773 ("Ö" "�") | |
774 ("Ø" "�") | |
775 ("Ù" "�") | |
776 ("Ú" "�") | |
777 ("Û" "�") | |
778 ("Ü" "�") | |
779 ("Ý" "�") | |
780 ("Þ" "�") | |
781 ("ß" "�") | |
782 ("à" "�") | |
783 ("á" "�") | |
784 ("â" "�") | |
785 ("ã" "�") | |
786 ("ä" "�") | |
787 ("å" "�") | |
788 ("æ" "�") | |
789 ("ç" "�") | |
790 ("è" "�") | |
791 ("é" "�") | |
792 ("ê" "�") | |
793 ("ë" "�") | |
794 ("ì" "�") | |
795 ("í" "�") | |
796 ("î" "�") | |
797 ("ï" "�") | |
798 ("ð" "�") | |
799 ("ñ" "�") | |
63102
608496528c29
(iso-sgml2iso-trans-tab): Add NBSP.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
62274
diff
changeset
|
800 (" " "�") |
28393 | 801 ("ò" "�") |
802 ("ó" "�") | |
803 ("ô" "�") | |
804 ("õ" "�") | |
805 ("ö" "�") | |
806 ("ø" "�") | |
807 ("ù" "�") | |
808 ("ú" "�") | |
809 ("û" "�") | |
810 ("ü" "�") | |
811 ("ý" "�") | |
812 ("þ" "�") | |
813 ("ÿ" "�"))) | |
814 | |
815 ;;;###autoload | |
816 (defun iso-iso2sgml (from to &optional buffer) | |
817 "Translate ISO 8859-1 characters in the region to SGML entities. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
818 Use entities from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
819 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 820 (interactive "*r") |
821 (iso-translate-conventions from to iso-iso2sgml-trans-tab)) | |
822 | |
823 ;;;###autoload | |
824 (defun iso-sgml2iso (from to &optional buffer) | |
825 "Translate SGML entities in the region to ISO 8859-1 characters. | |
79378
117a9d753a44
(iso-translate-conventions): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
79357
diff
changeset
|
826 Use entities from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". |
34753
879195ddd0d6
Docstrings fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28425
diff
changeset
|
827 Optional arg BUFFER is ignored (for use in `format-alist')." |
28393 | 828 (interactive "*r") |
829 (iso-translate-conventions from to iso-sgml2iso-trans-tab)) | |
830 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
831 ;;;###autoload |
77673
3424ba548b6f
(iso-cvt-read-only): Ignore arguments.
Richard M. Stallman <rms@gnu.org>
parents:
75347
diff
changeset
|
832 (defun iso-cvt-read-only (&rest ignore) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
833 "Warn that format is read-only." |
18228 | 834 (interactive) |
835 (error "This format is read-only; specify another format for writing")) | |
836 | |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
837 ;;;###autoload |
77673
3424ba548b6f
(iso-cvt-read-only): Ignore arguments.
Richard M. Stallman <rms@gnu.org>
parents:
75347
diff
changeset
|
838 (defun iso-cvt-write-only (&rest ignore) |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
839 "Warn that format is write-only." |
18228 | 840 (interactive) |
841 (error "This format is write-only")) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
842 |
22911
d70738580fb4
(iso-spanish, iso-german, iso-iso2tex,
Dave Love <fx@gnu.org>
parents:
20987
diff
changeset
|
843 ;;;###autoload |
18228 | 844 (defun iso-cvt-define-menu () |
58007
a8e3cd5a8156
(iso-cvt-define-menu): menu-bar-files-menu renamed to menu-bar-file-menu.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
845 "Add submenus to the File menu, to convert to and from various formats." |
18228 | 846 (interactive) |
847 | |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
848 (let ((load-as-menu-map (make-sparse-keymap "Load As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
849 (insert-as-menu-map (make-sparse-keymap "Insert As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
850 (write-as-menu-map (make-sparse-keymap "Write As...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
851 (translate-to-menu-map (make-sparse-keymap "Translate to...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
852 (translate-from-menu-map (make-sparse-keymap "Translate from...")) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
853 (menu menu-bar-file-menu)) |
79357
07da999919b9
*** empty log message ***
Juanma Barranquero <lekktu@gmail.com>
parents:
78274
diff
changeset
|
854 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
855 (define-key menu [load-as-separator] '("--")) |
18228 | 856 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
857 (define-key menu [load-as] '("Load As..." . iso-cvt-load-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
858 (fset 'iso-cvt-load-as load-as-menu-map) |
7260 | 859 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
860 ;;(define-key menu [insert-as] '("Insert As..." . iso-cvt-insert-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
861 (fset 'iso-cvt-insert-as insert-as-menu-map) |
18228 | 862 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
863 (define-key menu [write-as] '("Write As..." . iso-cvt-write-as)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
864 (fset 'iso-cvt-write-as write-as-menu-map) |
18228 | 865 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
866 (define-key menu [translate-separator] '("--")) |
18228 | 867 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
868 (define-key menu [translate-to] '("Translate to..." . iso-cvt-translate-to)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
869 (fset 'iso-cvt-translate-to translate-to-menu-map) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
870 |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
871 (define-key menu [translate-from] '("Translate from..." . iso-cvt-translate-from)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
872 (fset 'iso-cvt-translate-from translate-from-menu-map) |
7260 | 873 |
58156
f5edf9775fb5
(iso-cvt-define-menu): Fix typo.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58111
diff
changeset
|
874 (dolist (file-type (reverse format-alist)) |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
875 (let ((name (car file-type)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
876 (str-name (cadr file-type))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
877 (if (stringp str-name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
878 (progn |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
879 (define-key load-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
880 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
881 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
882 (interactive ,(format "FFind file (as %s): " name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
883 (format-find-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
884 (define-key insert-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
885 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
886 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
887 (interactive (format "FInsert file (as %s): " ,name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
888 (format-insert-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
889 (define-key write-as-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
890 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
891 `(lambda (file) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
892 (interactive (format "FWrite file (as %s): " ,name)) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
893 (format-write-file file ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
894 (define-key translate-to-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
895 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
896 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
897 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
898 (format-encode-buffer ',name)))) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
899 (define-key translate-from-menu-map (vector name) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
900 (cons str-name |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
901 `(lambda () |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
902 (interactive) |
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
903 (format-decode-buffer ',name)))))))))) |
28393 | 904 |
905 (provide 'iso-cvt) | |
7260 | 906 |
58111
df6e58bf1b9e
(iso-cvt-define-menu): Clean up namespace.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
58007
diff
changeset
|
907 ;; arch-tag: 64ae843f-ed0e-43e1-ba50-ffd581b90840 |
7260 | 908 ;;; iso-cvt.el ends here |