auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 69b02a0cadaab0c658c26


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 69b02a0cadaab0c658c26049ace19d6818e16959
Date: Mon, 09 Mar 2015 07:47:39 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  69b02a0cadaab0c658c26049ace19d6818e16959 (commit)
       via  4034de28e2ec88854604cc7f1951fe4e39c2aac0 (commit)
      from  a375093713f57826e2bc2ca723094f873800e069 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 69b02a0cadaab0c658c26049ace19d6818e16959
Author: Arash Esbati <address@hidden>
Date:   Sun Mar 8 18:19:12 2015 +0100

    New style for geometry.sty.
    
    * Makefile.in (STYLESRC): Add new style.
    
    * style/geometry.el: New file.
    
    Signed-off-by: Tassilo Horn <address@hidden>

diff --git a/ChangeLog b/ChangeLog
index 482a4fe..1cebd1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
        * Makefile.in (STYLESRC): Add new style.
 
+       * style/geometry.el: New file.
+
+2015-03-08  Arash Esbati  <address@hidden>
+
+       * Makefile.in (STYLESRC): Add new style.
+
        * style/caption.el: New file.
 
 2015-03-08  Arash Esbati  <address@hidden>
diff --git a/Makefile.in b/Makefile.in
index 2195bf8..b9f5c08 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -145,7 +145,8 @@ STYLESRC = style/prosper.el \
           style/newtxtext.el style/newtxttt.el  style/minted.el \
           style/wrapfig.el   style/relsize.el   style/currvita.el \
           style/tcolorbox.el style/color.el     style/expl3.el \
