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. a864241956438b0529f5d


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. a864241956438b0529f5d75f3c5861404cec8587
Date: Sat, 26 Sep 2015 04:55:17 +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  a864241956438b0529f5d75f3c5861404cec8587 (commit)
       via  13941d86b37b8425822c853b88e12bd8a8f07210 (commit)
       via  320de59ab48c50de18d6ac1941d9c0908b3d7802 (commit)
       via  440936d346f883704fe79872b8108f2acf89f52f (commit)
       via  f470df87e7ea5c651b06d94cf67e066fe6489f01 (commit)
       via  100ba3556081c4bde8b6b9c20e3887bb180fac09 (commit)
      from  a76afdf6fec49e2a81d5513aacc1700acb05c33a (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 a864241956438b0529f5d75f3c5861404cec8587
Author: Tassilo Horn <address@hidden>
Date:   Sat Sep 26 06:54:52 2015 +0200

    Fixup space-before-tab git warned about.

diff --git a/style/subcaption.el b/style/subcaption.el
index 8223c91..83b20a0 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -89,8 +89,8 @@ insert only a caption."
 
    ;; Make "subrefformat" available in key-vals of caption.el:
    (setq LaTeX-caption-key-val-options-local
-        (append LaTeX-subcaption-key-val-options
-                LaTeX-caption-key-val-options-local))
+        (append LaTeX-subcaption-key-val-options
+                LaTeX-caption-key-val-options-local))
 
    (TeX-add-symbols
     ;; Basic commands

commit 13941d86b37b8425822c853b88e12bd8a8f07210
Author: Arash Esbati <address@hidden>
Date:   Sat Sep 26 00:12:40 2015 +0200

    Add new style subcaption.el.
    
    * Makefile.in (STYLESRC): Add new style.
    
    * style/subcaption.el: New file.

diff --git a/ChangeLog b/ChangeLog
index 8695c91..a4cfa2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-09-25  Arash Esbati  <address@hidden>
 
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/subcaption.el: New file.
+
        * style/caption.el (LaTeX-caption-key-val-options): Fix values of 
hypcap-key.
        (LaTeX-caption-update-key-val-options): Add support for
        subcaption.el if loaded.
diff --git a/Makefile.in b/Makefile.in
index 5b689b1..9846055 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -152,7 +152,7 @@ STYLESRC = style/prosper.el \
           style/mnras.el     style/environ.el   style/polyglossia.el \
           style/vwcol.el     style/textpos.el   style/transparent.el \
           style/fontenc.el   style/Alegreya.el  style/gloss-italian.el \
-          style/AlegreyaSans.el
+          style/subcaption.el style/AlegreyaSans.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/subcaption.el b/style/subcaption.el
new file mode 100644
index 0000000..8223c91
--- /dev/null
+++ b/style/subcaption.el
@@ -0,0 +1,158 @@
+;;; subcaption.el --- AUCTeX style for `subcaption.sty' (v1.1-100)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-09-19
+;; 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 `subcaption.sty' (v1.1-100) from
+;; 2015-09-15.  `subcaption.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-subcaption-key-val-options
+  '(("subrefformat" ("default" "empty" "simple" "brace" "parens")))
+  "Key=value options for subcaption package.  This key takes the
+same values as \"labelformat\" from caption package.")
+
+(defun LaTeX-arg-subcaption-subcaption (optional &optional star prompt)
+  "Query for the arguments of \\subcaption incl. a label and
+insert them.  If STAR is t, then do not query for the lof entry
+and \\label and insert only a caption."
+  (let ((lof (unless star
+              (TeX-read-string
+               (TeX-argument-prompt t prompt "List entry"))))
+       (caption (TeX-read-string
+                 (TeX-argument-prompt optional prompt "Sub-caption"))))
+    (LaTeX-indent-line)
+    (when (and lof (not (string-equal lof "")))
+      (insert LaTeX-optop lof LaTeX-optcl))
+    (insert TeX-grop caption TeX-grcl)
+    (unless star
+      (LaTeX-newline)
+      (LaTeX-indent-line)
+      (TeX-insert-macro "label"))))
+
+(defun LaTeX-arg-subcaption-subcaptionbox (optional &optional star prompt)
+  "Query for the arguments of \\subcaptionbox incl. a label and
+insert them.  If STAR is t, then do not query for a \\label and
+insert only a caption."
+  (let ((caption (TeX-read-string
+                 (TeX-argument-prompt optional prompt "Sub-caption"))))
+    (LaTeX-indent-line)
+    (insert TeX-grop caption)
+    (unless star (TeX-insert-macro "label"))
+    (insert TeX-grcl))
+  (let* ((width (completing-read (TeX-argument-prompt t prompt "Width")
+                                (mapcar (lambda (elt) (concat TeX-esc (car 
elt)))
+                                        (LaTeX-length-list))))
+        (inpos (when (and width (not (string-equal width "")))
+                 (completing-read (TeX-argument-prompt t prompt "Inner 
position")
+                                  '("c" "l" "r" "s")))))
+    (cond (;; 2 optional args
+          (and width (not (string-equal width ""))
+               inpos (not (string-equal inpos "")))
+          (insert (format "[%s][%s]" width inpos)))
+         (;; 1st opt. arg, 2nd empty opt. arg
+          (and width (not (string-equal width ""))
+               (string-equal inpos ""))
+          (insert (format "[%s]" width)))
+         (t ; Do nothing if both empty
+          (ignore)))))
+
+(TeX-add-style-hook
+ "subcaption"
+ (lambda ()
+   ;; Run style hook for caption.el
+   (TeX-run-style-hooks "caption")
+
+   ;; Make "subrefformat" available in key-vals of caption.el:
+   (setq LaTeX-caption-key-val-options-local
+        (append LaTeX-subcaption-key-val-options
+                LaTeX-caption-key-val-options-local))
+
+   (TeX-add-symbols
+    ;; Basic commands
+    '("subcaption"     (LaTeX-arg-subcaption-subcaption))
+    '("subcaption*"    (LaTeX-arg-subcaption-subcaption t))
+    '("subcaptionbox"  ["List entry"] (LaTeX-arg-subcaption-subcaptionbox) t)
+    '("subcaptionbox*" (LaTeX-arg-subcaption-subcaptionbox t) t)
+    '("subref"         TeX-arg-ref)
+    ;; \subref* is only available with hyperref.sty loaded, we don't
+    ;; check if hyperref.el is loaded and make it available directly.
+    '("subref*"        TeX-arg-ref)
+    '("phantomcaption"    0)
+    '("phantomsubcaption" 0))
+
+   ;; The next 2 macros are part of the kernel of caption.sty, but we
+   ;; load them within subcaption.el.
+   (TeX-add-symbols
+    '("DeclareCaptionSubType"
+      [TeX-arg-eval
+       completing-read (TeX-argument-prompt t nil "Numbering scheme")
+       '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")]
+      (TeX-arg-eval
+       completing-read (TeX-argument-prompt nil nil "Type")
+       '("figure" "table")))
+
+    '("DeclareCaptionSubType*"
+      [TeX-arg-eval completing-read
+                   (TeX-argument-prompt t nil "Numbering scheme")
+                   '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")]
+      (TeX-arg-eval completing-read
+                   (TeX-argument-prompt nil nil "Type")
+                   '("figure" "table"))))
+
+   ;; The subfigure & subtable environments
+   (LaTeX-add-environments
+    '("subfigure" LaTeX-env-minipage)
+    '("subtable"  LaTeX-env-minipage))
+
+   ;; Introduce env's to RefTeX if loaded
+   (when (fboundp 'reftex-add-label-environments)
+     (reftex-add-label-environments
+      `(("subfigure" ?f ,LaTeX-figure-label "~\\ref{%s}" caption)
+       ("subtable"  ?t ,LaTeX-table-label  "~\\ref{%s}" caption))))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+             (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("subcaption"            "*[{")
+                               ("subcaptionbox"         "*[{[[{")
+                               ("phantomcaption"        "")
+                               ("phantomsubcaption"     ""))
+                             'textual)
+     (font-latex-add-keywords '(("subref"                "*{"))
+                             'reference)
+     (font-latex-add-keywords '(("DeclareCaptionSubType" "*[{"))
+                             'function)) )
+ LaTeX-dialect)
+
+(defun LaTeX-subcaption-package-options ()
+  "Prompt for package options for the subcaption package."
+  (TeX-read-key-val t
+   (append LaTeX-subcaption-key-val-options
+          LaTeX-caption-key-val-options)))
+
+;;; subcaption.el ends here

commit 320de59ab48c50de18d6ac1941d9c0908b3d7802
Author: Arash Esbati <address@hidden>
Date:   Sat Sep 26 00:05:03 2015 +0200

    Apply some fixes to caption.el.
    
    * style/caption.el (LaTeX-caption-key-val-options): Fix values of 
hypcap-key.
    (LaTeX-caption-update-key-val-options): Add support for
    subcaption.el if loaded.
    (LaTeX-arg-caption-captionbox): Do not query for the third
    optional arg. if the second one is empty.
    ("caption"): Add support for all lowercase \continuedfloat*?.
    ("caption"): Fix fontification for \captionof.

diff --git a/ChangeLog b/ChangeLog
index 74a97ff..8695c91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2015-09-25  Arash Esbati  <address@hidden>
 
+       * style/caption.el (LaTeX-caption-key-val-options): Fix values of 
hypcap-key.
+       (LaTeX-caption-update-key-val-options): Add support for
+       subcaption.el if loaded.
+       (LaTeX-arg-caption-captionbox): Do not query for the third
+       optional arg. if the second one is empty.
+       ("caption"): Add support for all lowercase \continuedfloat*?.
+       ("caption"): Fix fontification for \captionof.
+
        * style/hyperref.el ("hyperref"): Make
        `LaTeX-indent-environment-list' local before adding new env's.
 
diff --git a/style/caption.el b/style/caption.el
index 448f611..4412443 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -1,4 +1,4 @@
-;;; caption.el --- AUCTeX style for `caption.sty' (v3.3-89)
+;;; caption.el --- AUCTeX style for `caption.sty' (v3.3-111)
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
@@ -26,7 +26,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `caption.sty' (v3.3-89) from 2013/05/02.
+;; This file adds support for `caption.sty' (v3.3-111) from 2015/09/17.
 ;; `caption.sty' is part of TeXLive.
 
 ;; If things do not work or when in doubt, press `C-c C-n'.  Comments
@@ -53,7 +53,7 @@
               "stretch" "normalcolor" "color" "normal"))
     ("format" ("plain" "hang"))
     ("hangindent")
-    ("hypcap")
+    ("hypcap" ("false" "no" "off" "0" "true" "yes" "on" "1"))
     ("hypcapspace")
     ("indention")
     ("justification" ("justified" "centering" "centerlast" "centerfirst"
@@ -151,18 +151,33 @@ in `caption'-completions."
                       (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)))
