emath BBS

新規発言一覧最新記事過去一覧検索HOME

No.5450    横間隔
発言者: tDB
発言日: 2007 01/03 14:14
発言元: 61.121.42.89
縦棒 (\lvert, \rvert) と中の行列との間に空白を入れるには
    \,
などを補います。
No.5445 でお示しのリスト2箇所に \, を入れ,
[normallineskip] オプションをつけてみました。


% --- re5445e.tex --------------------------------------------
% 一般の行列式
\documentclass{jarticle}
\usepackage[normallineskip]{emath}

\makeatletter
% 一般の行列式
%  ex. \vgyouretu{1,2;3,4;5,6;7,8,9} 
\def\vgyouretu{\@ifnextchar[{\@vgyouretu}{\@vgyouretu[\gyouretu@haiti]}}
\def\@vgyouretu[#1]#2{{\let\EMdef\gdef
  \def\gyouretu@haiti@{#1}{% ←
  \ensuremath{%
  \begin{vmatrix}%
  \Cfor%
    {\Strsep{#2}{;}\pM@tempa\pM@tempb}%
    {\not\equal\pM@tempa\empty}%
    {\Strsep\pM@tempb{;}\pM@tempa\pM@tempb}%
    \do{%
      \Cfor%
        {\xdef\lntop{0}\Strsep\pM@tempa{,}\pM@tempc\pM@tempd
        }%
        {\not\equal\pM@tempc\empty}%
        {\Strsep\pM@tempd,\pM@tempc\pM@tempd
        }%
        \do{%
          \ifthenelse{\lntop=\z@}{%
            \xdef\lntop{1}\,\pM@tempc%%%%%%%%%%%%%%%%%%% 先頭列の左に \, を附加
          }{%
             &\pM@tempc
          }%
        }
      \ifthenelse{\equal\pM@tempb\empty}{}{\,\\}%%%%%%%% 最終列の右に \, を附加
    }
  \end{vmatrix} }
}}}
\makeatother

\begin{document}
\[\vgyouretu{
a_{11},a_{12},a_{13};a_{21},a_{22},a_{23};a_{31},a_{32},a_{33}}
=(-1)^{1+1}a_{11}\vgyouretu{a_{22},a_{23};a_{32},a_{33}}
+(-1)^{2+1}a_{21}\vgyouretu{a_{12},a_{13};a_{32},a_{33}}
+(-1)^{3+1}a_{31}\vgyouretu{a_{12},a_{13};a_{22},a_{23}}\]
\end{document}

▼関連発言

5445:\vgyouretu の作成 [TaD] 01/03 12:43
 ├5446:Re:\vgyouretu の作成 [石原 守] 01/03 13:19
 ├5447:Re:\vgyouretu の作成 [田中徹] 01/03 13:21
 ├5448:Re:\vgyouretu の作成 [tDB] 01/03 13:30
 │├5449:  縦ピッチ [tDB] 01/03 13:49
 │├5450:  横間隔 [tDB] 01/03 14:14
 │└5452:emath.sty v 1.72 [tDB] 01/03 16:35
 │ └5453:emath.sty v 1.73 [tDB] 01/06 11:00
 │  ├5454:Re:emath.sty v 1.73 [TaD] 01/06 12:11
 │  └5455:  訂正 [tDB] 01/06 13:16<-last
 └5451:Re:\vgyouretu の作成 [TaD] 01/03 15:16

Pass 保存


CGIROOM