In case the hg patch cannot be imported here is a sort of experimental
patch using the git-hg plugin

Uwe Brauer 
>From f502f9da2f10c4df1524c24c62eca1248a6c1f4c Mon Sep 17 00:00:00 2001
From: Uwe Brauer <o...@mat.ucm.es>
Date: Sun, 14 Aug 2016 08:48:55 +0000
Subject: [PATCH] Add new style file style/exam.el, modify Makefile

---
 Makefile.in   |  2 +-
 style/exam.el | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 style/exam.el

diff --git a/Makefile.in b/Makefile.in
index 28be5c2..b5dd0e6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -155,7 +155,7 @@ STYLESRC = style/prosper.el \
 	   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
 	   style/hologo.el    style/theorem.el   style/ntheorem.el \
 	   style/splitidx.el  style/tikz.el      style/xcolor.el \
-	   style/pdflscape.el style/commath.el
+	   style/pdflscape.el style/commath.el   style/exam.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/exam.el b/style/exam.el
new file mode 100644
index 0000000..4825698
--- /dev/null
+++ b/style/exam.el
@@ -0,0 +1,62 @@
+;;; exam.el --- AUCTeX style for the (LaTeX) exam package
+
+;; Copyright (C) 2016 Free Software Foundation
+
+;; Author: Uwe Brauer <o...@mat.ucm.es>
+;; Created: 2016-03-06
+;; 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 the exam package.
+
+;;; Code:
+
+(defvar LaTeX-exam-class-options '("answers" "rldocument")
+  "Package options for the exam package.")
+
+(TeX-add-style-hook "exam"
+ (lambda ()
+   (LaTeX-add-environments
+    "questions"
+    "solution"
+    "solutionorbox"
+    "parts"
+    "subparts"
+    "subsubparts")
+   (TeX-add-symbols
+    '("droppoints" 0)
+    '("part" TeX-arg-examn-points 0)
+    '("subpart" TeX-arg-examn-points 0)
+    '("subsubpart" TeX-arg-examn-points 0)
+    '("droptotalpoints" 0)
+    '("RL" 1)
+    '("titledquestion" "Title" ["Points"]  TeX-arg-label)
+    '("question"  ["Points"] TeX-arg-label)))
+ LaTeX-dialect)
+
+
+
+
+
+
+
+
+;;; exam.el ends here
-- 
1.9.1

_______________________________________________
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to