auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] Changes to CJK.el


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to CJK.el
Date: Sun, 04 Jan 2009 14:52:14 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    09/01/04 14:52:14

Index: CJK.el
===================================================================
RCS file: CJK.el
diff -N CJK.el
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ CJK.el      4 Jan 2009 14:52:14 -0000       1.1
@@ -0,0 +1,93 @@
+;;; CJK.el --- AUCTeX style for the CJK package.
+
+;; Copyright (C) 2009 Free Software Foundation, Inc.
+
+;; Author: Ralf Angeli <address@hidden>
+;; Maintainer: address@hidden
+;; 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:
+
+(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 (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}" (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))))
+
+;;; CJK.el ends here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]