[Tex/LaTex] How to set up partial toprule and make even sub columns

tables

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 am currently at

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,
Hoping to finish like this

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.

\documentclass{article}
\usepackage[T1]{fontenc}

%%% change contents font %%%
\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault} 
%%% %%% %%% %%% %%% %%% %%%%

\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}
\begin{table}
\newcommand{\fl}[1]{\makebox[.15\textwidth]{#1}}
\centering
\begin{tabular}{
  l
  *{4}{S[table-format=1.4]}
 }
& \multicolumn{4}{c}{\textbf{REVENUE INTERESTS}}\\
\cmidrule[\heavyrulewidth]{2-5}
& {\fl{Expense}}  & {\fl{Oil/}}       & {\fl{Plant}}    &       \\
& {\fl{Interest}} & {\fl{Condensate}} & {\fl{Products}} & {\fl{Gas}} \\
\cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
\textbf{INITIAL} & 1.2345 & 1.2345 & 1.2345 & 1.2345 \\
\textbf{FINAL}   & 1.2345 & 1.2345 & 1.2345 & 1.2345 \\
\textbf{REMARKS} & 
  \multicolumn{4}{c}{\textbf{ALL AMOUNTS ARE EXPRESSED IN THOUSANDS OF DOLLARS.}}\\
\bottomrule
\end{tabular}
\end{table}
\end{document}

enter image description here

You get right alignment with respect to the \cmidrule with the option table-alignment=right:

\documentclass{article}
\usepackage[letterpaper, top=0.25in, bottom=0.25in, left=0.25in, right=0.25in]{geometry}
\usepackage[T1]{fontenc}

%%% change contents font %%%
\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault} 
%%% %%% %%% %%% %%% %%% %%%%

\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}
\begin{table}
\newcommand{\fl}[1]{\makebox[.12\textwidth]{#1}}
\centering
\begin{tabular}{
  l
  *{4}{S[table-format=1.4,table-alignment=right]}
 }
& \multicolumn{4}{c}{\textbf{REVENUE INTERESTS}}\\
\cmidrule[\heavyrulewidth]{2-5}
& {\fl{Expense}}  & {\fl{Oil/}}       & {\fl{Plant}}    &       \\
& {\fl{Interest}} & {\fl{Condensate}} & {\fl{Products}} & {\fl{Gas}} \\
\cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
\textbf{INITIAL} & 1.2345 & 1.2345 & 1.2345 & 1.2345 \\
\textbf{FINAL}   & 1.2345 & 1.2345 & 1.2345 & 1.2345 \\
\textbf{REMARKS} & 
  \multicolumn{4}{c}{\textbf{ALL AMOUNTS ARE EXPRESSED IN THOUSANDS OF DOLLARS.}}\\
\bottomrule
\end{tabular}
\end{table}
\end{document}

enter image description here

Related Question