auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex 225bade 14/57: Add new style/titl


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

branch: externals/auctex
commit 225badee0ec3f169a1a87227fce14cb5b326d054
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

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

diff --git a/Makefile.in b/Makefile.in
index 5a4aea4..1efcdd1 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/titlesec.el
+          style/titleps.el   style/titlesec.el  style/titletoc.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/titletoc.el b/style/titletoc.el
new file mode 100644
index 0000000..5cad560
--- /dev/null
+++ b/style/titletoc.el
@@ -0,0 +1,206 @@
+;;; titletoc.el --- AUCTeX style for `titletoc.sty' (v1.6)
+
+;; 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 `titletoc.sty' (v1.6) from
+;; 2011/12/15.  `titletoc.sty' is part of TeXLive.
+
+;;; Code:
+
+(defvar LaTeX-titletoc-section-command-list
+  '("part"
+    "chapter"
+    "section"
+    "subsection"
+    "subsubsection"
+    "paragraph"
+    "subparagraph"
+    "figure"
+    "table")
+  "List of sectioning commands available in \"titletoc.sty\".
+Other environments producing a \"Table of ENVIRONMENT\" (figure,
+table) are also available in this variable.")
+
+(defun LaTeX-titletoc-section-command-list ()
+  "Remove \"chapter\" from variable
+`LaTeX-titletoc-section-command-list' and return the remainder.
+Removal is based on the return value of function
+`LaTeX-largest-level'."
+  (if (< (LaTeX-largest-level) 2)
+      (symbol-value 'LaTeX-titletoc-section-command-list)
+    (remove "chapter" LaTeX-titletoc-section-command-list)))
+
+;; Needed for auto-parsing.
+(require 'tex)
+
+;; Setup for



reply via email to

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