;;; chise-tex.el --- Coding-system based chise2otf like tool
-;; Copyright (C) 2004,2005,2006,2007 MORIOKA Tomohiko
+;; Copyright (C) 2004,2005,2006,2007,2008 MORIOKA Tomohiko
;; Author: MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
;; Keywords: OTF package, pTeX, CHISE, Multiscript, Multilingual
(=gt-pj-10 "GTpjJ" 4 X)
(=gt-pj-11 "GTpjK" 4 X)
(=ruimoku-v6 "Ruimoku" 4 X)
- (=ucs-bmp@cns "UCScns" 4 X)))
+ (=hanziku-1 "HanzikuA" 4 X)
+ (=hanziku-2 "HanzikuB" 4 X)
+ (=hanziku-3 "HanzikuC" 4 X)
+ (=hanziku-4 "HanzikuD" 4 X)
+ (=hanziku-5 "HanzikuE" 4 X)
+ (=hanziku-6 "HanzikuF" 4 X)
+ (=hanziku-7 "HanzikuG" 4 X)
+ (=hanziku-8 "HanzikuH" 4 X)
+ (=hanziku-9 "HanzikuI" 4 X)
+ (=hanziku-10 "HanzikuJ" 4 X)
+ (=hanziku-11 "HanzikuK" 4 X)
+ (=hanziku-12 "HanzikuL" 4 X)
+ (=ucs-bmp@cns "UCScns" 4 X)
+ ))
(defun chise-tex-encode-region-for-gb (start end)
(interactive "r")
((eq chr ?\u2022)
(delete-char)
(insert "\\textbullet{}"))
+ ((eq chr ?\u2081)
+ (delete-char)
+ (insert "$_1$"))
+ ((eq chr ?\u2082)
+ (delete-char)
+ (insert "$_2$"))
((eq chr ?\u2083)
(delete-char)
(insert "$_3$"))
(narrow-to-region start end)
(goto-char start)
(let (macro code ret me rest spec)
+ (while (re-search-forward "\\\\\\(.\\){\\(.\\)}" nil t)
+ (when (and
+ (setq macro
+ (assq
+ (aref (match-string 1) 0)
+ '((?\` . ?\u0300) ; <COMBINING GRAVE ACCENT>
+ (?\' . ?\u0301) ; <COMBINING ACUTE ACCENT>
+ (?^ . ?\u0302) ; <COMBINING CIRCUMFLEX ACCENT>
+ (?~ . ?\u0303) ; <COMBINING TILDE>
+ (?= . ?\u0304) ; <COMBINING MACRON>
+ (?\. . ?\u0307) ; <COMBINING DOT ABOVE>
+ (?\" . ?\u0308) ; <COMBINING DIAERESIS>
+ (?d . ?\u0323) ; <COMBINING DOT BELOW>
+ )))
+ (setq ret
+ (cdr (assq (cdr macro)
+ (char-feature (aref (match-string 2) 0)
+ 'composition)))))
+ (delete-region (match-beginning 0)(match-end 0))
+ (insert ret)))
+ (goto-char start)
(while (re-search-forward "\\\\\\([a-zA-Z0-9]+\\){\\([0-9A-Fa-f]+\\)}"
nil t)
(setq macro (match-string 1)