표
이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
English
Tables
- A table uses the
tabularenvironment. You first describe the columns:
\begin{tabular}{l c r}
left & centre & right \\
\end{tabular}
{l c r}means three columns: left-aligned, centred, right-aligned.
English
Rows and cells
- Inside,
&jumps to the next column and\\starts a new row:
\begin{tabular}{l l}
Apple & 5 \\
Banana & 3 \\
\end{tabular}
- A row must not have more cells than the columns you declared (LaTeX stops with
Extra alignment tab). Fewer is allowed: the missing cells stay empty.
English
Lines (optional)
- Add
|between column letters for vertical lines, and\hlinefor horizontal ones:
\begin{tabular}{|l|l|}
\hline
Apple & 5 \\ \hline
\end{tabular}
- For a cleaner look, professionals use the
booktabspackage instead of many lines.
English
Common mistakes
- More cells than columns. In
{ll}, the rowa & b & c \\has three cells, which gives! Extra alignment tab has been changed to \cr. - No column spec.
\begin{tabular}on its own reads your first cell as the spec and gives! LaTeX Error: Illegal character in array arg. - Forgetting
\\at the end of a row. The next row's cells run on in the same row.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
\begin{tabular}{l l}로 작은 2열 표를 만드세요. 한 줄의 두 셀을 &로 나누고, 각 줄을 \\으로 마무리하세요. Bob(30)과 Mei(25)의 행을 추가하세요.
PDF를 컴파일하고 미리보기하려면 '실행'을 클릭하세요.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
테이블에 줄을 추가하십시오. 헤더 행 다음, 표의 맨 아래에 \hline를 배치하고, 수직 선을 위해 열 명세서에 |l|l|을 사용하십시오.
PDF를 컴파일하고 미리보기하려면 '실행'을 클릭하세요.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
사양 {l c r}에 따라 좌, 중앙, 우 정렬이 있는 3열 테이블을 만드십시오. 헤더 행 Item & Qty & Price \\과 행 Pen & 2 & 1.50 \\을 추가하십시오.
PDF를 컴파일하고 미리보기하려면 '실행'을 클릭하세요.