\catcode<漢字>について

\catcode<漢字>について

- 匿 名 の投稿
返信数: 1
TeX からしばらく遠ざかっている者です。

\documentclass{jarticle}
\begin{document}

\catcode`A=0
Abegin{equation}
1+1=2
Aend{equation}

\end{document}

(上記を src1.tex とします)が platex で処理できるのは当然ですが…
This is pTeX, Version 3.141592-p3.1.10 (euc) (Web2C 7.5.4)
(./total.tex
pLaTeX2e <2006/11/10>+0 (based on LaTeX2e <2003/12/01> patch level 0)
(/usr/local/teTeX/share/texmf/ptex/platex/base/jarticle.cls
Document Class: jarticle 2006/06/27 v1.6 Standard pLaTeX class
(/usr/local/teTeX/share/texmf/ptex/platex/base/jsize10.clo)) (./total.aux)
[1] (./total.aux) )
Output written on total.dvi (1 page, 248 bytes).
Transcript written on total.log.

問題は「A」を「円」にしたもの、

\documentclass{jarticle}
\begin{document}

\catcode`円=0
円begin{equation}
1+1=2
円end{equation}

\end{document}

(上記を src2.tex とします)…って、セグメンテーション違反になって
しまうんですけど、これって well-known なんでしょうか?

This is pTeX, Version 3.141592-p3.1.10 (euc) (Web2C 7.5.4)
(./total.tex
pLaTeX2e <2006/11/10>+0 (based on LaTeX2e <2003/12/01> patch level 0)
(/usr/local/teTeX/share/texmf/ptex/platex/base/jarticle.cls
Document Class: jarticle 2006/06/27 v1.6 Standard pLaTeX class
(/usr/local/teTeX/share/texmf/ptex/platex/base/jsize10.clo)) (./total.aux)セグメンテーション違反です


期待しているのは src1.tex と src2.tex の処理結果が一致することです。


OS 等に依存するかどうかはわかりませんが、
CentOS5.4 に土村さんの ptetex3-20090610 からインストールしたものでは
src1.tex, src2.tex は上記の状態になります。

Windows XP SP2 に角藤先生の texinst2009 を使ってインストールしたものでは
コンパイルはできるんですが、src2.tex は\catcodeの定義がなかった状態で
出力(円beginequation1+1=2...)されてしまいます。

Windows 7 Pro 上で VM Ware を使って動かしている Vine Linux 5.1(フルインストール)
では Windows XP SP2 と同様の結果になります。こちらは Web2C 7.5.4 です。

MacOS については試していません(…というか、テスト用の環境がありません)


どなたか解決方法、あるいは「そんな処理はできません」という情報をお持ちの方は
いらっしゃいませんか。

よろしくお願い申し上げます。