고정된 열 길이와 중앙 정렬된 텍스트가 있는 표 형식

고정된 열 길이와 중앙 정렬된 텍스트가 있는 표 형식

고정된 길이와 각 열의 중앙에 텍스트가 있는 2열 테이블을 만들려고 합니다. LaTex 문서(p. 159)에서 예제를 찾았지만 컴파일하려고 하면 작동하지 않습니다. 내 코드는 다음과 같습니다.

\documentclass[12pt, openright, twoside, a4paper]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel}
\newcommand{\bb}{\textbf}
\begin{document}

\begin{tabular}{|>{\centering}p{0.1\linewidth}|p{0.15\linewidth}|}
\hline
\textbf{SI} & \textbf{Gaussian} \tabularnewline
\hline \hline
$\bb{E}$ & $\bb{E}$ \tabularnewline
$\bb{D}$ & $\bb{D} / 4 \pi$ \tabularnewline
$\bb{H}$ & $c \bb{H} / 4 \pi$ \tabularnewline
$\bb{B}$ & $\bb{B} / c$ \tabularnewline
$\varepsilon_0$ & $1 / 4 \pi$ \tabularnewline
$\mu_0$ & $4 \pi / c^2$ \tabularnewline
$\rho_e$ & $\rho_e$ \tabularnewline
$\bb{J}$ & $\bb{J}$ \tabularnewline
\hline
\end{tabular}

\end{document}

나는 얻다:

./test.tex:10: Use of \@array doesn't match its definition.
\new@ifnextchar ...served@d = #1\def \reserved@a {
                                              #2}\def \reserved@b {#3}\f...
l.10 ...ering}p{0.1\linewidth}|p{0.15\linewidth}|}

? 

어떤 아이디어? 내가 어디 잘못 됐나요?

답변1

(이 게시물이 "공식적인" 답변을 받은 것으로 간주될 수 있도록 답변으로 이전 댓글을 게시했습니다.)

LaTeX가 다음 코드 조각을 소화하려고 할 때 보고하는 (거의 이해하기 어려운) 오류 메시지가 표시됩니다.

>{\centering}p{0.1\linewidth}

LaTeX가 이 명령을 처리하려면 패키지 array를 로드해야 합니다. 패키지를 로드하면 array추가 문제 없이 예제 코드가 컴파일됩니다.

관련 정보