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


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. fd041662bab692f7a7d24aea07a08b650b9a42c6
Date: Mon, 16 Mar 2015 07:11:15 +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  fd041662bab692f7a7d24aea07a08b650b9a42c6 (commit)
       via  003f475d15530eb6b853a639b455087afe341c69 (commit)
       via  8d7fef32c4ca2adcef822e8b12e56e66fb1a10a4 (commit)
      from  59f94402ecdcb8a02a3a0d9ab62bb2de01057f3f (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 fd041662bab692f7a7d24aea07a08b650b9a42c6
Author: Arash Esbati <address@hidden>
Date:   Sun Mar 15 17:45:48 2015 +0100

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

diff --git a/ChangeLog b/ChangeLog
index 1b8e6d5..6765b01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
        * Makefile.in (STYLESRC): Add new style.
 
+       * style/ltxtable.el: New file.
+
+2015-03-15  Arash Esbati  <address@hidden>
+
+       * Makefile.in (STYLESRC): Add new style.
+
        * style/ltablex.el: New file.
 
 2015-03-15  Arash Esbati  <address@hidden>
diff --git a/Makefile.in b/Makefile.in
index 160f970..848781b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -146,7 +146,7 @@ STYLESRC = style/prosper.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/geometry.el  style/ltablex.el
+          style/geometry.el  style/ltablex.el   style/ltxtable.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/ltxtable.el b/style/ltxtable.el
new file mode 100644
index 0000000..ddc7c89
--- /dev/null
+++ b/style/ltxtable.el
@@ -0,0 +1,51 @@
+;;; ltxtable.el --- AUCTeX style for `ltxtable.sty' (v0.2)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-03-14
+;; 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 `ltxtable.sty' (v0.2) from 1995/12/11.
+;; `ltxtable.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "ltxtable"
+ (lambda ()
+   (TeX-run-style-hooks "tabularx" "longtable")
+   (TeX-add-symbols
+    '("LTXtable"
+      (TeX-arg-length)
+      (TeX-arg-eval
+       (lambda ()
+        (let ((longtable (file-relative-name
+                          (read-file-name "File with longtable: "))))
+          (format "%s" longtable)))))))
+ LaTeX-dialect)
+
+(defvar LaTeX-ltxtable-package-options nil
+  "Package options for the ltxtable package.")
+
+;;; ltxtable.el ends here

commit 003f475d15530eb6b853a639b455087afe341c69
Author: Arash Esbati <address@hidden>
Date:   Sun Mar 15 16:22:54 2015 +0100

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

diff --git a/ChangeLog b/ChangeLog
index 7e88388..1b8e6d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2015-03-15  Arash Esbati  <address@hidden>
 
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/ltablex.el: New file.
+
+2015-03-15  Arash Esbati  <address@hidden>
+
        * style/enumitem.el (LaTeX-enumitem-SetEnumitemKey-regexp): Delete
        match for the second argument.
        (LaTeX-enumitem-SetEnumitemValue-regexp): Delete match for the
diff --git a/Makefile.in b/Makefile.in
index b9f5c08..160f970 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -146,7 +146,7 @@ STYLESRC = style/prosper.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/geometry.el
+          style/geometry.el  style/ltablex.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/ltablex.el b/style/ltablex.el
new file mode 100644
index 0000000..5e0fad5
--- /dev/null
+++ b/style/ltablex.el
@@ -0,0 +1,49 @@
+;;; ltablex.el --- AUCTeX style for `ltablex.sty' (v1.1)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-03-14
+;; 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 `ltablex.sty' (v1.1) from 2014/08/13.
+;; `ltablex.sty' is part of TeXLive.  `ltablex.sty' modifies the
+;; tabularx environment to combine the features of the tabularx
+;; package with those of the longtable package.  All we need is to
+;; call those styles and add two macros.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "ltablex"
+ (lambda ()
+   (TeX-run-style-hooks "tabularx" "longtable")
+   (TeX-add-symbols
+    '("keepXColumns" 0)
+    '("convertXColumns" 0)))
+ LaTeX-dialect)
+
+(defvar LaTeX-ltablex-package-options nil
+  "Package options for the ltablex package.")
+
+;;; ltablex.el ends here

commit 8d7fef32c4ca2adcef822e8b12e56e66fb1a10a4
Author: Arash Esbati <address@hidden>
Date:   Sun Mar 15 16:16:20 2015 +0100

    Improve styles enumitem.el and caption.el.
    
    * style/enumitem.el (LaTeX-enumitem-SetEnumitemKey-regexp): Delete
    match for the second argument.
    (LaTeX-enumitem-SetEnumitemValue-regexp): Delete match for the
    third argument.
    (LaTeX-arg-SetEnumitemValue): Replace the randomly generated
    number with something human-readable.
    
    * style/caption.el (LaTeX-caption-DeclareCaption-regexp): Delete
    match for the second argument.
    (LaTeX-arg-caption-DeclareCaption): Replace the randomly generated
    number with something human-readable.

diff --git a/ChangeLog b/ChangeLog
index a53574a..7e88388 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2015-03-15  Arash Esbati  <address@hidden>
+
+       * style/enumitem.el (LaTeX-enumitem-SetEnumitemKey-regexp): Delete
+       match for the second argument.
+       (LaTeX-enumitem-SetEnumitemValue-regexp): Delete match for the
+       third argument.
+       (LaTeX-arg-SetEnumitemValue): Replace the randomly generated
+       number with something human-readable.
+
+       * style/caption.el (LaTeX-caption-DeclareCaption-regexp): Delete
+       match for the second argument.
+       (LaTeX-arg-caption-DeclareCaption): Replace the randomly generated
+       number with something human-readable.
+
 2015-03-10  Tassilo Horn  <address@hidden>
 
        * tex.el (TeX-style-path): Replace `pushnew' with equivalent code
diff --git a/style/caption.el b/style/caption.el
index f2ea856..c79f562 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -121,14 +121,16 @@ supported by `caption.sty'.")
 ;; Setup for various \DeclareCaption's:
 (TeX-auto-add-type "caption-DeclareCaption" "LaTeX")
 
+;; The 2. argument to `DeclareCaption[A-Za-z]' contains (La)TeX code.
+;; We deliberately ignore that argument in our regex since it is not
+;; needed for this style and would pollute the auto generated
+;; `docname.el' file.
 (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
@@ -175,14 +177,15 @@ standard one."
 
 ;; 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.
+;; the next `C-c C-n'.  We mimic that regex-match bei concat'ing the
+;; elements.  It will vanish upon next `C-c C-n'.
 (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))
+     (list (concat "\\DeclareCaption" format "{" name "}")
+          format name))
     (format "%s" name)))
 
 (TeX-add-style-hook
diff --git a/style/enumitem.el b/style/enumitem.el
index 760a145..e2fce50 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -137,7 +137,7 @@ package.")
 (TeX-auto-add-type "enumitem-SetEnumitemKey" "LaTeX")
 
 (defvar LaTeX-enumitem-SetEnumitemKey-regexp
-  '("\\\\SetEnumitemKey{\\([^}]+\\)}{\\([^}]+\\)}"
+  '("\\\\SetEnumitemKey{\\([^}]+\\)}"
     1 LaTeX-auto-enumitem-SetEnumitemKey)
   "Matches the arguments of `\\SetEnumitemKey' from `enumitem'
 package.")
@@ -150,9 +150,12 @@ package.")
 ;; Upon Tassilo's recommendation, we include also `0' so that we can
 ;; use the function `LaTeX-enumitem-SetEnumitemValue-list' while we
 ;; make sure that `TeX-auto-list-information' doesn't remove multiple
-;; defined values to a specific key.
+;; defined values to a specific key.  For this reason, we also ignore
+;; the 3. argument to the `\SetEnumitemValue' macro (i.e., a third
+;; {\\([^}]+\\)} in regex) so that we don't pollute the generated
+;; `docname.el' with unnecessary (La)TeX code.
 (defvar LaTeX-enumitem-SetEnumitemValue-regexp
-  '("\\\\SetEnumitemValue{\\([^}]+\\)}{\\([^}]+\\)}{\\([^}]+\\)}"
+  '("\\\\SetEnumitemValue{\\([^}]+\\)}{\\([^}]+\\)}"
     (0 1 2) LaTeX-auto-enumitem-SetEnumitemValue)
   "Matches the arguments of `\\SetEnumitemValue' from `enumitem'
 package.")
@@ -229,11 +232,12 @@ key-val and the first item."
     (add-to-list 'LaTeX-enumitem-key-val-options-local (list key))
     (LaTeX-add-enumitem-SetEnumitemKeys key)))
 
