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. 4b2587df35092313c1067


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 4b2587df35092313c106758f9543a2826f93904c
Date: Sun, 01 Feb 2015 08:51:46 +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  4b2587df35092313c106758f9543a2826f93904c (commit)
      from  4b43c80d0132b448c6b45ce2abecda727e685458 (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 4b2587df35092313c106758f9543a2826f93904c
Author: Arash <address@hidden>
Date:   Sat Jan 31 20:15:20 2015 +0100

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

diff --git a/ChangeLog b/ChangeLog
index dab2cad..7c73af6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-31  Arash Esbati  <address@hidden>
+
+       * Makefile.in (STYLESRC): Add new style.
+
+       * style/currvita.el: New file.
+
 2015-01-27  Tassilo Horn  <address@hidden>
 
        * tex.el (TeX-view-program-list-builtin): Remove "start" as
diff --git a/Makefile.in b/Makefile.in
index 39402e7..ceef32e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -143,7 +143,7 @@ STYLESRC = style/prosper.el \
           style/luatextra.el style/erewhon.el   style/baskervaldx.el \
           style/fbb.el       style/newtxmath.el style/newtxsf.el \
           style/newtxtext.el style/newtxttt.el  style/minted.el \
-          style/wrapfig.el   style/relsize.el
+          style/wrapfig.el   style/relsize.el   style/currvita.el
 STYLEELC = $(STYLESRC:.el=.elc)
 
 ifeq (@preview_enabled@,yes)
diff --git a/style/currvita.el b/style/currvita.el
new file mode 100644
index 0000000..f2a1d55
--- /dev/null
+++ b/style/currvita.el
@@ -0,0 +1,94 @@
+;;; currvita.el --- AUCTeX style for `currvita.sty' (v0.9i)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-01-05
+;; 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 `currvita.sty' (v0.9i) from 1999/09/13.
+;; `currvita.sty' is part of TeXLive.
+
+;;; Code:
+
+;; This is a modified version of `LaTeX-env-item'.
+(defun LaTeX-currvita-env-with-label (env)
+  "Insert ENV, a mandatory label and the first item."
+  (LaTeX-insert-environment
+   env
+   (let ((heading (read-string "Heading of list: ")))
+       (format "{%s}" heading)))
+  (if (TeX-active-mark)
+      (progn
+       (LaTeX-find-matching-begin)
+       (end-of-line 1))
+    (end-of-line 0))
+  (delete-char 1)
+  (when (looking-at (concat "^[ \t]+$\\|"
+                           "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
+    (delete-region (point) (line-end-position)))
+  (delete-horizontal-space)
+  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
+  ;; from swapping point and mark and the \item ending up right after
+  ;; \begin{...}.
+  (TeX-deactivate-mark)
+  (LaTeX-insert-item)
+  ;; The inserted \item may have outdented the first line to the
+  ;; right.  Fill it, if appropriate.
+  (when (and (not (looking-at "$"))
+            (not (assoc environment LaTeX-indent-environment-list))
+            (> (- (line-end-position) (line-beginning-position))
+               (current-fill-column)))
+    (LaTeX-fill-paragraph nil)))
+
+
+(TeX-add-style-hook
+ "currvita"
+ (lambda ()
+
+   ;; env's defined by currvita.sty
+   (LaTeX-add-environments
+    '("cv"      "Heading of CV")
+    '("cvlist"  LaTeX-currvita-env-with-label))
+
+   ;; Add "cvlist" to the list of environments which have an optional
+   ;; argument for each item
+   (add-to-list 'LaTeX-item-list '("cvlist" . LaTeX-item-argument))
+
+   ;; General commands: "\date" is already provided by AUCTeX
+   (TeX-add-symbols
+    '("cvplace"           t)
+    '("cvheadingfont"     0)
+    '("cvlistheadingfont" 0)
+    '("cvlabelfont"       0)
+    '("cvbibname"         0))
+
+   ;; Add new lengths defined by currvita.sty
+   (LaTeX-add-lengths "cvlabelwidth" "cvlabelskip" "cvlabelsep"))
+ LaTeX-dialect)
+
+(defvar LaTeX-currvita-package-options
+  '("LabelsAligned" "TextAligned" "openbib" "ManyBibs" "NoDate")
+  "Package options for the currvita package.")
+
+;;; currvita.el ends here

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

Summary of changes:
 ChangeLog         |    6 +++
 Makefile.in       |    2 +-
 style/currvita.el |   94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+), 1 deletions(-)
 create mode 100644 style/currvita.el


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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