未分類

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 の表で、複数行を1行内に入れる方法

multirow パッケージを使っておき、表内で multirow で入力する。 例 \usepackage{multirow} \begin{document} \begin{table} \beg …

no image

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

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

no image

tex で小文字のL(リットル)記号を入力する方法

tex で小文字のL(l)リットル記号を入力するには、\ell を使う。通常の小文字の l は、\\l であるのに注意。 例 5 \\ell 結果

no image

tex で文章を右寄せにする方法

テキストを \flushright で囲めば良い。 例 \begin{flushright} Lorem, ipsum dolor sit amet consectetur adipisicing e …

no image

C言語でchar文字列の長さを取得する (strlen)

strlen 関数を使って取得すればよい。sizeof という関数もあるが、strlen と振る舞いが異なるので注意。 例 #include<stdio.h> #include<strin …