X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=elisp%2Fchise-tex.el;h=a56484b62ed36a939c0758a1943ec9bd934f7c81;hb=292c543b99bf7d3ab2b626c02ce291cb204e4433;hp=3760ef77e003b9fc909c6d576832a8266f69dc21;hpb=e1bcdb49d227e28d2fd11ab4cacc1bd737b193ee;p=chise%2Fuptex-chise.git diff --git a/elisp/chise-tex.el b/elisp/chise-tex.el index 3760ef7..a56484b 100644 --- a/elisp/chise-tex.el +++ b/elisp/chise-tex.el @@ -1,6 +1,6 @@ ;;; chise-tex.el --- Coding-system based chise2otf like tool -;; Copyright (C) 2004,2005,2006,2007,2008 MORIOKA Tomohiko +;; Copyright (C) 2004,2005,2006,2007,2008,2009 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: OTF package, pTeX, CHISE, Multiscript, Multilingual @@ -153,13 +153,30 @@ (delete-char) (insert "{\\usefont{T1}{pxr}{m}{n}\\ng}") t) + ((eq chr ?\u0250) + (delete-char) + (insert "\\textturna{}") + t) + ((eq chr ?\u0254) + (delete-char) + (insert "\\textopeno{}") + t) + ((eq chr ?\u0264) + (delete-char) + (insert "\\textramshorns{}") + t) + ((eq chr ?\u026F) + (delete-char) + (insert "\\textturnm{}") + t) ((eq chr ?\u0282) (delete-char) (insert "{\\usefont{T1}{pxr}{m}{n}\\k{s}}") t) ((eq chr ?\u0294) (delete-char) - (insert "\\UCSjis{0294}") + ;; (insert "\\UCSjis{0294}") + (insert "\\textglotstop{}") t) ((eq chr ?\u2022) (delete-char) @@ -346,37 +363,54 @@ (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{}") - ) - (forward-char) - (setq font-encoding 'T2A)) + ;; (unless (and (prog1 + ;; (search-backward + ;; "\\fontencoding{T2A}\\selectfont{}" nil t) + ;; (goto-char pos)) + ;; (eq pos (match-end 0))) + ;; (insert "\\fontencoding{T2A}\\selectfont{}") + ;; ) + (if (search-backward "\\CyrillicScript{" + (- pos (eval-when-compile + (length "\\CyrillicScript{"))) + t) + (search-forward "}" nil t) + (insert "\\CyrillicScript{") + (forward-char) + (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{}") - ) - (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)) + ;; (unless (and (prog1 + ;; (search-backward + ;; "\\fontencoding{LGR}\\selectfont{}" nil t) + ;; (goto-char pos)) + ;; (eq pos (match-end 0))) + ;; (insert "\\fontencoding{LGR}\\selectfont{}") + ;; ) + (if (search-backward "\\GreekScript{" + (- pos (eval-when-compile + (length "\\GreekScript{"))) + t) + (search-forward "}" nil t) + (insert "\\GreekScript{") + (forward-char) + (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)