名前: . 日時: 2005-08-26 21:00:13 IPアドレス: 211.4.48.*
>>37670 確かに,\sin などが fragile になっているようですね. ということは,件の ams 関係のパッケージの使用時には “行列の中身”を加工する際に不用意に \edef を用いることはできない ということになります. とりあえず,次のように内部処理を変更してみると,どうでしょうか. \documentclass{jarticle} \usepackage{zzz} \usepackage{amsopn} \makeatletter \def\@Colonfor#1:=#2\do#3{% \expandafter\def\expandafter\@fortmp\expandafter{#2}% \ifx\@fortmp\@empty\else \expandafter\@Colonforloop#2:\@nil:\@nil\@@#1{#3}% \fi} \def\@MymainsizeiC#1;{% \let\@tmpi\empty \@Colonfor\@Row:=#1\do{% \toks@\expandafter{\@tmpi}% \@temptokena\expandafter{\@Row}% \edef\@tmpi{\the\toks@,\the\@temptokena}}% \begin{array}{\@ArrayFormat} \expandafter\@Oneline\@tmpi: \end{array}} \def\@MymainsizeiiC#1;{% \let\@tmpi\empty\let\@tmpii\empty \gdef\@mysplitii##1,##2:{% \expandafter\def\expandafter\@tmpi\expandafter{\@tmpi,##1}% \expandafter\def\expandafter\@tmpii\expandafter{\@tmpii,##2}}% \@Colonfor\@Row:=#1\do{\expandafter\@mysplitii\@Row:}% \begin{array}{\@ArrayFormat} \expandafter\@Oneline\@tmpi:\\[\@行列改行幅] \expandafter\@Oneline\@tmpii: \end{array}} \def\@MymainsizeiiiC#1;{% \let\@tmpi\empty\let\@tmpii\empty\let\@tmpiii\empty \gdef\@mysplitiii##1,##2,##3:{% \expandafter\def\expandafter\@tmpi\expandafter{\@tmpi,##1}% \expandafter\def\expandafter\@tmpii\expandafter{\@tmpii,##2} \expandafter\def\expandafter\@tmpiii\expandafter{\@tmpiii,##3}}% \@Colonfor\@Row:=#1\do{\expandafter\@mysplitiii\@Row:}% \begin{array}{\@ArrayFormat} \expandafter\@Oneline\@tmpi:\\[\@行列改行幅] \expandafter\@Oneline\@tmpii:\\[\@行列改行幅] \expandafter\@Oneline\@tmpiii: \end{array}} \def\@MymainsizeivC#1;{% \let\@tmpi\empty\let\@tmpii\empty\let\@tmpiii\empty\let\@tmpiv\empty \gdef\@mysplitiv##1,##2,##3,##4:{% \expandafter\def\expandafter\@tmpi\expandafter{\@tmpi,##1}% \expandafter\def\expandafter\@tmpii\expandafter{\@tmpii,##2} \expandafter\def\expandafter\@tmpiii\expandafter{\@tmpiii,##3} \expandafter\def\expandafter\@tmpiv\expandafter{\@tmpiv,##4}}% \@Colonfor\@Row:=#1\do{\expandafter\@mysplitiv\@Row:}% \begin{array}{\@ArrayFormat} \expandafter\@Oneline\@tmpi:\\[\@行列改行幅] \expandafter\@Oneline\@tmpii:\\[\@行列改行幅] \expandafter\@Oneline\@tmpiii:\\[\@行列改行幅] \expandafter\@Oneline\@tmpiv: \end{array}} \def\@MymainsizevC#1;{% \let\@tmpi\empty\let\@tmpii\empty\let\@tmpiii\empty\let\@tmpiv\empty \let\@tmpv\empty \gdef\@mysplitv##1,##2,##3,##4,##5:{% \expandafter\def\expandafter\@tmpi\expandafter{\@tmpi,##1}% \expandafter\def\expandafter\@tmpii\expandafter{\@tmpii,##2} \expandafter\def\expandafter\@tmpiii\expandafter{\@tmpiii,##3} \expandafter\def\expandafter\@tmpiv\expandafter{\@tmpiv,##4} \expandafter\def\expandafter\@tmpv\expandafter{\@tmpv,##5}}% \@Colonfor\@Row:=#1\do{\expandafter\@mysplitv\@Row:}% \begin{array}{\@ArrayFormat} \expandafter\@Oneline\@tmpi:\\[\@行列改行幅] \expandafter\@Oneline\@tmpii:\\[\@行列改行幅] \expandafter\@Oneline\@tmpiii:\\[\@行列改行幅] \expandafter\@Oneline\@tmpiv:\\[\@行列改行幅] \expandafter\@Oneline\@tmpv: \end{array}} \def\@MymainsizeviC#1;{% \let\@tmpi\empty\let\@tmpii\empty\let\@tmpiii\empty\let\@tmpiv\empty \let\@tmpv\empty\let\@tmpvi\empty \gdef\@mysplitvi##1,##2,##3,##4,##5,##6:{% \expandafter\def\expandafter\@tmpi\expandafter{\@tmpi,##1}% \expandafter\def\expandafter\@tmpii\expandafter{\@tmpii,##2} \expandafter\def\expandafter\@tmpiii\expandafter{\@tmpiii,##3} \expandafter\def\expandafter\@tmpiv\expandafter{\@tmpiv,##4} \expandafter\def\expandafter\@tmpv\expandafter{\@tmpv,##5} \expandafter\def\expandafter\@tmpvi\expandafter{\@tmpvi,##6}}% \@Colonfor\@Row:=#1\do{\expandafter\@mysplitvi\@Row:}% \begin{array}{\@ArrayFormat} \expandafter\@Oneline\@tmpi:\\[\@行列改行幅] \expandafter\@Oneline\@tmpii:\\[\@行列改行幅] \expandafter\@Oneline\@tmpiii:\\[\@行列改行幅] \expandafter\@Oneline\@tmpiv:\\[\@行列改行幅] \expandafter\@Oneline\@tmpv:\\[\@行列改行幅] \expandafter\@Oneline\@tmpvi: \end{array}} \makeatother \begin{document} $ \matrixR{\sin x,0:0,0} $ \[ \matrixR{\sin x,0:0,0} \] $ \matrixC{\sin x,0:0,0} $ \[ \matrixC{\sin x,0:0,0} \] \end{document}
この書き込みへの返事: