Initial Commit
[packages] / xemacs-packages / auctex / style / lettrine.el
1 ;;; lettrine.el --- AUCTeX style for `lettrine.sty'
2
3 ;; Copyright (C) 2011 Free Software Foundation, Inc.
4
5 ;; Author: Mads Jensen <mje@inducks.org>
6 ;; Keywords: tex
7
8 ;; This file is part of AUCTeX.
9
10 ;; AUCTeX is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 3, or (at your option)
13 ;; any later version.
14
15 ;; AUCTeX is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with AUCTeX; see the file COPYING.  If not, write to the Free
22 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 ;; 02110-1301, USA.
24
25 ;;; Commentary:
26
27 ;; This file adds support for `lettrine.sty'.
28
29 ;;; Code:
30
31 (defvar LaTeX-lettrine-key-val-options
32   '(("lines")
33     ("lhang")
34     ("loversize")
35     ("lraise")
36     ("findent")
37     ("nindent")
38     ("slope")
39     ("ante")
40     ("image" ("true")))
41   "Key=value options for \\lettrine")
42
43 (TeX-add-style-hook
44  "lettrine"
45  (lambda ()
46    (TeX-add-symbols
47     '("lettrine" [ TeX-arg-key-val LaTeX-lettrine-key-val-options ]
48       "Letter" "Text")
49     '("LettrineImageFalse" 0)
50     ;; all of the below can be configured with either \setlength or
51     ;; \renewcommand
52     '("LettrineFont" 0)
53     '("LettrineFontHook" 0)
54     '("LettrineTextFont" 0)
55     '("LettrineWidth" 0)
56     '("DefaultLhang" 0)
57     '("DefaultLoversize" 0)
58     '("DefaultLraise" 0)
59     '("DefaultFindent" 0)
60     '("DefaultNindent" 0)
61     '("DefaultSlope" 0)
62     ;; above settings can also be input a file, and pointed to with
63     ;; \renewcommand
64     '("DefaultOptionsFile" 0))
65
66    ;; Fontification
67    (when (and (fboundp 'font-latex-add-keywords)
68               (eq TeX-install-font-lock 'font-latex-setup))
69      (font-latex-add-keywords '(("lettrine" "[{{")) 'textual)))
70  LaTeX-dialect)
71
72 (defvar LaTeX-lettrine-package-options nil
73   "Package options for the lettrine package.")
74
75 ;;; lettrine.el ends here