;;; Code:
(defvar chise-tex-coded-charset-expression-alist
- '((=ucs@gb "UCSgb" 4 X)
+ '((=ucs-hangul "UCShang" 4 X)
+ (=ucs@gb "UCSgb" 4 X)
(=ucs@jis "UCSjis" 4 X)
+ (=ucs@jis/2000 "UCSjis" 4 X)
+ (=ucs@ks "UCSks" 4 X)
(=gt-pj-1 "GTpj1" 4 X)
(=gt-pj-2 "GTpj2" 4 X)
(=gt-pj-3 "GTpj3" 4 X)
(=gt-pj-9 "GTpj9" 4 X)
(=gt-pj-10 "GTpj10" 4 X)
(=gt-pj-11 "GTpj11" 4 X)
- (=ucs@ks "UCSks" 4 X)
(=ucs@cns "UCScns" 4 X)))
(defun chise-tex-encode-region-for-gb (start end)
;; ((setq ret (encode-char chr '=jis-x0208-1990))
;; (delete-char)
;; (insert (decode-char '=jis-x0208-1983 ret)))
+ ((and (or (encode-char chr '=jis-x0213-1-2000)
+ (encode-char chr '=jis-x0213-2-2000))
+ (setq ret (or (encode-char chr '=ucs@jis/2000)
+ (encode-char chr '=ucs@jis/fw))))
+ (delete-char)
+ ;; (if (eq (char-before) ?\e$B!T\e(B)
+ ;; (insert " "))
+ (insert (format "\\UCSjis{%04X}" ret)))
+ ((setq ret (encode-char chr '=ucs-hangul))
+ (delete-char)
+ ;; (if (eq (char-before) ?\e$B!T\e(B)
+ ;; (insert " "))
+ (insert (format "\\UCSks{%04X}" ret)))
+ ((eq chr ?\u2022)
+ (delete-char)
+ (insert "\\textbullet{}"))
+ ((eq chr ?\u0294)
+ (delete-char)
+ (insert "\\UCSjis{0294}"))
+ ((and (encode-char chr '=ucs@jp)
+ (setq ret (char-representative-of-domain chr 'gb))
+ (setq ret (encode-char ret '=ucs@gb)))
+ (delete-char)
+ ;; (if (eq (char-before) ?\e$B!T\e(B)
+ ;; (insert " "))
+ (insert (format "\\UCSgb{%04X}" ret)))
((catch 'tag
(setq rest chise-tex-coded-charset-expression-alist)
(while (setq spec (car rest))
(save-restriction
(narrow-to-region start end)
(goto-char start)
- (let (macro code ret ms me)
+ (let (macro code ret me rest spec)
(while (re-search-forward "\\\\\\([a-zA-Z0-9]+\\){\\([0-9A-Fa-f]+\\)}"
nil t)
(setq macro (match-string 1)
code (match-string 2)
- ms (match-beginning 0)
me (match-end 0))
(if (and (catch 'tag
(setq rest chise-tex-coded-charset-expression-alist)