AUCTeX Sync -- New Style Files
[packages] / xemacs-packages / auctex / style / eso-pic.el
1 ;;; eso-pic.el --- AUCTeX style for `eso-pic.sty' (v2.0d)
2
3 ;; Copyright (C) 2014 Free Software Foundation, Inc.
4
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2014-10-29
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 `eso-pic.sty' (v2.0d) from 2013/10/06.
30 ;; `eso-pic.sty' is part of TeXLive.
31
32 ;;; Code:
33
34 (TeX-add-style-hook
35  "eso-pic"
36  (lambda ()
37
38    ;; Run style hook for eso-pic
39    (TeX-run-style-hooks "atbegshi")
40
41    ;; New symbols
42    (TeX-add-symbols
43
44     ;; Basic commands
45     '("AddToShipoutPictureBG"   t)
46     '("AddToShipoutPictureBG*"  t)
47     '("AddToShipoutPictureFG"   t)
48     '("AddToShipoutPictureFG*"  t)
49     '("ClearShipoutPictureBG"   0)
50     '("ClearShipoutPictureFG"   0)
51
52     ;; Helper macros
53     '("AtPageUpperLeft"         t)
54     '("AtPageLowerLeft"         t)
55     '("AtPageCenter"            t)
56     '("AtTextUpperLeft"         t)
57     '("AtTextLowerLeft"         t)
58     '("AtTextCenter"            t)
59     '("AtStockUpperLeft"        t)
60     '("AtStockLowerLeft"        t)
61     '("AtStockCenter"           t)
62
63     ;; Aux. commands
64     '("LenToUnit"               t)
65     '("gridSetup"
66       [ "Grid unit name" ]  "Grid unit"    "Label factor"
67       "Grid delta"          "Grid Delta"   "Gap"))
68
69    ;; Declare expert macro
70    (TeX-declare-expert-macros
71     "eso-pic"
72     "gridSetup" "LenToUnit"))
73  LaTeX-dialect)
74
75 (defvar LaTeX-eso-pic-package-options-list
76   '(("pscoord"      ("true" "false"))
77     ("texcoord"     ("true" "false"))
78     ("grid"         ("true" "false"))
79     ("gridunit"     ("mm" "in" "bp" "pt"))
80     ("gridcolor")
81     ("subgridcolor")
82     ("subgridstyle" ("solid" "dotted"))
83     ("dvips"        ("true" "false")))
84   "Package options for the eso-pic package.")
85
86 (defun LaTeX-eso-pic-package-options nil
87   "Prompt for package options for the eso-pic package."
88   (TeX-read-key-val t LaTeX-eso-pic-package-options-list))
89
90 ;;; eso-pic.el ends here