1 ;;; x-symbol-texi.el --- token language "TeXinfo command" for package x-symbol
3 ;; Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
5 ;; Author: Christoph Wedler <wedler@users.sourceforge.net>
6 ;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
8 ;; Keywords: WYSIWYG, TeXinfo, wp, internationalization
9 ;; X-URL: http://x-symbol.sourceforge.net/
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program; if not, write to the Free Software
23 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 ;; If you want to use package x-symbol, please visit the URL (use
28 ;; \\[x-symbol-package-web]) and read the info (use \\[x-symbol-package-info]).
30 ;; Token language tex is registered in x-symbol-hooks.
34 (provide 'x-symbol-texi)
37 ;;;===========================================================================
38 ;;; General language accesses, see `x-symbol-language-access-alist'
39 ;;;===========================================================================
41 (defcustom x-symbol-texi-auto-style '(t nil nil nil nil nil)
42 "Values for X-Symbol's buffer-local variables with language `texi'.
43 See language access `x-symbol-LANG-auto-style'."
46 :type 'x-symbol-auto-style)
48 (defcustom x-symbol-texi-modeline-name "texi"
49 "Modeline name of token language `texi'.
50 See language access `x-symbol-LANG-modeline-name'."
54 (defcustom x-symbol-texi-header-groups-alist
55 '(("Symbol" bigop operator line relation arrow triangle shape white dots
56 punctuation quote parenthesis symbol currency mathletter setsymbol)
57 ("Misc. Letter" greek greek1 letter slash cedilla ogonek)
58 ("Dotaccent, Ring" dotaccent ring)
59 ("Tilde, Breve" tilde breve)
60 ("Circumflex, Caron" circumflex caron)
61 ("Diaeresis, Umlaut" diaeresis hungarumlaut)
62 ("Acute, Grave" acute grave))
63 "Header/submenu specification of the specific menu for language `texi'.
64 See language access `x-symbol-LANG-header-groups-alist'."
66 :group 'x-symbol-input-init
67 :type 'x-symbol-headers)
69 (defcustom x-symbol-texi-electric-ignore nil
70 "Specification restricting input method ELECTRIC with language `texi'.
71 See language access `x-symbol-LANG-electric-ignore'."
73 :group 'x-symbol-input-control
74 :type 'x-symbol-function-or-regexp)
76 (defcustom x-symbol-texi-class-alist
77 '((aletter "acc.letter" (x-symbol-info-face))
78 (symbol "symbol" (x-symbol-info-face))
79 (bullet "bullet" (x-symbol-info-face))
80 (no-code "not as code" (x-symbol-emph-info-face))
81 (VALID "unknown TeXinfo command" (x-symbol-emph-info-face))
82 (INVALID "no TeXinfo command" (x-symbol-emph-info-face)))
83 "Token classes displayed by info in echo area, for language `texi'.
84 See language access `x-symbol-LANG-class-alist'."
86 :group 'x-symbol-info-strings
87 :type 'x-symbol-class-info)
89 (defcustom x-symbol-texi-class-face-alist nil
90 "Color scheme in language specific grid and info, for language `texi'.
91 See language access `x-symbol-LANG-class-face-alist'."
93 :group 'x-symbol-input-init
94 :group 'x-symbol-info-general
95 :type 'x-symbol-class-faces)
98 (defvar x-symbol-texi-token-grammar
99 '(x-symbol-make-grammar
102 "@\\(?:[A-Za-z]+{[A-Za-z]?}\\|[{}]\\|[~^\"'`][A-Za-z]\\|,{[A-Za-z]}\\)"
104 "Grammar of token language `texi'.
105 See language access `x-symbol-LANG-token-grammar'.")
107 (defvar x-symbol-texi-user-table nil
108 "User table defining TeXinfo commands, used in `x-symbol-texi-table'.")
110 (defvar x-symbol-texi-generated-data nil
111 "Generated data for token language `texi'.
112 See language access `x-symbol-LANG-generated-data'.")
115 ;;;===========================================================================
117 ;;;===========================================================================
119 (defvar x-symbol-texi-latin1-table
120 '(;;(nobreakspace () "\\nobreakspace")
121 (exclamdown (symbol) "@exclamdown{}")
122 ;;(cent () "\\textcent")
123 (sterling (symbol) "@pounds{}")
124 ;;(currency () "\\textcurrency")
125 ;;(yen () "\\textyen")
126 ;;(brokenbar () "\\textbrokenbar")
128 ;;(diaeresis () "@\"{}")
129 (copyright (symbol) "@copyright{}")
130 ;;(ordfeminine () "\\textordfeminine")
131 ;;(guillemotleft () "\\guillemotleft")
132 ;;(notsign () "\\lnot" "\\neg")
134 ;;(registered () "\\textregistered")
135 ;;(macron () "\\={}")
136 ;;(degree () "\\textdegree")
137 ;;(plusminus () "\\pm")
138 ;;(twosuperior () "\\mathtwosuperior")
139 ;;(threesuperior () "\\maththreesuperior")
141 ;;(mu1 () "\\mathmicro")
142 ;;(paragraph () "\\P")
143 ;;(periodcentered () "\\textperiodcentered")
144 ;;(cedilla () "@,\\ ")
145 ;;(onesuperior () "\\mathonesuperior")
146 ;;(masculine () "\\textordmasculine")
147 ;;(guillemotright () "\\guillemotright")
148 ;;(onequarter () "\\textonequarter")
149 ;;(onehalf () "\\textonehalf")
150 ;;(threequarters () "\\textthreequarters")
151 (questiondown (symbol) "@questiondown{}")
152 (Agrave (aletter) "@`A")
153 (Aacute (aletter) "@'A")
154 (Acircumflex (aletter) "@^A")
155 (Atilde (aletter) "@~A")
156 (Adiaeresis (aletter) "@\"A")
157 (Aring (aletter) "@AA{}")
158 (AE (aletter) "@AE{}")
159 (Ccedilla (aletter) "@,{C}")
160 (Egrave (aletter) "@`E")
161 (Eacute (aletter) "@'E")
162 (Ecircumflex (aletter) "@^E")
163 (Ediaeresis (aletter) "@\"E")
164 (Igrave (aletter) "@`I")
165 (Iacute (aletter) "@'I")
166 (Icircumflex (aletter) "@^I")
167 (Idiaeresis (aletter) "@\"I")
169 (Ntilde (aletter) "@~N")
170 (Ograve (aletter) "@`O")
171 (Oacute (aletter) "@'O")
172 (Ocircumflex (aletter) "@^O")
173 (Otilde (aletter) "@~O")
174 (Odiaeresis (aletter) "@\"O")
175 ;;(multiply () "\\times")
176 (Ooblique (aletter) "@O{}")
177 (Ugrave (aletter) "@`U")
178 (Uacute (aletter) "@'U")
179 (Ucircumflex (aletter) "@^U")
180 (Udiaeresis (aletter) "@\"U")
181 (Yacute (aletter) "@'Y")
183 (ssharp (aletter) "@ss{}")
184 (agrave (aletter) "@`a")
185 (aacute (aletter) "@'a")
186 (acircumflex (aletter) "@^a")
187 (atilde (aletter) "@~a")
188 (adiaeresis (aletter) "@\"a")
189 (aring (aletter) "@aa{}")
190 (ae (aletter) "@ae{}")
191 (ccedilla (aletter) "@,{c}")
192 (egrave (aletter) "@`e")
193 (eacute (aletter) "@'e")
194 (ecircumflex (aletter) "@^e")
195 (ediaeresis (aletter) "@\"e")
196 (igrave (aletter) "@`i")
197 (iacute (aletter) "@'i")
198 (icircumflex (aletter) "@^i")
199 (idiaeresis (aletter) "@\"i") ; TeX should used dotless-i
201 (ntilde (aletter) "@~n")
202 (ograve (aletter) "@`o")
203 (oacute (aletter) "@'o")
204 (ocircumflex (aletter) "@^o")
205 (otilde (aletter) "@~o")
206 (odiaeresis (aletter) "@\"o")
207 ;;(division () "\\div")
208 (oslash (aletter) "@o{}")
209 (ugrave (aletter) "@`u")
210 (uacute (aletter) "@'u")
211 (ucircumflex (aletter) "@^u")
212 (udiaeresis (aletter) "@\"u")
213 (yacute (aletter) "@'y")
215 (ydiaeresis (aletter) "@\"y"))
216 "Table defining TeXinfo commands, see `x-symbol-texi-table'.")
218 (defvar x-symbol-texi-latinN-table
219 '(;;(Aogonek () "\\k A")
221 (Lslash (aletter) "@L{}")
222 (Lcaron (aletter) "@v{L}") ; TeX should use T1 fontenc
223 (Sacute (aletter) "@'S")
224 (Scaron (aletter) "@v{S}")
225 (Scedilla (aletter) "@,{S}")
226 (Tcaron (aletter) "@v{T}")
227 (Zacute (aletter) "@'Z")
228 (Zcaron (aletter) "@v{Z}")
229 (Zdotaccent (aletter) "@dotaccent{Z}")
230 ;;(aogonek () "\\k a")
231 ;;(ogonek () "\\k\\ ")
232 (lslash (aletter) "@l{}")
233 (lcaron (aletter) "@v{l}") ; TeX should use T1 fontenc
234 (sacute (aletter) "@'s")
236 (scaron (aletter) "@v{s}")
237 (scedilla (aletter) "@,{s}")
238 (tcaron (aletter) "@v{t}") ; TeX should use T1 fontenc
239 (zacute (aletter) "@'z")
240 ;;(hungarumlaut () "@H{}")
241 (zcaron (aletter) "@v{z}")
242 (zdotaccent (aletter) "@dotaccent{z}")
243 (Racute (aletter) "@'R")
244 (Abreve (aletter) "@u{A}")
245 (Lacute (aletter) "@'L")
246 (Cacute (aletter) "@'C")
247 (Ccaron (aletter) "@v{C}")
248 ;;(Eogonek () "\\k E")
249 (Ecaron (aletter) "@v{E}")
250 (Dcaron (aletter) "@v{D}")
252 (Nacute (aletter) "@'N")
253 (Ncaron (aletter) "@v{N}")
254 (Ohungarumlaut (aletter) "@H{O}")
255 (Rcaron (aletter) "@v{R}")
256 (Uring (aletter) "@ringaccent{U}")
257 (Uhungarumlaut (aletter) "@H{U}")
258 (Tcedilla (aletter) "@,{T}")
259 (racute (aletter) "@'r")
260 (abreve (aletter) "@u{a}")
261 (lacute (aletter) "@'l")
262 (cacute (aletter) "@'c")
263 (ccaron (aletter) "@v{c}")
264 ;;(eogonek () "\\k e")
265 (ecaron (aletter) "@v{e}")
266 (dcaron (aletter) "@v{d}") ; TeX should use T1 fontenc
268 (nacute (aletter) "@'n")
269 (ncaron (aletter) "@v{n}")
270 (ohungarumlaut (aletter) "@H{o}")
271 (rcaron (aletter) "@v{r}")
272 (uring (aletter) "@ringaccent{u}")
273 (uhungarumlaut (aletter) "@H{u}")
274 (tcedilla (aletter) "@,{t}")
275 ;;(dotaccent () "@dotaccent{}")
276 ;;(Hbar () "\\textmalteseH")
277 (Hcircumflex (aletter) "@^H")
278 (Idotaccent (aletter) "@dotaccent{I}")
279 (Gbreve (aletter) "@u{G}")
280 (Jcircumflex (aletter) "@^J")
281 ;;(hbar () "\\textmalteseh")
282 (hcircumflex (aletter) "@^h")
283 (dotlessi (aletter) "@dotless{i}")
284 (gbreve (aletter) "@u{g}")
285 (jcircumflex (aletter) "@^j")
286 (Cdotaccent (aletter) "@dotaccent{C}")
287 (Ccircumflex (aletter) "@^C")
288 (Gdotaccent (aletter) "@dotaccent{G}")
289 (Gcircumflex (aletter) "@^G")
290 (Ubreve (aletter) "@u{U}")
291 (Scircumflex (aletter) "@^S")
292 (cdotaccent (aletter) "@dotaccent{c}")
293 (ccircumflex (aletter) "@^c")
294 (gdotaccent (aletter) "@dotaccent{g}")
295 (gcircumflex (aletter) "@^g")
296 (ubreve (aletter) "@u{u}")
297 (scircumflex (aletter) "@^s")
298 (OE (aletter) "@OE{}")
299 (oe (aletter) "@oe{}")
300 (Ydiaeresis (aletter) "@\"Y"))
301 "Table defining TeXinfo commands, see `x-symbol-texi-table'.")
303 (defvar x-symbol-texi-xsymbX-table
304 '((bullet (bullet) "@bullet{}")
305 (equivalence (symbol) "@equiv{}")
306 (ellipsis (symbol) "@dots{}")
307 (arrowdblright (symbol) "@result{}")
309 (dotlessj (aletter) "@dotless{j}")
311 (star (symbol) "@point{}")
312 (braceleft2 (symbol) "@{")
313 (braceright2 (symbol) "@}")
314 (mapsto (symbol) "@expansion{}")
315 (dashbar (symbol) "@print{}")
317 ;;(circumflex () "@^{}")
319 (endash (bullet no-code) "@minus{}")
320 ;;(emdash () "\\textemdash")
322 ;;(endellipsis () "enddots{}")
323 ;;(error () "error{}")
325 "Table defining TeXinfo commands, see `x-symbol-texi-table'.")
327 (defvar x-symbol-texi-table
328 (append x-symbol-texi-user-table
330 x-symbol-texi-latin1-table
331 x-symbol-texi-latinN-table
332 x-symbol-texi-xsymbX-table)
333 "Table defining `texi' tokens for the characters.
334 See language access `x-symbol-LANG-table'. Use
335 `x-symbol-texi-user-table' to define private TeXinfo commands or shadow
338 ;;; Local IspellPersDict: .ispell_xsymb
339 ;;; x-symbol-texi.el ends here