1 ;;; booktabs.el -- AUCTeX style for booktabs.sty
3 ;; Copyright (C) 2003, 2004, 2013 Free Software Foundation, Inc.
5 ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
6 ;; Maintainer: auctex-devel@gnu.org
10 ;; This file is part of AUCTeX.
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)
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.
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
29 ;; This file adds support for `booktabs.sty'.
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 ((TeX-arg-opening-brace "\(")
38 (TeX-arg-closing-brace "\)"))
39 (TeX-parse-argument optional prompt)))
44 ;; Do not append an empty group to toprule, midrule, and bottomrule macros,
45 ;; otherwise one gets a wrong spacing in the table.
46 (setq TeX-insert-braces-alist (append TeX-insert-braces-alist
49 ("bottomrule" . nil))))
52 '("toprule" [ "Thickness" ])
53 '("midrule" [ "Thickness" ])
54 '("bottomrule" [ "Thickness" ])
55 ;; The `ignore' resets `last-optional-rejected' to nil so that the trim
56 ;; argument is prompted also when the thickness is skipped.
57 '("cmidrule" [ "Thickness" ] (ignore) [ LaTeX-booktabs-arg-paren "Trim" ]
59 '("addlinespace" [ "Height" ])
61 '("specialrule" "Thickness" "Space above" "Space below"))
64 (when (and (featurep 'font-latex)
65 (eq TeX-install-font-lock 'font-latex-setup))
66 (font-latex-add-keywords '(("toprule" "[")
72 ("specialrule" "{{{"))
76 (defvar LaTeX-booktabs-package-options nil
77 "Package options for the booktabs package.")
79 ;;; booktabs.el ends here