diff options
author | mattkae <mattkae@protonmail.com> | 2022-05-17 07:07:37 -0400 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-05-17 07:07:37 -0400 |
commit | becff06c71d277647eda4378203d03ab36e141eb (patch) | |
tree | a1f73bba3676f34e0faf76764f5de963321f5576 /elpa/auctex-13.1.3/style/CJK.el | |
parent | 3f4a0d5370ae6c34afe180df96add3b8522f4af1 (diff) |
Evil mode and latex support
Diffstat (limited to 'elpa/auctex-13.1.3/style/CJK.el')
-rw-r--r-- | elpa/auctex-13.1.3/style/CJK.el | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/elpa/auctex-13.1.3/style/CJK.el b/elpa/auctex-13.1.3/style/CJK.el new file mode 100644 index 0000000..baee5d9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/CJK.el @@ -0,0 +1,97 @@ +;;; CJK.el --- AUCTeX style for the CJK package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2009-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-01-04 +;; 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 CJK package, version 4.8.0 +;; (22-May-2008). + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-CJK-package-options + '("lowercase" "global" "local" "active" "encapsulated") + "Package options for the CJK package.") + +(defvar LaTeX-CJK-enc-list + '("Bg5" "Bg5+" "HK" "GB" "GBt" "GBK" "JIS" "JIS2" "SJIS" "KS" "UTF8" "CNS1" + "CNS2" "CNS3" "CNS4" "CNS5" "CNS6" "CNS7" "CEFX" "CEFY") + "List of encodings supported by the CJK package.") + +(defun LaTeX-env-CJK (env) + "Prompt for the arguments of ENV and insert it. +The function can be used for CJK and CJK* environments." + (LaTeX-insert-environment + env + (concat + (let ((font-enc (TeX-read-string "(Optional) Font encoding: "))) + (unless (zerop (length font-enc)) (format "[%s]" font-enc))) + (format "{%s}" (completing-read "Encoding: " + (mapcar #'list LaTeX-CJK-enc-list))) + (format "{%s}" (TeX-read-string "Font family: "))))) + +(TeX-add-style-hook + "CJK" + (lambda () + ;; New symbols + (TeX-add-symbols + '("CJKencfamily" ["Font encoding"] "Encoding" "Font family") + '("CJKchar" ["Encoding"] "First byte" "Second byte") + '("CJKcaption" 1) + '("CJKfamily" 1) + '("CJKfontenc" "Encoding" "Font encoding") + '("CJKenc" 1) + '("Unicode" "First byte" "Second byte") + '("CJKsymbols" 2) + '("CJKsymbol" 1) + "CJKbold" + "CJKnormal" + "CJKboldshift" + "CJKCJKchar" + "CJKhangulchar" + "CJKlatinchar" + "CJKhwkatakana" + "CJKnohwkatakana" + "CJKglue" + "CJKtolerance" + "CJKtilde" + "nbs" + "standardtilde" + "CJKspace" + "CJKnospace" + "CJKindent" + '("CJKaddEncHook" 2) + "CJKkern" + "CJKverbatim") + ;; New environments + (LaTeX-add-environments + '("CJK" LaTeX-env-CJK) + '("CJK*" LaTeX-env-CJK))) + TeX-dialect) + +;;; CJK.el ends here |