+          (temp (copy-alist LaTeX-caption-key-val-options-local))
+          ;; If `subcaption.el' is loaded, delete and update also the
+          ;; entry for `subrefformat' when processing the `labelformat'.
+          (opts (progn
+                  (when (and (string-equal key "labelformat")
+                             (boundp 'LaTeX-subcaption-key-val-options))
+                    (setq temp
+                          (assq-delete-all
+                           (car (assoc (caar LaTeX-subcaption-key-val-options) 
temp))
+                           temp)))
+                  (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
+       ;; For anything but `\DeclareCaptionOption', do the standard
+       ;; procedure.  Again, take care of `subrefformat' for `subcaption.el'.
        (if val-match
-           (pushnew (list key (delete-dups (apply 'append (list val) 
val-match)))
-                    opts :test #'equal)
+           (progn
+             (when (and (string-equal key "labelformat")
+                        (boundp 'LaTeX-subcaption-key-val-options))
+               (pushnew (list "subrefformat"
+                              (delete-dups (apply 'append (list val) 
val-match)))
+                        opts :test #'equal))
+             (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)))))
 
@@ -214,26 +229,22 @@ insert only a caption."
     (insert TeX-grop caption)
     (unless star (TeX-insert-macro "label"))
     (insert TeX-grcl))
-  (let ((width (completing-read (TeX-argument-prompt t prompt "Width")
-                               (mapcar (lambda(elt) (concat TeX-esc (car elt)))
-                                       (LaTeX-length-list))))
-       (inpos (completing-read (TeX-argument-prompt t prompt "Inner position")
-                               '("c" "l" "r" "s"))))
+  (let* ((width (completing-read (TeX-argument-prompt t prompt "Width")
+                                (mapcar (lambda(elt) (concat TeX-esc (car 
elt)))
+                                        (LaTeX-length-list))))
+        (inpos (when (and width (not (string-equal width "")))
+                 (completing-read (TeX-argument-prompt t prompt "Inner 
position")
+                                  '("c" "l" "r" "s")))))
     (cond (;; 2 optional args
           (and width (not (string-equal width ""))
                inpos (not (string-equal inpos "")))
           (insert (format "[%s][%s]" width inpos)))
-         (;; 1st empty opt. arg, 2nd opt. arg
-          (and (string-equal width "")
-               inpos (not (string-equal inpos "")))
-          (insert (format "[][%s]" inpos)))
          (;; 1st opt. arg, 2nd empty opt. arg
           (and width (not (string-equal width ""))
                (string-equal inpos ""))
           (insert (format "[%s]" width)))
          (t ; Do nothing if both empty
-          (ignore))))
-  (LaTeX-fill-paragraph))
+          (ignore)))))
 
 (TeX-add-style-hook
  "caption"
@@ -290,6 +301,10 @@ insert only a caption."
     '("captionbox*" (LaTeX-arg-caption-captionbox t) t)
 
     '("ContinuedFloat" 0)
+    '("ContinuedFloat*" 0)
+
+    '("continuedfloat" 0)
+    '("continuedfloat*" 0)
 
     '("DeclareCaptionFont"
       (LaTeX-arg-caption-DeclareCaption "Font") t)
@@ -335,7 +350,7 @@ insert only a caption."
              (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords '(("caption"           "*[{")
                                ("captionlistentry"  "[{")
-                               ("captionof"         "*[{")
+                               ("captionof"         "*{[{")
                                ("captionbox"        "*[{[[{"))
                              'textual)
      (font-latex-add-keywords '(("captionsetup"                  "*[{")

commit 440936d346f883704fe79872b8108f2acf89f52f
Author: Arash Esbati <address@hidden>
Date:   Fri Sep 25 23:52:51 2015 +0200

    Make `LaTeX-indent-environment-list' local.
    
    * style/hyperref.el ("hyperref"): Make
    `LaTeX-indent-environment-list' local before adding new env's.

diff --git a/ChangeLog b/ChangeLog
index 488269a..74a97ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-09-25  Arash Esbati  <address@hidden>
 
+       * style/hyperref.el ("hyperref"): Make
+       `LaTeX-indent-environment-list' local before adding new env's.
+
        * style/filecontents.el ("filecontents"): Make
        `LaTeX-indent-environment-list' local before adding new env's.
 
diff --git a/style/hyperref.el b/style/hyperref.el
index 9f4d0be..630f24c 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -269,6 +269,7 @@
 
    ;; Do not indent the content of the "Form"-env; it is odd if the
    ;; whole document is indented.
+   (make-local-variable 'LaTeX-indent-environment-list)
    (add-to-list 'LaTeX-indent-environment-list '("Form" current-indentation))
 
    (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")

commit f470df87e7ea5c651b06d94cf67e066fe6489f01
Author: Arash Esbati <address@hidden>
Date:   Fri Sep 25 23:49:20 2015 +0200

    Make `LaTeX-indent-environment-list' local.
    
    * style/filecontents.el ("filecontents"): Make
    `LaTeX-indent-environment-list' local before adding new env's.

diff --git a/ChangeLog b/ChangeLog
index 7558e4d..488269a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-09-25  Arash Esbati  <address@hidden>
 
+       * style/filecontents.el ("filecontents"): Make
+       `LaTeX-indent-environment-list' local before adding new env's.
+
        * style/fontenc.el: Fix mail address in Maintainer-header.
 
 2015-09-25  Mosè Giordano  <address@hidden>
diff --git a/style/filecontents.el b/style/filecontents.el
index 20cfa98..256c214 100644
--- a/style/filecontents.el
+++ b/style/filecontents.el
@@ -40,6 +40,7 @@
     '("filecontents" LaTeX-env-filecontents)
     '("filecontents*" LaTeX-env-filecontents))
 
+   (make-local-variable 'LaTeX-indent-environment-list)
    (add-to-list 'LaTeX-indent-environment-list
                '("filecontents" current-indentation))
    (add-to-list 'LaTeX-indent-environment-list

commit 100ba3556081c4bde8b6b9c20e3887bb180fac09
Author: Arash Esbati <address@hidden>
Date:   Fri Sep 25 23:44:21 2015 +0200

    Fix mail address in Maintainer-header.
    
    * style/fontenc.el: Fix mail address in Maintainer-header.

diff --git a/ChangeLog b/ChangeLog
index 3fd1716..7558e4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-25  Arash Esbati  <address@hidden>
+
+       * style/fontenc.el: Fix mail address in Maintainer-header.
+
 2015-09-25  Mosè Giordano  <address@hidden>
 
        * latex.el (LaTeX-common-initialization): Remove "abstract"
diff --git a/style/fontenc.el b/style/fontenc.el
index 3df5e5d..c57f6d7 100644
--- a/style/fontenc.el
+++ b/style/fontenc.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <esbati'at'gmx.de>
-;; Maintainer: address@hidden
+;; Maintainer: address@hidden
 ;; Created: 2015-09-12
 ;; Keywords: tex
 

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

Summary of changes:
 ChangeLog             |   22 +++++++
 Makefile.in           |    2 +-
 style/caption.el      |   57 +++++++++++-------
 style/filecontents.el |    1 +
 style/fontenc.el      |    2 +-
 style/hyperref.el     |    1 +
 style/subcaption.el   |  158 +++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 220 insertions(+), 23 deletions(-)
 create mode 100644 style/subcaption.el


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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