(chise-tex-encode-ucs-char-at-point): Add setting for U+0250, U+0254,
authorMORIOKA Tomohiko <tomo.git@chise.org>
Wed, 4 Feb 2009 01:13:23 +0000 (01:13 +0000)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Wed, 4 Feb 2009 01:13:23 +0000 (01:13 +0000)
U+0264 and U+026F; use \textglotstop{} instead of \UCSjis{0294} for
U+0294.
(chise-tex-encode-region-for-utf-8-jis): Avoid to insert
multiple \CyrillicScript{...} and \GreekScript{...}.

elisp/chise-tex.el

index 260f78b..a56484b 100644 (file)
       (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)
               ;;              (eq pos (match-end 0)))
               ;;   (insert "\\fontencoding{T2A}\\selectfont{}")
               ;;   )
-             (insert "\\CyrillicScript{")
-             (forward-char)
-             (skip-chars-forward "---\u0400-\u04F9 ")
-             (insert "}")
+             (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)
              )
            )
               ;;              (eq pos (match-end 0)))
               ;;   (insert "\\fontencoding{LGR}\\selectfont{}")
               ;;   )
-             (insert "\\GreekScript{")
-             (forward-char)
-             (skip-chars-forward "\u0374-\u03F3 ")
-             (insert "}")
+             (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)