# HG changeset patch # User Uwe Brauer # Date 1591563340 -7200 # Sun Jun 07 22:55:40 2020 +0200 # Branch algpseudo # Node ID 5a22e1099c05147407959b8fa5b1bc3f93465af7 # Parent ab505643f81b52c00184083028256c9fbff26108 Add support for algopseudocde style * Makefile.in (STYLESRC): Add algopseudocde style * style/algpseudocode.el: Add support for the algopseudocde (algorithmcx) style diff -r ab505643f81b -r 5a22e1099c05 Makefile.in --- a/Makefile.in Sun Jun 07 21:24:43 2020 +0900 +++ b/Makefile.in Sun Jun 07 22:55:40 2020 +0200 @@ -172,7 +172,7 @@ style/changelog.el style/ltugboat.el style/beamerswitch.el \ style/multitoc.el style/fbox.el style/xkcdcolors.el \ style/ltxguide.el style/revtex4-2.el style/overpic.el \ - style/tex-live.el + style/tex-live.el style/algpseudocode.el \ STYLEELC = $(STYLESRC:.el=.elc) diff -r ab505643f81b -r 5a22e1099c05 style/algpseudocode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/style/algpseudocode.el Sun Jun 07 22:55:40 2020 +0200 @@ -0,0 +1,77 @@ +;;; algpseudocode.el --- AUCTeX style for the (LaTeX) algpseudocode package + +;; Copyright (C) 2016--2018 Free Software Foundation, Inc. + +;; Author: Uwe Brauer +;; Created: 2019-10-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 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 algpseudocode package. + +;;; Code: + +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-algpseudocode-package-options + '("compatible" "nocompatible") + "Package options for the algpseudocode package.") + + +(TeX-add-style-hook + "algpseudocode" + (lambda () + (TeX-add-symbols + '("algref" 2) + '("algstore" 1) + '("algrestore" 1) + '("algstore*" 1) + '("algrestore*" 1) + '("Procedure" 2) + '("Comment" 1) + '("State" 0) + '("While" 0) + '("EndWhile" 0) + '("EndProcedure" 0) + '("Repeat" 0) + '("Until" 0) + '("For" 1) + '("ForAll" 1) + '("EndFor" 0) + '("If" 1) + '("ElsIf" 1) + '("Else" 0) + '("EndIf" 0) + '("Function" 2) + '("EndFunction" 0) + '("Loop" 0) + '("EndLoop" 0) + '("Require" 0) + '("Ensure" 0) + '("State" 0) + '("Statex" 0) + '("Call" 0)) + (LaTeX-add-environments + '("algorithmic" [ "Number" ])) + LaTeX-dialect)) + +;;; algpseudocode.el ends here