未分類

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

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

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

no image

matplotlib で縦横の罫線を出力する

罫線を出力するには、pyplot.grid を使う。 例 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2 …

no image

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

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

no image

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

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

no image

tex で差集合の記号を入力する方法

\setminus を使う。 例 $A \setminus B$ 結果