EasyPG 1.07 Released
[packages] / xemacs-packages / auctex / style / tabulary.el
1 ;;; tabulary.el --- AUCTeX style for the tabulary package.
2
3 ;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
4
5 ;; Author: Mads Jensen <mje@inducks.org>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2013-07-14
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 the tabulary package.
30
31 ;;; Code:
32
33 (defvar LaTeX-tabulary-package-options
34   '("debugshow")
35   "Package options for the tabulary package.")
36
37 (TeX-add-style-hook
38  "tabulary"
39  (lambda ()
40    ;; Make tabulary the default tabular environment
41    (setq LaTeX-default-tabular-environment "tabulary")
42    ;; Use the enhanced tabular indentation.  Append to
43    ;; `LaTeX-indent-environment-list' in order not to override custom settings.
44    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
45                 '("tabulary" LaTeX-indent-tabular))
46
47    ;; Append tabulary to `LaTeX-item-list' with `LaTeX-item-tabular*'
48    (add-to-list 'LaTeX-item-list '("tabulary" . LaTeX-item-tabular*) t)
49
50    ;; New symbols
51    (TeX-add-symbols
52     "tymax" "tymin" "tyformat")
53    ;; New environments
54    (LaTeX-add-environments
55     ;; TODO: tabulary defines some new column types, but there is no completion
56     ;; so far in `LaTeX-env-tabular*'
57     '("tabulary" LaTeX-env-tabular*))
58
59    ;; `tabulary' requires the array package
60    (TeX-run-style-hooks "array")
61
62    ;; `tabulary.sty' adds some new column specification letters.
63    (set (make-local-variable 'LaTeX-array-column-letters)
64         (concat LaTeX-array-column-letters "L" "C" "R" "J")))
65  LaTeX-dialect)
66
67 ;;; tabulary.el ends here