[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex be90f4f97b 2/2: Add new style/stocksize.el
From: |
ELPA Syncer |
Subject: |
[elpa] externals/auctex be90f4f97b 2/2: Add new style/stocksize.el |
Date: |
Tue, 26 Nov 2024 12:57:30 -0500 (EST) |
branch: externals/auctex
commit be90f4f97b8161316b29df2f0a8c7bcb0166fbc5
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Add new style/stocksize.el
* NEWS.org (Added): Announce new style.
* style/stocksize.el: New file.
---
NEWS.org | 5 +++--
style/stocksize.el | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/NEWS.org b/NEWS.org
index df1bbc6ce0..a873d2112c 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -24,8 +24,9 @@
- Add new custom option ~TeX-fold-alert-color~ which determines the
color used when folding the ~\alert~ macro, defaults to ~red~.
-- Add new support files =style/inlinegraphicx.el= and =style/minted2.el=
- (=style/minted.el= is updated to package v3.1.2).
+- Add new support files =style/inlinegraphicx.el=, =style/minted2.el=
+ (=style/minted.el= is updated to package v3.1.2) and
+ =style/stocksize.el=.
- Add preliminary support for parsing =\graphicspath= in
=style/graphicx.el=.
diff --git a/style/stocksize.el b/style/stocksize.el
new file mode 100644
index 0000000000..d342e8a694
--- /dev/null
+++ b/style/stocksize.el
@@ -0,0 +1,62 @@
+;;; stocksize.el - AUCTeX style for `stocksize.sty' (v1.0.3) -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2024 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash@gnu.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2024-11-26
+;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file adds support for `stocksize.sty' (v1.0.3) from 2024/11/23.
+
+;;; Code:
+
+(require 'tex)
+(require 'latex)
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords "font-latex" (keywords class))
+
+(TeX-add-style-hook
+ "stocksize"
+ (lambda ()
+
+ ;; Run the style hook `geometry.sty':
+ (TeX-run-style-hooks "geometry")
+
+ (TeX-add-symbols
+ '("newstocksize"
+ (TeX-arg-key-val (lambda ()
+ (append '(("keepmargins" ("true" "false")))
+ LaTeX-geometry-always-key-val-options))))
+ '("restorestocksize" 0))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("newstocksize" "{")
+ ("restorestocksize" ""))
+ 'function)))
+ TeX-dialect)
+
+(defvar LaTeX-stocksize-package-options nil
+ "Package options for the stocksize package.")
+
+;;; stocksize.el ends here