diff options
author | mattkae <mattkae@protonmail.com> | 2022-06-07 08:23:47 -0400 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-06-07 08:23:47 -0400 |
commit | bd18a38c2898548a3664a9ddab9f79c84f2caf4a (patch) | |
tree | 95b9933376770381bd8859782ae763be81c2d72b /elpa/auctex-13.1.3/style/algorithm.el | |
parent | b07628dddf418d4f47b858e6c35fd3520fbaeed2 (diff) | |
parent | ef160dea332af4b4fe5e2717b962936c67e5fe9e (diff) |
Merge conflict
Diffstat (limited to 'elpa/auctex-13.1.3/style/algorithm.el')
-rw-r--r-- | elpa/auctex-13.1.3/style/algorithm.el | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/elpa/auctex-13.1.3/style/algorithm.el b/elpa/auctex-13.1.3/style/algorithm.el deleted file mode 100644 index 8500f44..0000000 --- a/elpa/auctex-13.1.3/style/algorithm.el +++ /dev/null @@ -1,80 +0,0 @@ -;;; algorithm.el --- AUCTeX style for the (LaTeX) algorithm package -*- lexical-binding: t; -*- - -;; Copyright (C) 2020 Free Software Foundation, Inc. - -;; Author: Uwe Brauer <oub@mat.ucm.es> -;; Created: 2020-01-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 algorithm package. - -;;; Code: - -(require 'tex) -(require 'latex) - -(defvar LaTeX-algorithm-package-options - '(;; Appearance options: - "plain" "ruled" "boxed" - ;; Numbering convention: - "part" "chapter" "section" "subsection" "subsubsection" "nothing") - "Package options for the algorithm package.") - -(defun LaTeX-env-algorithm (environment) - "Insert a algorithm-like ENVIRONMENT with caption and label." - (let* ((pos (completing-read (TeX-argument-prompt t nil "Position") - '(("H")))) - (caption (TeX-read-string "Caption: ")) - (short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length) - (TeX-read-string "(Optional) Short caption: ")))) - (LaTeX-insert-environment environment - (concat - (unless (zerop (length pos)) - (concat LaTeX-optop pos LaTeX-optcl)))) - ;; top caption -- do nothing if user skips caption - (unless (zerop (length caption)) - ;; insert `\caption[short-caption]{caption': - (insert TeX-esc "caption") - (when (and short-caption (not (string= short-caption ""))) - (insert LaTeX-optop short-caption LaTeX-optcl)) - (insert TeX-grop caption) - ;; Add } to close `\caption{' - (insert TeX-grcl) - ;; fill the caption - (when auto-fill-function (LaTeX-fill-paragraph)) - ;; Insert a new line and indent - (LaTeX-newline) - (indent-according-to-mode) - ;; Finally add a \label: - (when (LaTeX-label environment 'environment) - (LaTeX-newline) - (indent-according-to-mode))))) - -(TeX-add-style-hook - "algorithm" - (lambda () - (LaTeX-add-environments - '("algorithm" LaTeX-env-algorithm)) - (TeX-add-symbols - '("listofalgorithms" 0))) - TeX-dialect) - -;;; algorithm.el ends here |