(chise-tex-coded-charset-expression-alist): Add setting for
authortomo <tomo>
Mon, 27 Feb 2006 11:08:15 +0000 (11:08 +0000)
committertomo <tomo>
Mon, 27 Feb 2006 11:08:15 +0000 (11:08 +0000)
`=ruimoku-v6'.
(chise-tex-encode-region-for-jis): Don't decompose <CYRILLIC SMALL
LETTER SHORT I>; add settings for <COMBINING BREVE> and <COMBINING
HOOK ABOVE>; support some double accents; support <SUPERSCRIPT TWO>,
<SUPERSCRIPT THREE>, <LATIN SMALL LETTER D WITH STROKE>, <LATIN SMALL
LETTER ENG>, <LATIN SMALL LETTER S WITH HOOK>, <SUBSCRIPT THREE> and
<SUBSCRIPT FIVE>.

chise2otf/elisp/chise-tex.el

index 65ad4b1..6936160 100644 (file)
@@ -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))
                 ;; ((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 . "`")
                                             (?\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)
                 ;; (if (eq (char-before) ?\e$B!T\e(B)
                 ;;     (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}"))