From 295eb0a6cf796224bc476e6d36eabfa3baa7031a Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Thu, 29 Jan 2009 06:15:35 +0000 Subject: [PATCH] (chise-tex-encode-region-for-utf-8-jis): Use \CyrillicScript{...} and \GreekScript{...} instead of \fontencoding{T2A|LGR}\selectfont{}. --- elisp/chise-tex.el | 53 +++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/elisp/chise-tex.el b/elisp/chise-tex.el index 3760ef7..79bdd48 100644 --- a/elisp/chise-tex.el +++ b/elisp/chise-tex.el @@ -346,37 +346,44 @@ (if (eq font-encoding 'T2A) (forward-char) (setq pos (point)) - (unless (and (prog1 - (search-backward - "\\fontencoding{T2A}\\selectfont{}" nil t) - (goto-char pos)) - (eq pos (match-end 0))) - (insert "\\fontencoding{T2A}\\selectfont{}") - ) + ;; (unless (and (prog1 + ;; (search-backward + ;; "\\fontencoding{T2A}\\selectfont{}" nil t) + ;; (goto-char pos)) + ;; (eq pos (match-end 0))) + ;; (insert "\\fontencoding{T2A}\\selectfont{}") + ;; ) + (insert "\\CyrillicScript{") (forward-char) - (setq font-encoding 'T2A)) + (skip-chars-forward "\u0400-\u04F9 ") + (insert "}") + ;; (setq font-encoding 'T2A) + ) ) ((and (setq ret (encode-char chr '=ucs)) (and (<= #x0374 ret)(<= ret #x03F3))) (if (eq font-encoding 'LGR) (forward-char) (setq pos (point)) - (unless (and (prog1 - (search-backward - "\\fontencoding{LGR}\\selectfont{}" nil t) - (goto-char pos)) - (eq pos (match-end 0))) - (insert "\\fontencoding{LGR}\\selectfont{}") - ) + ;; (unless (and (prog1 + ;; (search-backward + ;; "\\fontencoding{LGR}\\selectfont{}" nil t) + ;; (goto-char pos)) + ;; (eq pos (match-end 0))) + ;; (insert "\\fontencoding{LGR}\\selectfont{}") + ;; ) + (insert "\\GreekScript{") (forward-char) - (setq font-encoding 'LGR)) - (skip-chars-forward "\u0374-\u03F3") - (unless (eq font-encoding 'T1) - (unless (looking-at - "\\\\fontencoding{T1}\\\\selectfont{}") - (insert "\\fontencoding{T1}\\selectfont{}") - ) - (setq font-encoding 'T1)) + (skip-chars-forward "\u0374-\u03F3 ") + (insert "}") + ;; (setq font-encoding 'LGR) + ) + ;; (unless (eq font-encoding 'T1) + ;; (unless (looking-at + ;; "\\\\fontencoding{T1}\\\\selectfont{}") + ;; (insert "\\fontencoding{T1}\\selectfont{}") + ;; ) + ;; (setq font-encoding 'T1)) ) (t (unless (eq font-encoding 'T1) -- 1.7.10.4