-          style/bidibeamer.el style/enumitem.el style/caption.el
+          style/bidibeamer.el style/enumitem.el style/caption.el \
+          style/geometry.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/geometry.el b/style/geometry.el
new file mode 100644
index 0000000..d263183
--- /dev/null
+++ b/style/geometry.el
@@ -0,0 +1,150 @@
+;;; geometry.el --- AUCTeX style for `geometry.sty' (v5.6)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-02-21
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `geometry.sty' (v5.6) from 2010/09/12.
+;; `geometry.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-geometry-always-key-val-options
+  '(("layout") ("layoutwidth") ("layoutheight") ("layoutsize")
+    ("layouthoffset") ("layoutvoffset") ("layoutoffset") ("hscale")
+    ("vscale") ("scale") ("width") ("totalwidth") ("height") ("totalheight")
+    ("total") ("textwidth") ("textheight") ("text") ("body") ("lines")
+    ("includehead") ("includefoot") ("includeheadfoot") ("includemp")
+    ("includeall") ("ignorehead") ("ignorefoot") ("ignoreheadfoot")
+    ("ignoremp") ("ignoreall") ("heightrounded") ("hdivide") ("vdivide")
+    ("divide") ("left") ("lmargin") ("inner") ("right") ("rmargin")
+    ("outer") ("top") ("tmargin") ("bottom") ("bmargin") ("hmargin")
+    ("vmargin") ("margin") ("hmarginratio") ("vmarginratio") ("marginratio")
+    ("ratio") ("hcentering") ("vcentering") ("centering") ("twoside")
+    ("asymmetric") ("bindingoffset") ("hdivide") ("vdivide") ("divide")
+    ("headheight") ("head") ("headsep") ("footskip") ("foot") ("nohead")
+    ("nofoot") ("noheadfoot") ("footnotesep") ("marginparwidth") ("marginpar")
+    ("marginparsep") ("nomarginpar") ("columnsep") ("hoffset") ("voffset")
+    ("offset") ("twocolumn") ("onecolumn") ("twoside") ("textwidth")
+    ("textheight") ("reversemp") ("reversemarginpar"))
+  "Key=value options always available for geometry macros.")
+
+(defvar LaTeX-geometry-preamble-key-val-options
+  '(("paper" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper"
+             "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
+             "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
+             "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
+             "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
+             "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
+             "ansiepaper" "ansiapaper" "ansibpaper" "ansicpaper"
+             "ansidpaper" "ansiepaper"))
+    ("papername" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper"
+                 "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
+                 "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
+                 "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
+                 "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
+                 "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
+                 "ansiepaper" "ansiapaper" "ansibpaper" "ansicpaper"
+                 "ansidpaper" "ansiepaper"))
+    ("a0paper") ("a1paper") ("a2paper") ("a3paper") ("a4paper") ("a5paper")
+    ("a6paper") ("b0paper") ("b1paper") ("b2paper") ("b3paper") ("b4paper")
+    ("b5paper") ("b6paper") ("c0paper") ("c1paper") ("c2paper") ("c3paper")
+    ("c4paper") ("c5paper") ("c6paper") ("b0j") ("b1j") ("b2j") ("b3j")
+    ("b4j") ("b5j") ("b6j") ("ansiapaper") ("ansibpaper") ("ansicpaper")
+    ("ansidpaper") ("ansiepaper") ("ansiapaper") ("ansibpaper") ("ansicpaper")
+    ("ansidpaper") ("ansiepaper") ("screen") ("paperwidth") ("paperheight")
+    ("papersize") ("landscape") ("portrait")
+    ("driver" ("dvips" "dvipdfm" "pdftex" "vtex" "xetex" "auto" "none"))
+    ("dvips") ("dvipdfm") ("pdftex") ("xetex") ("vtex") ("verbose")
+    ("reset") ("mag") ("truedimen") ("pass") ("showframe") ("showcrop"))
+  "Key=value options allowed only in the preamble for geometry macros.")
+
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+;; Setup for \savegeometry:
+(TeX-auto-add-type "geometry-savegeometry" "LaTeX" "geometry-savegeometries")
+
+(defvar LaTeX-geometry-savegeometry-regexp
+  '("\\\\savegeometry{\\([^}]+\\)}"
+    1 LaTeX-auto-geometry-savegeometry)
+  "Matches the argument of `\\savegeometry' from `geometry'
+package.")
+
+(defun LaTeX-geometry-auto-prepare ()
+  "Clear `LaTeX-auto-geometry-savegeometry' before parsing."
+  (setq        LaTeX-auto-geometry-savegeometry nil))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-geometry-auto-prepare t)
+
+(TeX-add-style-hook
+ "geometry"
+ (lambda ()
+
+   ;; Add geometry to the parser.
+   (TeX-auto-add-regexp LaTeX-geometry-savegeometry-regexp)
+
+   ;; geometry commands:
+   (TeX-add-symbols
+    '("geometry"
+      (TeX-arg-eval TeX-read-key-val nil
+                   (append LaTeX-geometry-preamble-key-val-options
+                           LaTeX-geometry-always-key-val-options)))
+    '("newgeometry"
+      (TeX-arg-key-val LaTeX-geometry-always-key-val-options))
+
+    '("restoregeometry" 0)
+
+    '("savegeometry"
+      (TeX-arg-eval
+       (lambda ()
+        (let ((name (TeX-read-string "Name: ")))
+          (LaTeX-add-geometry-savegeometries name)
+          (format "%s" name)))))
+
+    '("loadgeometry"
+      (TeX-arg-eval
+       (lambda ()
+        (completing-read "Name: "
+                         (LaTeX-geometry-savegeometry-list))))))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("geometry"      "{")
+                               ("newgeometry"   "{")
+                               ("savegeometry"  "{")
+                               ("loadgeometry"  "{"))
+                             'function)))
+ LaTeX-dialect)
+
+(defun LaTeX-geometry-package-options ()
+  "Prompt for package options for the geometry package."
+  (TeX-read-key-val t
+                   (append LaTeX-geometry-preamble-key-val-options
+                           LaTeX-geometry-always-key-val-options)))
+
+;;; geometry.el ends here

commit 4034de28e2ec88854604cc7f1951fe4e39c2aac0
Author: Arash Esbati <address@hidden>
Date:   Sun Mar 8 18:15:25 2015 +0100

    New style for caption.sty.
    
    * Makefile.in (STYLESRC): Add new style.
    
    * style/caption.el: New file.

diff --git a/ChangeLog b/ChangeLog
index 7925bfd..482a4fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
        * Makefile.in (STYLESRC): Add new style.
 
+       * style/caption.el: New file.
+
+2015-03-08  Arash Esbati  <address@hidden>
+
+       * Makefile.in (STYLESRC): Add new style.
+
        * style/enumitem.el: New file.
 
 2015-03-08  Tassilo Horn  <address@hidden>
