未分類

tex で行列間の水平間隔を調整する方法

投稿日:

行列を水平方向に並べるとき、間隔を開けたいことがある。
\hspace コマンドを使うことで、水平方向の間隔を指定することができる。
(行列表示には amsmath パッケージを使う。)

\usepackage{amsmath}
\begin{document}

$$
A = \left(
\begin{matrix}
1 & 2 & 3\\
a & b & c
\end{matrix}
\right),
\hspace{2cm}
B = \left(
\begin{matrix}
4 & 5 & 6\\
x & y & z
\end{matrix}
\right)
$$

\end{document}

結果

-未分類

執筆者:


comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

python3 で文字列を区切り文字を指定してリストに変換する方法

split メソッドを使う。 例 str1 = ‘this, is, a, pen’ str2 = str1.split(‘,’) print(str2) 結果 [‘this’, ‘ is’, ‘ a …

no image

tex で行の色を1行ごとに交互につける

色を1行ごとに交互につけるには、\xcolor パッケージを使った上で、\rowcolors コマンドを使って色を指定する。 例 \usepackage[table]{xcolor} \begin{d …

no image

tex で脚注を表示する方法

\footnote を使う。 例 \footnote{this is a footnote.} 結果

no image

python3 で辞書(dict) の for ループでキーと値を取得する

キーと値を取得するには次のようにする。キーは dict のループ、値は dict の values() のループで取得できる。 例 mydictionary = {‘color’: ‘白’, ‘ani …

no image

tex の積分範囲の分数サイズを変更する方法

定積分の分数の大きさを調整するには、\mbox のサイズ指定を \small や \normalsize や \large 等に設定すると良い。 例 $\displaystyle \int _0 ^{ …