-
 ;; In `LaTeX-enumitem-SetEnumitemValue-regexp', we match (0 1 2).
 ;; When adding a new `key=val', 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.
+;; until the next `C-c C-n'.  We mimic that regex-match bei concat'ing
+;; the elements and pass the result to
+;; `LaTeX-add-enumitem-SetEnumitemValues'.  It will vanish upon next
+;; invocation of `C-c C-n'.
 (defun LaTeX-arg-SetEnumitemValue (optional &optional prompt)
   "Ask for a new value added to an existing key incl. the final
 replacement of the value."
@@ -252,7 +256,8 @@ replacement of the value."
     (TeX-argument-insert key optional)
     (TeX-argument-insert val optional)
     (LaTeX-add-enumitem-SetEnumitemValues
-     `(,(number-to-string (random)) ,key ,val))))
+     (list (concat "\\SetEnumitemValue{" key "}{" val "}")
+          key val))))
 
 (defun LaTeX-enumitem-update-key-val-options ()
   "Update the buffer-local key-val options before offering them

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

Summary of changes:
 ChangeLog                           |   26 ++++++++++++++++++++++
 Makefile.in                         |    2 +-
 style/caption.el                    |   13 +++++++----
 style/enumitem.el                   |   19 ++++++++++------
 style/{newtxsf.el => ltablex.el}    |   40 ++++++++++++++---------------------
 style/{newtxtext.el => ltxtable.el} |   33 ++++++++++++++--------------
 6 files changed, 80 insertions(+), 53 deletions(-)
 copy style/{newtxsf.el => ltablex.el} (58%)
 copy style/{newtxtext.el => ltxtable.el} (60%)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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