From: MORIOKA Tomohiko Date: Wed, 25 Aug 2010 09:08:48 +0000 (+0000) Subject: (chise-tex-coded-charset-expression-alist): Add setting for X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=117a083619c98e5fe744856c58cda06c8c293561;p=chise%2Fuptex-chise.git (chise-tex-coded-charset-expression-alist): Add setting for `=adobe-japan1-5'. (chise-tex-accents-macro-alist): Add setting for . (chise-tex-encode-ucs-char-at-point): - Encode as "\i{}". - Use "\LATINeng{}" to encode . - Encode as "\textscripta{}". - Encode as "\IPAepsilon{}". - Encode as "\IPAiota{}". - Encode as "\IPArevfishhookr{}". - Encode as \textrevapostrophe{}. - Encode as "$^4$". (chise-tex-encode-region-for-utf-8-jis): - Don't encode . - Encode as "\oe{}". - Encode SIP characters as "\UCSsip{XXXXX}". --- diff --git a/elisp/chise-tex.el b/elisp/chise-tex.el index 041144d..834a6f3 100644 --- a/elisp/chise-tex.el +++ b/elisp/chise-tex.el @@ -37,9 +37,12 @@ char))) (defvar chise-tex-coded-charset-expression-alist - '((=ucs-bmp@gb "UCSgb" 4 X) + '((=adobe-japan1-5 "AdobeJP" 5 d) + (=ucs-bmp@gb "UCSgb" 4 X) (=ucs-bmp@jis "UCSjis" 4 X) (=ucs-bmp@ks "UCSks" 4 X) + ;; (=ucs-sip-ext-b "ucsSIP" 4 X) + ;; (=ucs-sip-ext-b@iso "ucsSIP" 4 X) (=gt-pj-1 "GTpjA" 4 X) (=gt-pj-2 "GTpjB" 4 X) (=gt-pj-3 "GTpjC" 4 X) @@ -85,6 +88,7 @@ (?\u0309 . "Hook") (?\u030B . "H") ; (?\u030C . "v") ; + (?\u031B . "Horn") ; ((?\u031B ?\u0301) . "HornAcute") ((?\u031B ?\u0303) . "HornTilde") (?\u0323 . "d") ; @@ -175,30 +179,51 @@ (delete-char) (insert "{\\usefont{T1}{pxr}{m}{n}\\dj}") t) + ((eq chr ?\u0131) + (delete-char) + (insert "\\i{}") + t) ((eq chr ?\u0142) (delete-char) (insert "\\l{}") t) ((eq chr ?\u014B) (delete-char) - (insert "{\\usefont{T1}{pxr}{m}{n}\\ng}") + ;; (insert "{\\usefont{T1}{pxr}{m}{n}\\ng}") + (insert "\\LATINeng{}") t) ((eq chr ?\u0250) (delete-char) (insert "\\textturna{}") t) + ((eq chr ?\u0251) + (delete-char) + (insert "\\textscripta{}") + t) ((eq chr ?\u0254) (delete-char) (insert "\\textopeno{}") t) + ((eq chr ?\u025B) + (delete-char) + (insert "\\IPAepsilon{}") + t) ((eq chr ?\u0264) (delete-char) (insert "\\textramshorns{}") t) + ((eq chr ?\u0269) + (delete-char) + (insert "\\IPAiota{}") + t) ((eq chr ?\u026F) (delete-char) (insert "\\textturnm{}") t) + ((eq chr ?\u027F) + (delete-char) + (insert "\\IPArevfishhookr{}") + t) ((eq chr ?\u0282) (delete-char) (insert "{\\usefont{T1}{pxr}{m}{n}\\k{s}}") @@ -208,10 +233,18 @@ ;; (insert "\\UCSjis{0294}") (insert "\\textglotstop{}") t) + ((eq chr ?\u02BF) + (delete-char) + (insert "\\textrevapostrophe{}") + t) ((eq chr ?\u2022) (delete-char) (insert "\\textbullet{}") t) + ((eq chr ?\u2074) + (delete-char) + (insert "$^4$") + t) ((eq chr ?\u2075) (delete-char) (insert "$^5$") @@ -327,7 +360,9 @@ ;; ((setq ret (encode-char chr '=jis-x0208-1990)) ;; (delete-char) ;; (insert (decode-char '=jis-x0208-1983 ret))) - ((and (not (eq (char-ucs chr) #x0439)) + ((encode-char chr '=jis-x0208-1983) + (forward-char)) + ((and (not (eq (char-ucs chr) #x0439)) (not (eq (char-ucs chr) #x0451)) (setq ret (char-feature chr '=decomposition)) (setq modifier (assq (nth 1 ret) @@ -467,6 +502,7 @@ ((and (setq ret (char-ucs chr)) (or (eq ret #x00C5) (eq ret #x00E5) + (eq ret #x015B) (eq ret #x1E2B) )) (forward-char)) @@ -505,33 +541,16 @@ (car ret) base (cdr ret))) (insert (format "\\%s{%c}" ret base)))) (forward-char)) - ;; (if (and (setq ret (char-feature base '=decomposition)) - ;; (setq modifier-1 - ;; (assq - ;; (car modifier) - ;; (cdr - ;; (assq - ;; (nth 1 ret) - ;; '((?\u0302 - ;; (?\u0300 . "\\CircGrave{%c}") - ;; (?\u0301 . "\\'{\\^%c}") - ;; (?\u0303 . "\\~{\\^%c}") - ;; (?\u0309 . "\\CircHook{%c}") - ;; ) - ;; (?\u0304 ; - ;; (?\u0301 ; - ;; . "\\textacutemacron{%c}") - ;; ) - ;; (?\u031B - ;; (?\u0301 . "\\HornAcute{%c}") - ;; (?\u0303 . "\\HornTilde{%c}") - ;; ) - ;; (?\u0323 - ;; (?\u0302 . "\\Circudot{%c}") - ;; ))))))) - ;; (insert (format (cdr modifier-1) (car ret))) - ;; (insert (format "\\%s{%c}" (cdr modifier) base))) - ) + ) + ((eq (encode-char chr '=ucs@jis) #x0153) + (delete-char) + (insert "\\oe{}") + t) + ((and (setq ret (encode-char chr '=ucs@JP)) + (>= ret #x20000)) + (delete-char) + (insert (format "\\UCSsip{%X}" ret)) + t) ((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)