[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 4b2587d 01/35: Add new style currvita.el.
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 4b2587d 01/35: Add new style currvita.el. |
Date: |
Sun, 22 Mar 2015 09:26:54 +0000 |
branch: externals/auctex
commit 4b2587df35092313c106758f9543a2826f93904c
Author: Arash <address@hidden>
Commit: Tassilo Horn <address@hidden>
Add new style currvita.el.
* Makefile.in (STYLESRC): Add new style.
* style/currvita.el: New file.
Signed-off-by: Tassilo Horn <address@hidden>
---
ChangeLog | 6 +++
Makefile.in | 2 +-
style/currvita.el | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 101 insertions(+), 1 deletions(-)
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
- [elpa] externals/auctex updated (8c89edf -> 6620d8c), Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 4b2587d 01/35: Add new style currvita.el.,
Tassilo Horn <=
- [elpa] externals/auctex 061d8cd 02/35: New tcolorbox style, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 5276f35 03/35: Add PDF Tools support, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex cc9c060 05/35: Fix compatibility with Emacs < 24., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex cef38f9 04/35: Handle TeX-region in backward search with both PDF Tools and Evince, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 51e3aa8 06/35: Adapt to PDF Tool changes, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 1bc721b 07/35: Fix error introduced in previous commit, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex adf90e9 09/35: Simplify TeX-pdf-tools-sync-view, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex b858aae 10/35: Make TeX-pdf-tools-sync-view work with region files, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex b2957c8 11/35: Fix bug in pdf-tools support, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 86f4a1e 12/35: Add a hook that's run after an environment is modified, Tassilo Horn, 2015/03/22