[Tex/LaTex] How to center captionof and caption in table

captionshorizontal alignmenttables

I will describe the problem:

Caption and captionof aren't centering table's titles. I provide a MWE and below an image of this problem.

    \documentclass[12pt,twoside]{report}
\usepackage[headheight=18pt,a4paper, width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm, headsep=18pt]{geometry}
\usepackage[spanish, es-noquoting]{babel}
%interprete de idioma castellano
\usepackage[utf8]{inputenc} %relacionado al input
\usepackage[T1]{fontenc} 
\usepackage{graphicx}
\usepackage{float}
\usepackage{threeparttable}
\floatstyle{plaintop}
\restylefloat{table}
\usepackage[justification=centering]{caption}

\begin{document}

\begin{table}[H]
\centering
\begin{threeparttable}
\captionof{table}{Convergencia PM6-cluster}\label{table:convergencia_cluster_PM6}
\begin{tabular}{|c|c|c|}
\hline
\textbf{nºconf} & \textbf{$\Delta G^\circ_{SS}$} & \textbf{$\Delta G^\circ_{Packmol}$} \\ \hline
5 & -64.6 & -64.7 \\ \hline
10 & -65.5 & -64.1 \\ \hline
15 & -63.7 & -66.5 \\ \hline
20 & -64.3 & -65.0 \\ \hline
250 & -66.3 & -67.0 \\ \hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \scriptsize{En la tabla se compara $\Delta G^0$ de dos métodos de solvatación (SS y Packmol) con hamiltoniano PM6. Los valores de $\Delta G^0$ se dan en Kcal/mol. La sigla SS significa Solvateshell.}
\end{tablenotes}
\end{threeparttable}
\end{table}

\begin{table}[H]
\centering
\begin{threeparttable}
\caption{Convergencia PM6-cluster}\label{table:convergencia_cluster_PM6}
\begin{tabular}{|c|c|c|}
\hline
\textbf{nºconf} & \textbf{$\Delta G^\circ_{SS}$} & \textbf{$\Delta G^\circ_{Packmol}$} \\ \hline
5 & -64.6 & -64.7 \\ \hline
10 & -65.5 & -64.1 \\ \hline
15 & -63.7 & -66.5 \\ \hline
20 & -64.3 & -65.0 \\ \hline
250 & -66.3 & -67.0 \\ \hline
\end{tabular}
\begin{tablenotes}[flushleft]
\item \scriptsize{En la tabla se compara $\Delta G^0$ de dos métodos de solvatación (SS y Packmol) con hamiltoniano PM6. Los valores de $\Delta G^0$ se dan en Kcal/mol. La sigla SS significa Solvateshell.}
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}

help!!

As you might see, the titles aren't centered with the tables.

Any help?

Best Answer

Remove \restylefloat{table} and this works fine. I suppose whatever modifications \restylefloat does to table isn't compatible with threeparttable.

Related Question