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. 0e3f3ac8d24e92741228d


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 0e3f3ac8d24e92741228ddb6cfe67207ca2c2a1e
Date: Mon, 18 May 2015 15:00:36 +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  0e3f3ac8d24e92741228ddb6cfe67207ca2c2a1e (commit)
       via  11d759de56d27efab320ae3738003a9fe2e45701 (commit)
       via  0a1742f7ffbe02052ef946bc4e22772ca8f72ae4 (commit)
      from  1f9edc5b0103b1bfd982f7bba6652958b02a6812 (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 0e3f3ac8d24e92741228ddb6cfe67207ca2c2a1e
Author: Arash Esbati <address@hidden>
Date:   Sat May 16 18:39:31 2015 +0200

    New styles newpxtext.el and newpxmath.el.
    
    * Makefile.in (STYLESRC): Add new styles.
    
    * style/newpxmath.el: New file.
    
    * style/newpxtext.el: New file.

diff --git a/ChangeLog b/ChangeLog
index 76ad4df..10bcfdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2015-05-16  Arash Esbati  <address@hidden>
 
+       * Makefile.in (STYLESRC): Add new styles.
+
+       * style/newpxmath.el: New file.
+
+       * style/newpxtext.el: New file.
+
        * font-latex.el (font-latex-set-syntactic-keywords): Allow for
        multiple mandatory argument for a verbatim environment.
 
diff --git a/Makefile.in b/Makefile.in
index 76cef3c..750036e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -147,7 +147,8 @@ STYLESRC = style/prosper.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/ltxtable.el \
-          style/mn2e.el      style/colortbl.el  style/attachfile.el
+          style/mn2e.el      style/colortbl.el  style/attachfile.el \
+          style/newpxtext.el style/newpxmath.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/newpxmath.el b/style/newpxmath.el
new file mode 100644
index 0000000..c9496db
--- /dev/null
+++ b/style/newpxmath.el
@@ -0,0 +1,74 @@
+;;; newpxmath.el --- AUCTeX style for `newpxmath.sty' (v1.232)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-05-02
+;; 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 `newpxmath.sty' (v1.232) from 2015/04/07.
+;; `newpxmath.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "newpxmath"
+ (lambda ()
+
+   ;; Run style hook for amsmath
+   (TeX-run-style-hooks "amsmath")
+
+   ;; New symbols
+   (TeX-add-symbols
+    '("overgroup"      t)
+    '("undergroup"     t)
+    '("overgroupra"    t)
+    '("overgroupla"    t)
+    '("undergroupra"   t)
+    '("undergroupla"   t)
+    '("widering"       t)
+    '("widearc"        t)
+    '("wideOarc"       t)
+    '("uppartial"      0)
+    '("upvarkappa"     0)
+    '("varmathbb"      "Character")
+    '("vmathbb"        "Character")
+    '("vvmathbb"       "Character")))
+ LaTeX-dialect)
+
+(defvar LaTeX-newpxmath-package-options
+  '("varg"
+    "cmintegrals"
+    "uprightGreek"
+    "slantedGreek"
+    "cmbraces"
+    "bigdelims"
+    "varbb"
+    "vvarbb"
+    "nosymbolsc"
+    "amssymbols"
+    "noamssymbols"
+    "frenchmath")
+  "Package options for the newpxmath package.")
+
+;;; newpxmath.el ends here
diff --git a/style/newpxtext.el b/style/newpxtext.el
new file mode 100644
index 0000000..3bb9ab8
--- /dev/null
+++ b/style/newpxtext.el
@@ -0,0 +1,81 @@
+;;; newpxtext.el --- AUCTeX style for `newpxtext.sty' (v1.232)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-05-02
+;; 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 `newpxtext.sty' (v1.232) from 2015/04/15.
+;; `newpxtext.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "newpxtext"
+ (lambda ()
+
+   ;; Run style hook for various packages loaded by newpxtext
+   (TeX-run-style-hooks "textcomp" "fontaxes")
+
+   ;; New symbols
+   (TeX-add-symbols
+    '("useosf"          0)  ; Only preamble command
+    '("useproportional" 0)  ; Only preamble command
+    '("lfstyle"        -1)  ; lf declaration
+    '("tlfstyle"       -1)  ; tlf declaration
+    '("osfstyle"       -1)  ; osf declaration
+    '("tosfstyle"      -1)  ; tosf declaration
+    '("sustyle"        -1)  ; sup style declaration
+    '("textlf"          t)  ; lf command
+    '("texttlf"         t)  ; tlf command
+    '("textosf"         t)  ; osf command
+    '("texttosf"        t)  ; tosf command
+    '("textsu"          t)) ; sup style command
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("textlf"    "{")
+                                ("texttlf"   "{")
+                                ("textosf"   "{")
+                                ("texttosf"  "{")
+                               ("textsu"    "{"))
+                              'type-command)
+     (font-latex-add-keywords '(("lfstyle"   "")
+                                ("tlfstyle"  "")
+                                ("osfstyle"  "")
+                               ("tosfstyle" "")
+                               ("sustyle"   ""))
+                              'type-declaration)))
+ LaTeX-dialect)
+
+(defvar LaTeX-newpxtext-package-options
+  '("defaultsups" "scosf" "largesc"
+    "scaled" "helvratio"
+    "tighter" "looser" "spacing" "stretch" "shrink"
+    "lining" "lf" "oldstyle" "osf" "tabular"
+    "p" "proportional" "theoremfont")
+  "Package options for the newpxtext package.")
+
+;;; newpxtext.el ends here

commit 11d759de56d27efab320ae3738003a9fe2e45701
Author: Arash Esbati <address@hidden>
Date:   Sat May 16 18:19:41 2015 +0200

    More font-lock fix for verbatim environment args.
    
    * font-latex.el (font-latex-set-syntactic-keywords): Allow for
    multiple mandatory argument for a verbatim environment.

diff --git a/ChangeLog b/ChangeLog
index 2c71ee2..76ad4df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-05-16  Arash Esbati  <address@hidden>
 
+       * font-latex.el (font-latex-set-syntactic-keywords): Allow for
+       multiple mandatory argument for a verbatim environment.
+
        * style/listings.el ("listings"): Add support for parsing new
        env's defined with `\lstnewenvironment' command.
 
diff --git a/font-latex.el b/font-latex.el
index ed953d3..0bcc039 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -918,9 +918,9 @@ have changed."
                       ;; package).
                       "\\(?:\\[[^\]\[]*\\(?:\\[[^\]\[]*\\][^\]\[]*\\)*\\]\\)?"
                       ;; After the optional argument, there may also be
-                      ;; another mandatory argument (e.g. with VerbatimOut or
-                      ;; the minted envs).
-                      "\\(?:{[^}]+}\\)?"
+                      ;; another mandatory argument(s) (e.g. with VerbatimOut 
or
+                      ;; the minted envs or defined with `lstnewenvironment').
+                      "\\(?:{[^}]+}\\)*"
                       "\\(\n\\)")
                     (1 "|" t)))
       (add-to-list 'font-latex-syntactic-keywords

commit 0a1742f7ffbe02052ef946bc4e22772ca8f72ae4
Author: Arash Esbati <address@hidden>
Date:   Sat May 16 18:13:06 2015 +0200

    Parse env's defined with `\lstnewenvironment'.
    
    * style/listings.el ("listings"): Add support for parsing new
    env's defined with `\lstnewenvironment' command.

diff --git a/ChangeLog b/ChangeLog
index 9be6aab..2c71ee2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-16  Arash Esbati  <address@hidden>
+
+       * style/listings.el ("listings"): Add support for parsing new
+       env's defined with `\lstnewenvironment' command.
+
 2015-05-08  Tassilo Horn  <address@hidden>
 
        * tex.el (TeX-mode-syntax-table): Use paired delimiter syntax for
diff --git a/style/listings.el b/style/listings.el
index ace5c97..aa91b77 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -1,6 +1,6 @@
 ;;; listings.el --- AUCTeX style for `listings.sty'
 
-;; Copyright (C) 2004, 2005, 2009, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2009, 2013, 2015 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <address@hidden>
 ;; Maintainer: address@hidden
@@ -28,6 +28,9 @@
 
 ;; This file adds support for `listings.sty'.
 ;;
+;; May 2015: The style detects new environments defined with
+;; `\lstnewenvironment'.  Users need to invoke `C-c C-n' for this.
+;;
 ;; FIXME: Please make me more sophisticated!
 
 ;;; Code:
@@ -217,9 +220,44 @@
     ("multicolumn"))
   "Key=value options for listings macros and environments.")
 
+(defvar LaTeX-auto-listings-lstnewenvironment nil
+  "Temporary for parsing the arguments of `\\lstnewenvironment'
+from `listings' package.")
+
+(defvar LaTeX-listing-lstnewenvironment-regexp
+  `(,(concat "\\\\lstnewenvironment"
+            "[ \t\n\r]*{\\([A-Za-z0-9]+\\)}%?"
+            "[ \t\n\r]*\\[?\\([0-9]?\\)\\]?")
+    (1 2) LaTeX-auto-listings-lstnewenvironment)
+  "Matches the argument of `\\lstnewenvironment' from `listings.sty'.")
+
+(defun LaTeX-listings-auto-prepare ()
+  "Clear temporary variable from `listings.sty' before parsing."
+  (setq LaTeX-auto-listings-lstnewenvironment nil))
+
+(defun LaTeX-listings-auto-cleanup ()
+  "Process the parsed results of `\\lstnewenvironment'."
+  (dolist (env-args LaTeX-auto-listings-lstnewenvironment)
+    (let ((env  (car env-args))
+         (args (cadr env-args)))
+      (if (string-equal args "")
+         (add-to-list 'LaTeX-auto-environment (list env))
+       (add-to-list 'LaTeX-auto-environment
+                    (list env (string-to-number args))))
+      (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation))
+      (add-to-list 'LaTeX-verbatim-environments-local env))))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-listings-auto-prepare t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-listings-auto-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+
 (TeX-add-style-hook
  "listings"
  (lambda ()
+
+   ;; Add it to the parser
+   (TeX-auto-add-regexp LaTeX-listing-lstnewenvironment-regexp)
+
    ;; New symbols
    (TeX-add-symbols
     '("lstalias" ["Alias dialect"] "Alias" ["Dialect"] "Language")

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

Summary of changes:
 ChangeLog                            |   14 ++++++++++++
 Makefile.in                          |    3 +-
 font-latex.el                        |    6 ++--
 style/listings.el                    |   40 +++++++++++++++++++++++++++++++++-
 style/{newtxmath.el => newpxmath.el} |   38 ++++++++++++--------------------
 style/{newtxtext.el => newpxtext.el} |   29 ++++++++++++------------
 6 files changed, 87 insertions(+), 43 deletions(-)
 copy style/{newtxmath.el => newpxmath.el} (68%)
 copy style/{newtxtext.el => newpxtext.el} (77%)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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