]> code.delx.au - gnu-emacs-elpa/blob - packages/auctex/style/booktabs.el
Remove version numbers in packages/ directory
[gnu-emacs-elpa] / packages / auctex / style / booktabs.el
1 ;;; booktabs.el -- AUCTeX style for booktabs.sty
2
3 ;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4
5 ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2003-10-21
8 ;; Keywords: tex
9
10 ;; This file is part of AUCTeX.
11
12 ;; AUCTeX is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; any later version.
16
17 ;; AUCTeX is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
24 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 ;; 02110-1301, USA.
26
27 ;;; Commentary:
28
29 ;; This file adds support for `booktabs.sty'.
30
31 ;;; Code:
32
33 (defun LaTeX-booktabs-arg-paren (optional prompt)
34 "Prompt for a value and use parentheses when it is inserted.
35 If OPTIONAL is non-nil the parameter is labeled as optional.
36 PROMPT is the value of the prompt to be shown."
37 (let ((< "\(")
38 (> "\)"))
39 (TeX-parse-argument optional prompt)))
40
41 (TeX-add-style-hook
42 "booktabs"
43 (lambda ()
44
45 ;; New symbols
46 (TeX-add-symbols
47 '("toprule" [ "Thickness" ])
48 '("midrule" [ "Thickness" ])
49 '("bottomrule" [ "Thickness" ])
50 ;; FIXME: The qestion for the trim parameter will only be asked if
51 ;; a value for the thickness parameter was given. Is this a
52 ;; feature of `TeX-parse-arguments'?
53 '("cmidrule" [ "Thickness" ] [ LaTeX-booktabs-arg-paren "Trim" ]
54 "Column(s)")
55 '("addlinespace" [ "Height" ])
56 '("morecmidrules")
57 '("specialrule" "Thickness" "Space above" "Space below"))
58
59 ;; Fontification
60 (when (and (featurep 'font-latex)
61 (eq TeX-install-font-lock 'font-latex-setup))
62 (font-latex-add-keywords '(("toprule" "[")
63 ("midrule" "[")
64 ("bottomrule" "[")
65 ("cmidrule" "[({")
66 ("addlinespace" "[")
67 ("morecmidrules" "")
68 ("specialrule" "{{{"))
69 'function))))
70
71 (defvar LaTeX-booktabs-package-options nil
72 "Package options for the booktabs package.")
73
74 ;;; booktabs.el ends here