未分類

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 で数式モード内に普通の文字列を入力する方法

\textrm を使う。 例 $$y = f (x) \hspace{1cm} \textrm{This is a function.}$$ 結果

no image

tex で文字を上付きにした矢印を入力する方法

\overset を使う方法がある。 例 $\overset{\text{abc}}{\rightarrow}$ 結果

no image

matplotlib で x軸・y軸ラベルをつける

plt.xlabel と plt.ylabel を使う。 例 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, …

no image

python3 でクラスの初期化を __init__ で行う

python でクラスのオブジェクトを生成したとき、__init__ メソッドが呼び出される(コンストラクタ)__init__ の引数には自身(self)を指定することが通例。一方、オブジェクト破棄の …

no image

c言語で文字をつなげる方法

sprintf 関数を使って、result 変数に文字列 s1 と文字列 s2 を結合した文字列を出力することができる。 例 #include<stdio.h> int main(void) { …