Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のLaTeXコードについて考えてみます。
\begin{tabular}{p{1in}p{1in}} A & B\\ C & D\\ \end{tabular}
各セルの内容をセルの左側ではなく中央に揃えるにはどうすればよいですか?列の幅が固定されていることを確認したいので、セルの内容を中央に配置するために「p{.1in}」の代わりに「c」位置属性を使用できないことに注意してください。
\usepackage{array}前文で
\usepackage{array}
次にこれ:
\begin{tabular}{| >{\centering\arraybackslash}m{1in} | >{\centering\arraybackslash}m{1in} |}
列で固定するための「m」は配列パッケージによって提供され、垂直方向の中央揃えを提供することに注意してください(これが必要ない場合は、「p」に戻ってください。
\centeringこれを行うには、parboxで使用できます。
\centering
こことここでより多くの情報。
(Googleのキャッシュリンクについては申し訳ありません。元のリンクは機能しなくなりました。)