1 ;;; x-symbol-bib.el --- token language "BibTeX macro" for package x-symbol
3 ;; Copyright (C) 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, LaTeX, HTML, wp, math, 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]).
34 (provide 'x-symbol-bib)
35 (require 'x-symbol-tex)
38 ;;;===========================================================================
39 ;;; General language accesses, see `x-symbol-language-access-alist'
40 ;;;===========================================================================
42 (defcustom x-symbol-bib-auto-style '(t nil nil nil nil nil)
43 "Values for X-Symbol's buffer-local variables with language `bib'.
44 See language access `x-symbol-LANG-auto-style'."
47 :type 'x-symbol-auto-style)
49 (defcustom x-symbol-bib-modeline-name "bib"
50 "Modeline name of token language `bib'.
51 See language access `x-symbol-LANG-modeline-name'."
55 (defcustom x-symbol-bib-header-groups-alist x-symbol-tex-header-groups-alist
56 "Header/submenu specification of the specific menu for language `bib'.
57 See language access `x-symbol-LANG-header-groups-alist'."
59 :group 'x-symbol-input-init
60 :type 'x-symbol-headers)
62 (defcustom x-symbol-bib-electric-ignore x-symbol-tex-electric-ignore
63 "Specification restricting input method ELECTRIC with language `bib'.
64 See language access `x-symbol-LANG-electric-ignore'."
66 :group 'x-symbol-input-control
67 :type 'x-symbol-function-or-regexp)
69 (defcustom x-symbol-bib-class-alist x-symbol-tex-class-alist
70 "Token classes displayed by info in echo area, for language `bib'.
71 See language access `x-symbol-LANG-class-alist'."
73 :group 'x-symbol-info-strings
74 :type 'x-symbol-class-info)
76 (defcustom x-symbol-bib-class-face-alist x-symbol-tex-class-face-alist
77 "Color scheme in language specific grid and info, for language `bib'.
78 See language access `x-symbol-LANG-class-face-alist'."
80 :group 'x-symbol-input-init
81 :group 'x-symbol-info-general
82 :type 'x-symbol-class-faces)
85 ;;;===========================================================================
87 ;;;===========================================================================
89 (defvar x-symbol-bib-token-grammar
90 '(x-symbol-make-grammar
91 :encode-spec (?\\ (math . "[a-z@-Z]"))
92 :decode-regexp "\\\\\\(?:[@A-Za-z]+\\|[-{}#_&]\\)\\|{\\\\\\(?:[ckvuHr]\\(?: [A-Za-z]\\|{}\\|\\\\ \\)\\|[@A-Za-z]+\\|[.~^\"'`=]\\(?:[A-Za-z]\\|{}\\|\\\\[ij]\\)\\)}"
94 :input-spec (?\\ (math . "[a-z@-Z]"))
95 :token-list x-symbol-bib-default-token-list)
96 "Grammar of token language `bib'.
97 See language access `x-symbol-LANG-token-grammar'.")
99 (defvar x-symbol-bib-required-fonts x-symbol-tex-required-fonts
100 "Features providing required fonts for language `bib'.
101 See language access `x-symbol-LANG-required-fonts'.")
103 (defvar x-symbol-bib-user-table nil
104 "User table defining TeX macros, used in `x-symbol-bib-table'.")
106 (defvar x-symbol-bib-table
107 (append x-symbol-bib-user-table x-symbol-tex-table)
108 "Table defining `bib' tokens for the characters.
109 See language access `x-symbol-LANG-table'. Default value uses all
110 definitions in `x-symbol-tex-table'. Use `x-symbol-bib-user-table' to
111 define private TeX macros or shadow existing ones. ")
113 (defvar x-symbol-bib-generated-data nil
114 "Generated data for token language `bib'.
115 See language access `x-symbol-LANG-generated-data'.")
117 (defun x-symbol-bib-default-token-list (tokens)
119 (list (list (concat "{" tokens "}")))
121 (cons x (if (string-match "\\\\[A-Za-z]+\\'" x) 'math)))
124 ;;; Local IspellPersDict: .ispell_xsymb
125 ;;; x-symbol-bib.el ends here