I am writing a paper and I have the following issue:
I would like to observe the title "ultimate analysis" centered and above the columns that contain the values of C, H, N, S and O.
Similar for the title "proximate analysis", centered and above the columns which contain the values of VM, FC and Ash.
\documentclass[preprint,12pt]{elsarticle}
% !TeX spellcheck = en_US
\usepackage{multirow} % para las tablas
\usepackage{siunitx}% paquete para manejo de números y unidades
\sisetup{detect-weight, detect-display-math}
\sisetup{detect-inline-weight=math}
\sisetup{mode=text,per-mode=symbol}% modo de unidades con barra en lugar de fracción de tamaño reducido
\usepackage{booktabs}% para tablas
\usepackage{graphicx}% para gráficos
\usepackage{pgfplots}% para gráficos
\usepackage{pdflscape}% para gráficos
\pgfplotsset{compat=newest}% para gráficos
\usetikzlibrary{plotmarks}% para gráficos
\usetikzlibrary{arrows.meta}% para gráficos
\usepgfplotslibrary{patchplots}% para gráficos
\newlength\fwidth% definido en el código de Matlab
\setlength{\fwidth}{0.8\textwidth}% defino valor de parámetro fwidth de gráficos
\usepackage{tikzscale}% para gráficos
\pgfplotsset{plot coordinates/math parser=false}% para gráficos
\usepackage{overpic}% figuras
\usepackage{tikz}% figuras
\pgfplotsset{compat=1.15}
\usepackage{float}
\usepackage[margin=2.5cm]{geometry}% setea márgenes de hoja
\usepackage{bicaption}
\usepackage{makecell}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}
\usepackage[skip=1ex, labelfont=bf]{caption}
\usepackage[skip=0.333\baselineskip]{caption}
\usepackage{amssymb,amsmath}
\usepackage{tabularx}
\usepackage{url}
\def\UrlFont{\normalfont}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\setlength{\fwidth}{0.8\textwidth}
\biboptions{sort&compress}
\bibliographystyle{unsrt}
\usepackage{subcaption}
\journal{Applied Energy}
\begin{document}
\begin{table} [H]
\setlength\tabcolsep{4pt}
\caption{Characteristics of OS and biomass samples.}
\label{Chemical properties of OS and the blends}
\begin{tabularx}{\textwidth}{@{}l *{8}{C} @{}}
\toprule
Material
& \multicolumn{4}{>{\hsize=\dimexpr4\hsize+8\tabcolsep\relax}C}{\textbf{Ultimate analysis}}
& \multicolumn{4}{>{\hsize=\dimexpr4\hsize+8\tabcolsep\relax}C}{\textbf{Proximate analysis}}\\
& \multicolumn{4}{c}{(wt. \%)}
& \multicolumn{4}{c}{(wt. \%)}\\
\cmidrule(lr){2-6} \cmidrule(lr){7-9}
& \textbf{C} &\textbf{ H} & \textbf{N} & \textbf{S}& \textbf{O}$^\gamma$ & \textbf{VM} & \textbf{FC} $^{\varphi}$ & \textbf{Ash}\\
\midrule
\textbf{OS} &9.3 &2.3 &0.2 &4.0 & 11.6 &24.0 &3.4 &72.6 \\
\textbf{GP}&48.8 &6.0 &1.9 &0.2& 35.7 &72.7 &19.9 &7.4 \\
\textbf{RH}&35.3 &4.7 &0.3 &0.1& 37.8 &64.4 & 12.8 &21.8 \\
\textbf{EG}& 48.2&5.9 & $<$D.L&$<$D.L&45.7 &88.5 &11.3 &0.24\\
\bottomrule
\end{tabularx}
\smallskip\footnotesize
VM: volatile matter, FC: Fixed carbon, D.L: detention limit. All values are expressed in dry basis.\\
$\varphi$: Determined by difference: $\text{FC}=100\%-\text{VM}\%-\text{Ash}\%$.\\
All reported values are given with an error of 1\% of the value.\\
$^\gamma$: Determined by difference: \%O = 100\% - C\% - H\% - N\% - S\% - Ash\%.\\
\end{table}
\end{document}