未分類

tex で行内を結合する方法

投稿日:

\multicolumn を使って、結合する行の成分の数を指定することができる。
次の例では「3」を指定して、結合している。

\begin{table}
\begin{tabular}{ |c|c|c|c| }
\hline
\multicolumn{3}{|c|}{line 1} \\
\hline
A & B & C\\
\hline
\end{tabular}
\end{table}

結果

-未分類

執筆者:


comment

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

関連記事

no image

python3 で数字をゼロ埋めして表示する

string の、zfill を使う。 例 n = 3 n0 = str(n).zfill(10) print(n0) 結果 0000000003

no image

tex で行に色をつける方法

xcolor パッケージを使っておく。rowcolor で指定する。 例 \usepackage[table]{xcolor} \begin{document} \begin{table} \begi …

no image

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

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

no image

tex で期待値記号を入力する方法

\mathbf を使う。 例 $\mathbf{E}(\xi)$ 結果

no image

python3 で、指定した文字が最後に現れる場所を取得する

rfind を使うと、指定した文字が最後に現れる場所(インデックス)を取得することができる。 例 str1 = “12345abab” result = str1.rfind(“ab”) print( …