# HG changeset patch # User Uwe Brauer # Date 1533328507 -7200 # Fri Aug 03 22:35:07 2018 +0200 # Node ID 2d2945bc42b73f5226f6335dac106174859b96c1 # Parent e1cedca64f075aa87253a4261c56181b4c6b0687 Add support for ocgx style. * Makefile.in (STYLESRC): add style/ocgx.el * style/ocgx.el: new style file diff --git a/Makefile.in b/Makefile.in --- a/Makefile.in +++ b/Makefile.in @@ -169,7 +169,7 @@ style/floatrow.el style/moodle.el style/canadian.el \ style/arabxetex.el style/australian.el style/newzealand.el \ style/xltabular.el style/marginnote.el style/thmtools.el \ - style/thm-restate.el + style/thm-restate.el style/ocgx.el \ STYLEELC = $(STYLESRC:.el=.elc) diff --git a/style/ocgx.el b/style/ocgx.el new file mode 100644 --- /dev/null +++ b/style/ocgx.el @@ -0,0 +1,62 @@ +;;; ocgx.el --- Support for the ocgx pkg. + +;; Copyright (C) 2018 Uwe Brauer + +;; Author: Uwe Brauer address@hidden +;; Maintainer: Uwe Brauer address@hidden +;; Created: 03 Aug 2018 +;; Version: 1.0 +;; Keywords: + + +;; This program 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. + +;; This program 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. + +;; A copy of the GNU General Public License can be obtained from this +;; program's author (send electronic mail to address@hidden) or from +;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA +;; 02139, USA. + +;; LCD Archive Entry: +;; ocgx|Uwe Brauer|address@hidden +;; |Support for the ocgx pkg. +;; |$Date$|$Revision$|~/packages/ocgx.el + +;;; Commentary: + +;;; Code: + + +(TeX-add-style-hook + "ocgx" + (lambda () + (TeX-run-style-hooks "article") + (LaTeX-add-environments + '("ocg" "OGC name" "Source" "0/1" )) + + + (TeX-add-symbols + '("switchocg" "Source" "Text" (TeX-arg-literal " ")) + '("showocg" "Source" "Text" (TeX-arg-literal " ")) + '("hideocg" "Source" "Text" (TeX-arg-literal " ")) + '("actionocg" "Source1" "Source2" "Source3" "Text" (TeX-arg-literal " ")) + ;; ... more stuff here + ) + + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("ocg" "{")) + 'textual))) + LaTeX-dialect) + + +;;; ocgx.el ends here