
How to write a table in LaTeX
The tabular
environment creates a table.
\begin{tabular}{cc}
Book & 30 \\
Pen & 5
\end{tabular}

Two c
in the argument means the table has two columns. If it is ccc
, the number of columns is 3. c
means each item is centered.
Symbol | Meaning |
---|---|
c | center |
l | left |
r | right |
\begin{tabular}{lc}
Book & 30 \\
Pen & 5
\end{tabular}
\begin{tabular}{lr}
Book & 30 \\
Pen & 5
\end{tabular}
\begin{tabular}{lrc}
Book & 30 & 7 New \\
Pen & 5 & 24 New
\end{tabular}

Comments
Powered by Markdown