Fixed width centered columns in tabular

Tags:

Latex의 Tabular에서 고정길이 가운데 정렬 컬럼 만드는 방법.

\usepackage{array}
%array 패키지를 사용한다고 선언

\begin{tabular}{c | >{\centering}p{3cm} | p{2cm} | p{3cm} | p{2cm}}
% 여기서 >{\centering}가 있는데, >{…} 명령은 array package에서 정의된
% 것으로, 중괄호 안의 명령을 해당 컬럼에 매번 삽입해준다.

주의점: table 안에서 줄바꾸기 할 때는, \ 가 아닌 \tabularnewline 을 사용해야하고, 그렇게 하지 않으면 에러가 납니다.

\tabularnewline의 예

40,000 & 37,160 & 28,098 & 174,456 & 97,894 \tabularnewline

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *