I am using threeparttable to create a table in latex. The problem is with this command the caption of the table is automatically splitting into half or random width and not in a full sentence width. Is there any way to fix it?
usepackage{tabularx}
usepackage{threeparttable}
usepackage{chemformula}
begin{document}
begin{table*}[hbtp]
begin{threeparttable}
centering
begin{tabular}{llcc}
toprule
Surface Condition & pH & $Gamma_{rm e}^{a}$ & $Gamma_{rm e}- Gamma_{rm e}^{rm SPM}$ \
midrule
SPM w/o FeCl3$^*$ & 3 & 1.7 & 15.2 \
SPM FeCl3 & 2 & 5.6 & 11.3 \
SPM FeCl3 & 3 & 3.0 & 17.9 \
SPM FeCl3 & 4 & 16.6 & 3.0 \
SPM FeCl3 & 5 & 3.0 & 10.7 \
SPM FeCl3 & 7 & 16.5 & 14.0 \
bottomrule
end{tabular}
caption{Summary of $Gamma_{rm e}$ calculated from ED profiles extracted from XRR data.}
label{table:ref_gamma}
begin{tablenotes}
footnotesize
item [a] The excess of surface electron density in ED profiles, $Gamma_{rm e}=int[rho(z)-rho_{rm sub}(z)]{rm d}z$. \
item[*] $Gamma_{rm e}$ for SPM w/o ch{FeCl3} is considered as $Gamma_{rm e}^{rm SPM}$ and used to calculate ions ED.
end{tablenotes}
end{threeparttable}
end{table*}
end{document}
Trying to use threeparttable in latext but ending up with allignement issues in the table captiongenerated table
2