From 543b9d366e20b2110757b2565bcdd0b4b29bb2aa Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 27 Feb 2006 11:08:15 +0000 Subject: [PATCH] (chise-tex-coded-charset-expression-alist): Add setting for `=ruimoku-v6'. (chise-tex-encode-region-for-jis): Don't decompose ; add settings for and ; support some double accents; support , , , , , and . --- chise2otf/elisp/chise-tex.el | 46 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/chise2otf/elisp/chise-tex.el b/chise2otf/elisp/chise-tex.el index 65ad4b1..6936160 100644 --- a/chise2otf/elisp/chise-tex.el +++ b/chise2otf/elisp/chise-tex.el @@ -39,6 +39,7 @@ (=gt-pj-9 "GTpjI" 4 X) (=gt-pj-10 "GTpjJ" 4 X) (=gt-pj-11 "GTpjK" 4 X) + (=ruimoku-v6 "Ruimoku" 4 X) (=ucs-bmp@cns "UCScns" 4 X))) (defun chise-tex-encode-region-for-gb (start end) @@ -92,7 +93,7 @@ (save-restriction (narrow-to-region start end) (goto-char start) - (let (chr ret rest spec modifier) + (let (chr ret rest spec modifier base modifier-1) (while (and (skip-chars-forward "\x00-\x7F") (not (eobp))) (setq chr (char-after)) @@ -101,7 +102,8 @@ ;; ((setq ret (encode-char chr '=jis-x0208-1990)) ;; (delete-char) ;; (insert (decode-char '=jis-x0208-1983 ret))) - ((and (not (eq (char-ucs chr) #x0451)) + ((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) '((?\u0300 . "`") @@ -109,14 +111,31 @@ (?\u0302 . "^") (?\u0303 . "~") (?\u0304 . "=") + (?\u0306 . "u") (?\u0307 . ".") (?\u0308 . "\"") + (?\u0309 . "Hook") (?\u030C . "v") (?\u0323 . "d") (?\u0327 . "c") )))) (delete-char) - (insert (format "\\%s{%c}" (cdr modifier) (car ret)))) + (setq base (car ret)) + (if (and (setq ret (char-feature base '=decomposition)) + (setq modifier-1 + (assq (car modifier) + (cdr + (assq (nth 1 ret) + '((?\u0302 + (?\u0301 . "CircAcute") + (?\u0303 . "CircTilde") + (?\u0309 . "CircHook") + ) + (?\u0323 + (?\u0302 . "Circudot") + ))))))) + (insert (format "\\%s{%c}" (cdr modifier-1) (car ret))) + (insert (format "\\%s{%c}" (cdr modifier) base)))) ((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) @@ -137,9 +156,30 @@ ;; (if (eq (char-before) ?《) ;; (insert " ")) (insert (format "\\UCSks{%04X}" ret))) + ((eq chr ?\u00B2) + (delete-char) + (insert "$^2$")) + ((eq chr ?\u00B3) + (delete-char) + (insert "$^3$")) + ((eq chr ?\u0111) + (delete-char) + (insert "{\\usefont{T1}{pxr}{m}{n}\\dj}")) + ((eq chr ?\u014B) + (delete-char) + (insert "{\\usefont{T1}{pxr}{m}{n}\\ng}")) + ((eq chr ?\u0282) + (delete-char) + (insert "{\\usefont{T1}{pxr}{m}{n}\\k{s}}")) ((eq chr ?\u2022) (delete-char) (insert "\\textbullet{}")) + ((eq chr ?\u2083) + (delete-char) + (insert "$_3$")) + ((eq chr ?\u2085) + (delete-char) + (insert "$_5$")) ((eq chr ?\u0294) (delete-char) (insert "\\UCSjis{0294}")) -- 1.7.10.4