First thing first, my LaTeX code,
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[letterpaper, top=0.25in, bottom=0.25in, left=0.25in, right=0.25in]{geometry}
\usepackage{multirow,array,varwidth,spreadtab,caption}
\usepackage{booktabs}
\usepackage{siunitx,booktabs,caption}
\usepackage{multirow,array,varwidth,spreadtab,}
\usepackage{siunitx,booktabs,caption}
\usepackage{ragged2e}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\RaggedLeft\hspace{0pt}}p{#1}}
%%% change contents font %%%
\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
%%% %%% %%% %%% %%% %%% %%%%
\begin{document}
\begin{table}
\large
\captionsetup{labelformat=empty,font=large}
\centering \caption{REVENUE INTERESTS}
\begin{tabular}{
*{5}{S[table-format=1.4]}
}
\toprule
& {Expense} & {Oil/} & {Plant} & \\
& {Interest} & {Condensate} & {Products} & {Gas} \\
\cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
\bf{INITIAL} & 1.2345 & 1.2345 & 1.2345 & 1.2345 \\
\bf{FINAL} & 1.2345 & 1.2345 & 1.2345 & 1.2345 \\
\bf{REMARKS} & \multicolumn{4}{c}{\bf{ALL AMOUNTS ARE EXPRESSED IN THOUSANDS OF DOLLARS.}}\\
\multicolumn{5}{l}{%
\scriptsize
%
}
\end{tabular}
\end{table}
\end{document}
and export table looks like below,
What I want to edit the table into,
1. Partial Toprule line, make caption centered with shorten toprule.
2. Even sub column distribution
3. Reduce the veritcal distance between caption and table itself.
which should be looks like pic below,
Thanks a lot.
Best Answer
You can define a local command that sets all headers in a
\makebox
with the same width; experiment with the width until you're satisfied.In the code I left just the packages necessary for typesetting the table. Note that you don't want
\caption
, as “Revenue Interests” is the header of the table.You get right alignment with respect to the
\cmidrule
with the optiontable-alignment=right
: