未分類

tex の表で、複数行を1行内に入れる方法

投稿日:

multirow パッケージを使っておき、表内で multirow で入力する。

\usepackage{multirow}
\begin{document}

\begin{table}
\begin{tabular}{ |c|c|c|c| }
\hline
1 & 2 & 3 \\
\hline
\multirow{3}{8em}{good morning, good evening} & A & B \\
& C & D \\
& E & F \\
\hline
\end{tabular}
\end{table}

\end{document}

結果

-未分類

執筆者:


comment

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

関連記事

no image

c++ で文字列をファイルに保存する方法

result.txt というファイルに “data1 data2 data3” という内容を保存する。ofstream を使って書き出す。 例 #include<iost …

no image

c++ で文字列を「区切り文字」を使って分ける方法

string の find を使って、区切り文字の場所を取得し、その位置で区切る。 例 #include <iostream> #include <string> using namesp …

no image

tex でファイ(φ、Φ)を入力する方法

小文字のファイ:φ、大文字のファイ:Φ串刺しでないファイ($\varphi$)も使われることがある。 例 $\phi, \varphi, \Phi$ 結果

no image

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

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

no image

matplotlib で x, y軸・タイトルのフォントサイズを調整する

ラベルの fontsize で指定する。 例 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2, 100) …