diff --git a/Makefile.in b/Makefile.in
index 6873e01..2195bf8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -145,7 +145,7 @@ STYLESRC = style/prosper.el \
           style/newtxtext.el style/newtxttt.el  style/minted.el \
           style/wrapfig.el   style/relsize.el   style/currvita.el \
           style/tcolorbox.el style/color.el     style/expl3.el \
-          style/bidibeamer.el style/enumitem.el
+          style/bidibeamer.el style/enumitem.el style/caption.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/caption.el b/style/caption.el
new file mode 100644
index 0000000..f2ea856
--- /dev/null
+++ b/style/caption.el
@@ -0,0 +1,308 @@
+;;; caption.el --- AUCTeX style for `caption.sty' (v3.3-89)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-02-21
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `caption.sty' (v3.3-89) from 2013/05/02.
+;; `caption.sty' is part of TeXLive.
+
+;; If things do not work or when in doubt, press `C-c C-n'.  Comments
+;; for improvement are welcome.
+
+;;; Code:
+
+;; Needed for compiling `pushnew':
+(eval-when-compile (require 'cl))
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+(defvar LaTeX-caption-key-val-options
+  '(("aboveskip")
+    ("belowskip")
+    ("font"   ("scriptsize" "footnotesize" "small" "normalsize" "large"
+              "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+              "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+              "stretch" "normalcolor" "color" "normal"))
+    ("font+"  ("scriptsize" "footnotesize" "small" "normalsize" "large"
+              "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+              "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+              "stretch" "normalcolor" "color" "normal"))
+    ("format" ("plain" "hang"))
+    ("hangindent")
+    ("hypcap")
+    ("hypcapspace")
+    ("indention")
+    ("justification" ("justified" "centering" "centerlast" "centerfirst"
+                     "raggedright" "RaggedRight" "raggedleft"))
+    ("labelfont"     ("scriptsize" "footnotesize" "small" "normalsize" "large"
+                     "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                     "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+                     "stretch" "normalcolor" "color" "normal"))
+    ("labelfont+"    ("scriptsize" "footnotesize" "small" "normalsize" "large"
+                     "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                     "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+                     "stretch" "normalcolor" "color" "normal"))
+    ("labelformat"   ("default" "empty" "simple" "brace" "parens"))
+    ("labelsep"      ("none" "colon" "period" "space" "quad" "newline" 
"endash"))
+    ("list"          ("false" "no" "off" "0" "true" "yes" "on" "1"))
+    ("listformat"    ("empty" "simple" "paren" "subsimple" "subparens"))
+    ("margin"        ("type*" "width"))
+    ("margin*")
+    ("maxmargin")
+    ("minmargin")
+    ("name")
+    ("oneside")
+    ("parindent")
+    ("parskip")
+    ("position"        ("top" "above" "bottom" "below" "auto"))
+    ("singlelinecheck" ("false" "no" "off" "0" "true" "yes" "on" "1"))
+    ("skip")
+    ("strut"      ("false" "no" "off" "0" "true" "yes" "on" "1"))
+    ("style"      ("base" "default"))
+    ("textfont"   ("scriptsize" "footnotesize" "small" "normalsize" "large"
+                  "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                  "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+                  "stretch" "normalcolor" "color" "normal"))
+    ("textfont+"  ("scriptsize" "footnotesize" "small" "normalsize" "large"
+                  "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
+                  "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
+                  "stretch" "normalcolor" "color" "normal"))
+    ("textformat" ("empty" "simple" "period"))
+    ("twoside")
+    ("type"       ("figure" "table" "ContinuedFloat"))
+    ("type*"      ("figure" "table" "ContinuedFloat"))
+    ("width"))
+  "Key=value options for caption macros.")
+
+(defvar LaTeX-caption-key-val-options-local nil
+  "Buffer-local key=value options for caption macros.")
+(make-variable-buffer-local 'LaTeX-caption-key-val-options-local)
+
+(defvar LaTeX-caption-supported-float-types
+  '("figure" "table" "ContinuedFloat"  ; Standard caption.sty
+    "sub" "subtable" "subfigure"        ; subcaption.sty
+    "ruled" "boxed"                    ; float.sty
+    "floatingfigure" "floatingtable"   ; floatflt.sty
+    "lstlisting"                       ; listings.sty
+    "longtable"                                ; longtable.sty
+    "figwindow" "tabwindow"            ; picinpar.sty
+    "parpic"                           ; picins.sty
+    "SCfigure" "SCtable"               ; sidecap.sty
+    "supertabular" "xtabular"          ; supertabular.sty & xtab.sty
+    "threeparttable" "measuredfigure"   ; threeparttable.sty
+    "wrapfigure" "wraptable")          ; wrapfigure
+  "List of float types provided by other LaTeX packages and
+supported by `caption.sty'.")
+
+;; Setup for various \DeclareCaption's:
+(TeX-auto-add-type "caption-DeclareCaption" "LaTeX")
+
+(defvar LaTeX-caption-DeclareCaption-regexp
+  `(,(concat "\\\\DeclareCaption\\(Font\\|Format\\|Justification"
+            "\\|LabelFormat\\|LabelSeparator\\|ListFormat"
+            "\\|Option\\|Style\\|TextFormat\\)"
+            "\\*?"
+            "[ \t\n\r%]*"
+            "{\\([^}]+\\)}"
+            "[ \t\n\r%]*"
+            "{\\([^}]+\\)}")
+    (0 1 2) LaTeX-auto-caption-DeclareCaption)
+  "Matches the arguments of different `\\DeclareCaption*' from
+`caption.sty'.")
+
+(defun LaTeX-caption-auto-prepare ()
+  "Clear `LaTeX-auto-caption-DeclareCaption' before parsing."
+  (setq        LaTeX-auto-caption-DeclareCaption nil))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-caption-auto-prepare t)
+
+(defun LaTeX-caption-update-key-val-options ()
+  "Update the buffer-local key-val options before offering them
+in `caption'-completions."
+  (dolist (keyvals (LaTeX-caption-DeclareCaption-list))
+    (let* ((key (cond ((string-equal (nth 1 keyvals) "LabelSeparator")
+                      (downcase (substring (nth 1 keyvals) 0 8)))
+                     (t (downcase (nth 1 keyvals)))))
+          (val (nth 2 keyvals))
+          ;; (key-match (car (assoc key LaTeX-caption-key-val-options-local)))
+          (val-match (cdr (assoc key LaTeX-caption-key-val-options-local)))
+          (temp  (copy-alist LaTeX-caption-key-val-options-local))
+          (opts (assq-delete-all (car (assoc key temp)) temp)))
+      ;; For `\DeclareCaptionOption', only add the value
+      ;; (remember:      key=^^^^^^, val="defined key")
+      (if (string-equal key "option")
+         (pushnew (list val) opts :test #'equal)
+       ;; For anything but `\DeclareCaptionOption', do the standard procedure
+       (if val-match
+           (pushnew (list key (delete-dups (apply 'append (list val) 
val-match)))
+                    opts :test #'equal)
+         (pushnew (list key (list val)) opts :test #'equal)))
+      (setq LaTeX-caption-key-val-options-local (copy-alist opts)))))
+
+(defun LaTeX-arg-caption-command (&optional optional prompt)
+  "Insert caption-commands from `caption.sty'. If OPTIONAL is non-nil,
+indicate `(Optional)' while reading key=val.  PROMPT replaces the
+standard one."
+  (LaTeX-caption-update-key-val-options)
+  (let ((opts (TeX-read-key-val optional
+                               LaTeX-caption-key-val-options-local
+                               prompt)))
+    (format "%s" opts)))
+
+;; In `LaTeX-caption-DeclareCaption-regexp', we match (0 1 2).  When
+;; adding a new `Name', we need something unique for `0'-match until
+;; the next `C-c C-n'.  We use a random number for this purpose which
+;; will then disappear.
+(defun LaTeX-arg-caption-DeclareCaption (format)
+  "Insert various `\\DeclareCaptionFORMAT' commands.  FORMAT is
+the suffix of the command."
+  (let ((name (TeX-read-string "Name: ")))
+    (LaTeX-add-caption-DeclareCaptions
+     `(,(number-to-string (random)) ,format ,name))
+    (format "%s" name)))
+
+(TeX-add-style-hook
+ "caption"
+ (lambda ()
+
+   ;; Add caption to the parser.
+   (TeX-auto-add-regexp LaTeX-caption-DeclareCaption-regexp)
+
+   ;; Activate the buffer-local version of key-vals.
+   (setq LaTeX-caption-key-val-options-local
+        (copy-alist LaTeX-caption-key-val-options))
+
+   ;; Caption commands:
+   (TeX-add-symbols
+    '("caption*" t)
+
+    '("captionlistentry"
+      [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
+                   LaTeX-caption-supported-float-types]
+      t)
+
+    '("captionof"
+      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
+                   LaTeX-caption-supported-float-types)
+      ["List entry"] t)
+
+    '("captionof*"
+      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
+                   LaTeX-caption-supported-float-types)
+      ["List entry"] t)
+
+    '("captionsetup"
+      [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
+                   LaTeX-caption-supported-float-types]
+      (TeX-arg-eval LaTeX-arg-caption-command))
+
+    '("captionsetup*"
+      [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
+                   LaTeX-caption-supported-float-types]
+      (TeX-arg-eval LaTeX-arg-caption-command))
+
+    '("clearcaptionsetup"
+      [TeX-arg-eval LaTeX-arg-caption-command t "Single key"]
+      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
+                   LaTeX-caption-supported-float-types))
+
+    '("clearcaptionsetup*"
+      [TeX-arg-eval LaTeX-arg-caption-command t "Single key"]
+      (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
+                   LaTeX-caption-supported-float-types))
+
+    '("ContinuedFloat" 0)
+
+    '("DeclareCaptionFont"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Font") t)
+
+    '("DeclareCaptionFormat"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Format") t)
+
+    '("DeclareCaptionFormat*"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Format") t)
+
+    '("DeclareCaptionJustification"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Justification") t)
+
+    '("DeclareCaptionLabelFormat"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "LabelFormat") t)
+
+    '("DeclareCaptionLabelSeparator"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "LabelSeparator") t)
+
+    '("DeclareCaptionLabelSeparator*"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "LabelSeparator") t)
+
+    '("DeclareCaptionListFormat"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "ListFormat") t)
+
+    '("DeclareCaptionOption"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Option") t)
+
+    '("DeclareCaptionStyle"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Style")
+      [TeX-arg-eval LaTeX-arg-caption-command t "Additional options"]
+      (TeX-arg-eval LaTeX-arg-caption-command nil "Options"))
+
+    '("DeclareCaptionTextFormat"
+      (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "TextFormat") t)
+
+    '("bothIfFirst" 2)
+
+    '("bothIfSecond" 2))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("caption"           "*[{")
+                               ("captionlistentry"  "[{")
+                               ("captionof"         "*[{"))
+                             'textual)
+     (font-latex-add-keywords '(("captionsetup"                  "*[{")
+                               ("clearcaptionsetup"             "*[{")
+                               ("DeclareCaptionFont"            "{{")
+                               ("DeclareCaptionFormat"          "*{{")
+                               ("DeclareCaptionJustification"   "{{")
+                               ("DeclareCaptionLabelFormat"     "{{")
+                               ("DeclareCaptionLabelSeparator"  "*{{")
+                               ("DeclareCaptionListFormat"      "{{")
+                               ("DeclareCaptionOption"          "{{")
+                               ("DeclareCaptionStyle"           "{[{")
+                               ("DeclareCaptionTextFormat"      "{{"))
+                             'function)) )
+ LaTeX-dialect)
+
+(defun LaTeX-caption-package-options ()
+  "Prompt for package options for the caption package."
+  (TeX-read-key-val t
+   (append '(("compatibility"  ("true" "false")))
+          '(("figureposition" ("top" "above" "bottom" "below")))
+          '(("tableposition"  ("top" "above" "bottom" "below")))
+          LaTeX-caption-key-val-options)))
+
+;;; caption.el ends here

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   12 ++
 Makefile.in       |    3 +-
 style/caption.el  |  308 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 style/geometry.el |  150 ++++++++++++++++++++++++++
 4 files changed, 472 insertions(+), 1 deletions(-)
 create mode 100644 style/caption.el
 create mode 100644 style/geometry.el


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]