未分類

tex で行に色をつける方法

投稿日:

xcolor パッケージを使っておく。rowcolor で指定する。

\usepackage[table]{xcolor}
\begin{document}

\begin{table}
\begin{tabular}{ |c|c|c|c| }
\hline
\rowcolor{blue!90!yellow!20} 1 & 2 & 3 \\
\hline
A & B & C\\
\hline
1 & 2 & 3 \\
\hline
\end{tabular}
\end{table}

\end{document}

結果

-未分類

執筆者:


comment

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

関連記事

no image

python3 で range からリストを生成する方法

list をrange を指定して初期化すれば良い。数を1つ飛ばしのリストも次のようにして作れる。 例 list1 = list(range(1,10,2)) print(list1) 結果 [1, …

no image

tex で「デルタ」δ・Δ を入力する方法

小文字のデルタ:δ大文字のデルタ:Δ 例 $\delta, \Delta$ 結果

no image

c++ で文字列(string)の foreach 操作を行う方法

string の各文字に対して操作を行うには、「iterator」(イテレータ)を使ってループを作る方法がある。iterator の変数名は、it としておくと分かりやすい。 例 #include&l …

no image

tex で行の色を1行ごとに交互につける

色を1行ごとに交互につけるには、\xcolor パッケージを使った上で、\rowcolors コマンドを使って色を指定する。 例 \usepackage[table]{xcolor} \begin{d …

no image

tex で、割り算記号を入力する方法

physics パッケージを使って、\divisionsymbol で割り算記号が入力できる。 例 \usepackage{physics} \begin{document} $2 \division …