[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 69b02a0 22/35: New style for geometry.sty.
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 69b02a0 22/35: New style for geometry.sty. |
Date: |
Sun, 22 Mar 2015 09:27:05 +0000 |
branch: externals/auctex
commit 69b02a0cadaab0c658c26049ace19d6818e16959
Author: Arash Esbati <address@hidden>
Commit: Tassilo Horn <address@hidden>
New style for geometry.sty.
* Makefile.in (STYLESRC): Add new style.
* style/geometry.el: New file.
Signed-off-by: Tassilo Horn <address@hidden>
---
ChangeLog | 6 ++
Makefile.in | 3 +-
style/geometry.el | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 158 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 482a4fe..1cebd1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
* Makefile.in (STYLESRC): Add new style.
+ * style/geometry.el: New file.
+
+2015-03-08 Arash Esbati <address@hidden>
+
+ * Makefile.in (STYLESRC): Add new style.
+
* style/caption.el: New file.
2015-03-08 Arash Esbati <address@hidden>
diff --git a/Makefile.in b/Makefile.in
index 2195bf8..b9f5c08 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -145,7 +145,8 @@ STYLESRC = style/prosper.el \
style/newtxtext.el style/newtxttt.el style/minted.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/bidibeamer.el style/enumitem.el style/caption.el \
+ style/geometry.el
STYLEELC = $(STYLESRC:.el=.elc)
diff --git a/style/geometry.el b/style/geometry.el
new file mode 100644
index 0000000..d263183
--- /dev/null
+++ b/style/geometry.el
@@ -0,0 +1,150 @@
+;;; geometry.el --- AUCTeX style for `geometry.sty' (v5.6)
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <esbati'at'gmx.de>
+;; Maintainer: address@hidden
+;; Created: 2015-02-21
+;; 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 `geometry.sty' (v5.6) from 2010/09/12.
+;; `geometry.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-geometry-always-key-val-options
+ '(("layout") ("layoutwidth") ("layoutheight") ("layoutsize")
+ ("layouthoffset") ("layoutvoffset") ("layoutoffset") ("hscale")
+ ("vscale") ("scale") ("width") ("totalwidth") ("height") ("totalheight")
+ ("total") ("textwidth") ("textheight") ("text") ("body") ("lines")
+ ("includehead") ("includefoot") ("includeheadfoot") ("includemp")
+ ("includeall") ("ignorehead") ("ignorefoot") ("ignoreheadfoot")
+ ("ignoremp") ("ignoreall") ("heightrounded") ("hdivide") ("vdivide")
+ ("divide") ("left") ("lmargin") ("inner") ("right") ("rmargin")
+ ("outer") ("top") ("tmargin") ("bottom") ("bmargin") ("hmargin")
+ ("vmargin") ("margin") ("hmarginratio") ("vmarginratio") ("marginratio")
+ ("ratio") ("hcentering") ("vcentering") ("centering") ("twoside")
+ ("asymmetric") ("bindingoffset") ("hdivide") ("vdivide") ("divide")
+ ("headheight") ("head") ("headsep") ("footskip") ("foot") ("nohead")
+ ("nofoot") ("noheadfoot") ("footnotesep") ("marginparwidth") ("marginpar")
+ ("marginparsep") ("nomarginpar") ("columnsep") ("hoffset") ("voffset")
+ ("offset") ("twocolumn") ("onecolumn") ("twoside") ("textwidth")
+ ("textheight") ("reversemp") ("reversemarginpar"))
+ "Key=value options always available for geometry macros.")
+
+(defvar LaTeX-geometry-preamble-key-val-options
+ '(("paper" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper"
+ "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
+ "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
+ "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
+ "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
+ "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
+ "ansiepaper" "ansiapaper" "ansibpaper" "ansicpaper"
+ "ansidpaper" "ansiepaper"))
+ ("papername" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper"
+ "a5paper" "a6paper" "b0paper" "b1paper" "b2paper"
+ "b3paper" "b4paper" "b5paper" "b6paper" "c0paper"
+ "c1paper" "c2paper" "c3paper" "c4paper" "c5paper"
+ "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j"
+ "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper"
+ "ansiepaper" "ansiapaper" "ansibpaper" "ansicpaper"
+ "ansidpaper" "ansiepaper"))
+ ("a0paper") ("a1paper") ("a2paper") ("a3paper") ("a4paper") ("a5paper")
+ ("a6paper") ("b0paper") ("b1paper") ("b2paper") ("b3paper") ("b4paper")
+ ("b5paper") ("b6paper") ("c0paper") ("c1paper") ("c2paper") ("c3paper")
+ ("c4paper") ("c5paper") ("c6paper") ("b0j") ("b1j") ("b2j") ("b3j")
+ ("b4j") ("b5j") ("b6j") ("ansiapaper") ("ansibpaper") ("ansicpaper")
+ ("ansidpaper") ("ansiepaper") ("ansiapaper") ("ansibpaper") ("ansicpaper")
+ ("ansidpaper") ("ansiepaper") ("screen") ("paperwidth") ("paperheight")
+ ("papersize") ("landscape") ("portrait")
+ ("driver" ("dvips" "dvipdfm" "pdftex" "vtex" "xetex" "auto" "none"))
+ ("dvips") ("dvipdfm") ("pdftex") ("xetex") ("vtex") ("verbose")
+ ("reset") ("mag") ("truedimen") ("pass") ("showframe") ("showcrop"))
+ "Key=value options allowed only in the preamble for geometry macros.")
+
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+;; Setup for \savegeometry:
+(TeX-auto-add-type "geometry-savegeometry" "LaTeX" "geometry-savegeometries")
+
+(defvar LaTeX-geometry-savegeometry-regexp
+ '("\\\\savegeometry{\\([^}]+\\)}"
+ 1 LaTeX-auto-geometry-savegeometry)
+ "Matches the argument of `\\savegeometry' from `geometry'
+package.")
+
+(defun LaTeX-geometry-auto-prepare ()
+ "Clear `LaTeX-auto-geometry-savegeometry' before parsing."
+ (setq LaTeX-auto-geometry-savegeometry nil))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-geometry-auto-prepare t)
+
+(TeX-add-style-hook
+ "geometry"
+ (lambda ()
+
+ ;; Add geometry to the parser.
+ (TeX-auto-add-regexp LaTeX-geometry-savegeometry-regexp)
+
+ ;; geometry commands:
+ (TeX-add-symbols
+ '("geometry"
+ (TeX-arg-eval TeX-read-key-val nil
+ (append LaTeX-geometry-preamble-key-val-options
+ LaTeX-geometry-always-key-val-options)))
+ '("newgeometry"
+ (TeX-arg-key-val LaTeX-geometry-always-key-val-options))
+
+ '("restoregeometry" 0)
+
+ '("savegeometry"
+ (TeX-arg-eval
+ (lambda ()
+ (let ((name (TeX-read-string "Name: ")))
+ (LaTeX-add-geometry-savegeometries name)
+ (format "%s" name)))))
+
+ '("loadgeometry"
+ (TeX-arg-eval
+ (lambda ()
+ (completing-read "Name: "
+ (LaTeX-geometry-savegeometry-list))))))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("geometry" "{")
+ ("newgeometry" "{")
+ ("savegeometry" "{")
+ ("loadgeometry" "{"))
+ 'function)))
+ LaTeX-dialect)
+
+(defun LaTeX-geometry-package-options ()
+ "Prompt for package options for the geometry package."
+ (TeX-read-key-val t
+ (append LaTeX-geometry-preamble-key-val-options
+ LaTeX-geometry-always-key-val-options)))
+
+;;; geometry.el ends here
- [elpa] externals/auctex 074af82 16/35: Add docs for LaTeX-fill-excluded-macros, (continued)
- [elpa] externals/auctex 074af82 16/35: Add docs for LaTeX-fill-excluded-macros, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 61ed48c 19/35: Replace add-to-list with pushnew, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 31c42ca 23/35: Indent \[...\] display math as a normal environment., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 41c5f9a 24/35: Improve error/warning reporting when file cannot be determined., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 59f9440 26/35: Fix void-function error occuring if cl is not loaded, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 4034de2 21/35: New style for caption.sty., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex a2a4777 25/35: Add TeX-after-TeX-LaTeX-command-finished-hook, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex b853739 17/35: Add uninstall rules to Makefiles., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex d23de0a 18/35: Style for bidibeamer which delegates to beamer, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex a375093 20/35: New style enumitem.el, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 69b02a0 22/35: New style for geometry.sty.,
Tassilo Horn <=
- [elpa] externals/auctex 003f475 28/35: New style ltablex.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex f16c051 31/35: Fix header of style/mn2e.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 8d7fef3 27/35: Improve styles enumitem.el and caption.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 6896a4c 32/35: Fix of the fix. Really., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex fd04166 29/35: New style ltxtable.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex b1e9217 30/35: Style file for mn2e.cls., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex ca40c6a 33/35: Fix a broken link in documentation., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 6620d8c 35/35: Merge from upstream master; release 11.88.3, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 17f5888 34/35: Merge branch 'master' into elpa, Tassilo Horn, 2015/03/22