From: MORIOKA Tomohiko Date: Thu, 29 Jan 2009 06:15:35 +0000 (+0000) Subject: (chise-tex-encode-region-for-utf-8-jis): Use \CyrillicScript{...} and X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=295eb0a6cf796224bc476e6d36eabfa3baa7031a;p=chise%2Fuptex-chise.git (chise-tex-encode-region-for-utf-8-jis): Use \CyrillicScript{...} and \GreekScript{...} instead of \fontencoding{T2A|LGR}\selectfont{}. --- 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)