未分類

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

tex 表の一部の列のみを中央揃えにする

中央揃えにしたい列を、c で指定すればよい。その他は l (左)または r (右)揃えに指定する 例 \begin{table} \begin{tabular}{ |r|c|r|} \hline Ta …

no image

tex で文字の上の点を入力する方法

テキストモードでは \. 数式モードでは \dot{} を使う。 例 \.{a}$\dot{x}$ 結果

no image

python3 でカンマの入った数値の文字列を数値に変換する方法

replace と int 変換を組み合わせる。 例 str1 = ‘1,234,567’ int1 = int(str1.replace(‘,’,”)) print(int1) 結果 123456 …

no image

tex で方程式を文書の中央揃えにする(eqnarray→ align)

amsmath パッケージを使ったうえで、align を使う。次の例では eqnarray の代わりに、align を使っている。 例 \usepackage {amsmath}  \begin{do …

no image

tex で文字色を RGB で指定する

文字色を RGB で指定する。例では、\definecolor で、「samplecolor」という色を定義して使っている。 例 \usepackage{xcolor}\begin{document} …