Re: 行列の枠の外に中括弧を付けたい

名前: トノ
日時: 2003-07-17 20:30:18
IPアドレス: 150.35.254.*

>>20304 \{ に \big.. 系の修飾を付けるか、\left\{ .. \right. の間に \vphantom{ダミー} を入れて大きなブレースを得て、 それを\raisebox に入れることによって出力位置を調整するとともに、 \raisebox のオプション引数で無理矢理 1 行に納めてしまう、 というのはいかがでしょうか。 ※ かなり強引なやり方ですし、array がらみのパラメーター類の 設定状況によっては、おかしな出力になるかもしれません。 ※ 当方、数学はサッパリですので、どんな出力を望んでおられるのか、 全く勘違いしているのかもしれません。その場合はあしからず。 \documentclass{article}\relax \begin{document} \[ \bordermatrix{% &\multispan3 $\overbrace{\makebox[1.5cm]{}}^{3}$ & \multispan2 $\overbrace{\makebox[1.2cm]{}}^{2}$ \cr \hfill\raisebox{-.5\normalbaselineskip}[0pt][0pt]{% $x\left\{\vphantom{% %\baselineskip=\normalbaselineskip \begin{array}{l}a\\b\end{array}% }\right.$ }% &1 &2 &3 &4 &5 \cr &1 &0 &0 &0 &0 \cr \hfill\raisebox{-.5\normalbaselineskip}[0pt][0pt]{% $y\left\{\vphantom{% %\baselineskip=\normalbaselineskip \begin{array}{l}a\\b\end{array}% }\right.$ }% &0 &1 &0 &0 &0 \cr &0 &0 &1 &0 &0} \] \end{document} マクロ化すると、こんな感じになるでしょうか。 \documentclass[a4paper,10pt]{jsarticle} \makeatletter \newcommand*{\multirowbrace}[2]{% #1 : 行数 % #2 : ブレースの左に出力する文字・記号(数式モード) \@tempcnta=#1\relax \@temptokena={0}% \@whilenum\@tempcnta>\@ne\do{% \advance\@tempcnta by\m@ne \@temptokena=\expandafter{\the\@temptokena\\0}% }% \setlength{\@tempdima}{#1\normalbaselineskip}% \addtolength{\@tempdima}{-\normalbaselineskip}% \@tempdima=-.5\@tempdima \edef\reserved@a{% \hfill\noexpand\raisebox{\the\@tempdima}[\z@][\z@]{% $#2\left\noexpand\{\noexpand\vphantom{% \noexpand\begin{array}{l}\the\@temptokena\noexpand\end{array}% }\right.$% }% }% \reserved@a } \makeatother \begin{document} \[ \bordermatrix{% &\multispan3 $\overbrace{\makebox[1.5cm]{}}^{3}$ & \multispan2 $\overbrace{\makebox[1.2cm]{}}^{2}$ \cr \multirowbrace{2}{x} &1 &2 &3 &4 &5 \cr &1 &0 &0 &0 &0 \cr \multirowbrace{2}{y} &0 &1 &0 &0 &0 \cr &0 &0 &1 &0 &0} \] \[ \bordermatrix{% &\multispan3 $\overbrace{\makebox[1.5cm]{}}^{3}$ & \multispan2 $\overbrace{\makebox[1.2cm]{}}^{2}$ \cr \multirowbrace{3}{x} &1 &2 &3 &4 &5 \cr &1 &0 &0 &0 &0 \cr &0 &0 &1 &0 &0 \cr \multirowbrace{1}{y} &0 &1 &0 &0 &0} \] \end{document} 上方に出力するブレースも、\makebox の代わりに \hphantom を使うようにすれば、 大きさを半自動で調整できるのでは? ※ 今回の入力例では、\makebox のオプション引数の値が大きすぎて、 行列のカラム間のスペーシングが乱れているように見えます。

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます)