[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cgreek-ja:01005] "<" と ">"の TeX へのコンバート
高橋 さん、
ご無沙汰になってしまっています。
# 英語 Mailing List での Windows XP での Emacs のこと有難うございます。
今、TeX を使って本を書いているのですが、
Latin Mode で "<" と ">" とが TeX Mode にコンバートして出力すると、
スペイン語の "!" と "?" の逆向きのものに変わってしまう
ということに気が付きました。
このことは、以前から気になっていて、その部分だけ "$\langle$"、"$\rangle$"
していたのですが、やはり TeX コンバートのプログラムで直すようにした方がよい
のではないか、と思い始めました。
私はとりあえず、cgreek-util.el を
------------------------------------------------------------------------
(defun cgreek-to-tex-buffer nil
"Convert cgreek characters in the current buffer into TeX notation."
(interactive "*")
(let (ch)
(goto-char (point-min))
..................
;; remove redundant "\end{greek}, \begin{greek}" pairs
(goto-char (point-min))
(while (re-search-forward "\\\\end{greek}\\([ \t\n]*\\)\\\\begin{greek}"
nil t)
(replace-match "\\1"))
;; addded 21.04.2003 by Kenji Mizuochi ----------------
(goto-char (point-min))
(while (re-search-forward "<" nil t)
(replace-match "$\langle$"))
(goto-char (point-min))
(while (re-search-forward ">" nil t)
(replace-match "$\rangle$"))
;; ------------------------------------------------------
))
.........
.........
.........
(defun tex-to-cgreek-buffer nil
"Convert Greek regions in the current buffer from tex notation into cgreek characters.
A Greek region means a region surrounded by \"\\begin{greek}\" and
\"\\end{greek}\"."
(interactive "*")
(goto-char (point-min))
(while (re-search-forward "\\\\begin{greek}" nil t)
(replace-match "")
(tex-to-cgreek-region
(point)
(progn
(if (re-search-forward "\\\\end{greek}" nil 0)
(replace-match ""))
(point))))
;; added 29.04.2003 by Kenji MIZUOCHI ---------------
(goto-char (point-min))
(while (re-search-forward "$\langle$" nil t)
(replace-match "<"))
(goto-char (point-min))
(while (re-search-forward "$\rangle$" nil t)
(replace-match ">"))
;; --------------------------------------------------
(cgreek-highlight-greek-chars-in-buffer 0))
------------------------------------------------------------------------
と書き換えて使っています。
ご意見をお聞かせください。
# ひょっとしたら新バージョンでは直っているのかも知れませんが ....
PS: 先日、Yahoo Japan で "cgreek" で検索してみましたら、最近、日本でも
Multi Lingual の処理に cgreek をインストールして ... という記述を
チラチラ見掛けるようになりました。
ただ、そのマニュアルに日本語版がないので、私の旧版マニュアルが結構
参照されているようでした。
早く書き直さなければ、と思っています。
==========================================
水落 健治
明治学院大学 文学部
E-Mail: mizuochi@xxxxxxxxxxxxxxxxxxxxx
knj_miz@xxxxxxxxxxxxx
==========================================