Skip to content

Instantly share code, notes, and snippets.

@RazerM
Last active December 14, 2015 21:19
Show Gist options
  • Save RazerM/5150716 to your computer and use it in GitHub Desktop.
Save RazerM/5150716 to your computer and use it in GitHub Desktop.
LaTeX: Simple table #snippet
%Needs \usepackage{float} for {H}
\begin{table}[H]
\centering
\begin{tabular}{*{2}{l}rr@{.}l} %The same as llr
\toprule
\multicolumn{2}{c}{Item}\\ %2 columns, centred
\cmidrule(r){1-2} %Trims bar on r.h.s.
Meat & Description & Price (\textsterling) & \multicolumn{2}{c}{Mass (kg)}\\
\midrule
Chicken & Breast & 4.69 & 5 & 2\\
Chicken & Legs & 3.00 & 4 & 22\\
Chicken & Wings & 4.00 & 4 & 123\\
Beef & Sirloin & 10.00 & 7 & 0\\
\bottomrule
\end{tabular}
\caption{Meat order}
\label{tab:meat-order}
\end{table}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment