Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

The Not So Short phần 5 pdf
Nội dung xem thử
Mô tả chi tiết
2.11 Environments 43
\begin{tabular}{@{} l @{}}
\hline
no leading space\\
\hline
\end{tabular}
no leading space
\begin{tabular}{l}
\hline
leading space left and right\\
\hline
\end{tabular}
leading space left and right
Since there is no built-in way to align numeric columns to a decimal
point,17 we can “cheat” and do it by using two columns: a right-aligned integer and a left-aligned fraction. The @{.} command in the \begin{tabular}
line replaces the normal inter-column spacing with just a “.”, giving the appearance of a single, decimal-point-justified column. Don’t forget to replace
the decimal point in your numbers with a column separator (&)! A column
label can be placed above our numeric “column” by using the \multicolumn
command.
\begin{tabular}{c r @{.} l}
Pi expression &
\multicolumn{2}{c}{Value} \\
\hline
$\pi$ & 3&1416 \\
$\pi^{\pi}$ & 36&46 \\
$(\pi^{\pi})^{\pi}$ & 80662&7 \\
\end{tabular}
Pi expression Value
π 3.1416
π
π 36.46
(π
π
)
π 80662.7
\begin{tabular}{|c|c|}
\hline
\multicolumn{2}{|c|}{Ene} \\
\hline
Mene & Muh! \\
\hline
\end{tabular}
Ene
Mene Muh!
Material typeset with the tabular environment always stays together on
one page. If you want to typeset long tables, you might want to use the
longtable environments.
17If the ‘tools’ bundle is installed on your system, have a look at the dcolumn package.