auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] [elpa] externals/auctex 1de2359 13/57: Add new style/titl


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex 1de2359 13/57: Add new style/titlesec.el
Date: Wed, 11 Jan 2017 18:01:38 +0000 (UTC)

branch: externals/auctex
commit 1de2359a3dda4488c714ced5d801b5f14143db32
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Add new style/titlesec.el
    
    * Makefile.in (STYLESRC): Add new style.
    
    * style/titlesec.el: New file.
---
 Makefile.in       |    2 +-
 style/titlesec.el |  255 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 256 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 35d7753..5a4aea4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -160,7 +160,7 @@ STYLESRC = style/prosper.el \
           style/bidi.el      style/FiraMono.el  style/FiraSans.el \
           style/bicaption.el style/amsfonts.el  style/subfiles.el \
           style/dcolumn.el   style/mdframed.el  style/tcolorboxlib-raster.el \
-          style/titleps.el
+          style/titleps.el   style/titlesec.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/titlesec.el b/style/titlesec.el
new file mode 100644
index 0000000..c17d8bb
--- /dev/null
+++ b/style/titlesec.el
@@ -0,0 +1,255 @@
+;;; titlesec.el --- AUCTeX style for `titlesec.sty' (v2.10.0)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash.esbati'at'gmail.com>
+;; Maintainer: address@hidden
+;; Created: 2015-09-19
+;; 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 `titlesec.sty' (v2.10.0) from
+;; 2011/12/15.  `titlesec.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-titlesec-key-val-options
+  '(("page" ("even" "odd"))
+    ("numberless"))
+  "Key=value options for \"\titleformat\" and \"\titlespacing\"
+macros provided by \"titlesec.sty\".")
+
+(defvar LaTeX-titlesec-section-command-list
+  '("part"
+    "chapter"
+    "section"
+    "subsection"
+    "subsubsection"
+    "paragraph"
+    "subparagraph")
+  "List of sectioning commands available in \"titlesec.sty\".")
+
+(defvar LaTeX-titlesec-section-shape-list
+  '("hang"
+    "block"
+    "display"
+    "runin"
+    "leftmargin"
+    "rightmargin"
+    "drop"
+    "wrap"
+    "frame")
+  "List of sectioning shapes available for \"\titleformat\" command.")
+
+(defun LaTeX-titlesec-section-command-list ()
+  "Remove \"chapter\" from variable
+`LaTeX-titlesec-section-command-list' and return the remainder.
+Removal is based on the return value of function
+`LaTeX-largest-level'.  Items returned are prefixed with
+`TeX-esc'."
+  (mapcar (lambda (elt) (concat TeX-esc elt))
+         (if (< (LaTeX-largest-level) 2)
+             (symbol-value 'LaTeX-titlesec-section-command-list)
+           (remove "chapter" LaTeX-titlesec-section-command-list))))
+
+(defun LaTeX-arg-titlesec-titlespec (optional)
+  "Insert the first argument of \"\titleformat\" and \"\titlespacing\"


reply via email to

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