In a regular table, I'm trying to remove the small horizontal space before the first column and after the last one as achieved with package booktabs
with the option @{}
. How can I do that? Please compile the code below:
\documentclass[fleqn,11pt]{book}
\usepackage{booktabs}
\begin{document}
\begin{table}[!ht]\centering
\begin{tabular}{@{}llr@{}} \toprule
Gnat & per gram & 13.65 \\
Gnu & stuffed & 92.50 \\ \bottomrule
\end{tabular}
\end{table}
\begin{table}[!ht]\centering
\begin{tabular}{llr} \toprule
Gnat & per gram & 13.65 \\
Gnu & stuffed & 92.50 \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
Best Answer
The
@{}
specification intabular
works with any table. It's not specific to thebooktabs
package.Here's an example with
\fbox
es around the table to show the boundaries.