\inaccessible?

名前: みなも
日時: 2008-10-20 10:29:49
IPアドレス: 219.127.71.*

次のようなソースを実行したところよくわからないエラーが出ました. \documentclass{jarticle} \makeatletter \def\testone[#1]{\@ifnextchar[{\testtwo[#1]}{\testtwo[#1][]}} \def\testtwo[#1][#2]{\ialign\bgroup $##$ & ${}##{}$ & $##$ \cr} \def\endtestone{\crcr\egroup} \makeatother \begin{document} \begin{testone}[] & & {\sqrt{n^2 + 1}} - n \cr & = & \sqrt{n^2 + 1} + n \end{testone} \end{document} オプション引数が何の役にも立っていないのですが, これはソースを最小化したためで,もともとは意味のある引数でした. エラーが出るのは testone 環境の2行目の \sqrt です. 1行目のように { } で囲ってやればエラーは消えるのですが, 裸の \sqrt だとエラーになります. 1行目も { } を取り去るとエラーになります. エラーは以下の通りです. This is pTeX, Version 3.141592-p3.1.10 (sjis) (Web2C 7.5.6) (format=platex 2006.12.31) 19 OCT 2008 20:07 \write18 enabled. **temp.tex (./temp.tex pLaTeX2e <2006/11/10>+0 (based on LaTeX2e <2005/12/01> patch level 0) Babel <v3.8h> and hyphenation patterns for english, usenglishmax, ukenglish, ba (中略) n, loaded. (d:/ptex/share/texmf/ptex/platex/base/jarticle.cls Document Class: jarticle 2006/06/27 v1.6 Standard pLaTeX class \c@@paper=\count81 (d:/ptex/share/texmf/ptex/platex/base/jsize10.clo File: jsize10.clo 2006/06/27 v1.6 Standard pLaTeX file (size option) ) \c@part=\count82 (中略) \heisei=\count90 ) (./temp.aux) \openout1 = `temp.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 10. (中略) (Font) <5> on input line 14. ! Missing control sequence inserted. <inserted text> \inaccessible l.15 & = & \sqrt {n^2 + 1} + n ? x Here is how much of TeX's memory you used: 251 strings out of 94481 2497 string characters out of 1174923 52546 words of memory out of 1500000 3677 multiletter control sequences out of 10000+50000 7511 words of font info for 31 fonts, out of 2000000 for 2000 679 hyphenation exceptions out of 8191 22i,5n,19p,115b,81s stack positions out of 3000i,500n,5000p,200000b,5000s No pages of output. ちなみに \testone の定義を \def\testone[#1]{\ialign\bgroup $##$ & ${}##{}$ & $##$ \cr} などとしてオプション引数をやめるとエラーが消えます. \tracingmacros を 1 にして確認してみたところ, オプション引数の定義に使っている \@ifnextchar と \sqrt の定義に使われている \@ifnextchar が何か干渉しているのかなぁ,という感じですが, いまいちよくわかりません.(そもそも \inaccessible --- カテゴリーコード等が違う? --- がなぜここで出てくるのか) どなたかおわかりになる方はいらっしゃいませんでしょうか. 最新版なら再現しない等の追試情報でもありがたいです.

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます。適宜改行を入れてください)