ajustarbox tiene una referencia incorrecta en \ref

ajustarbox tiene una referencia incorrecta en \ref

Para rotar una mesa, usé \begin{adjustbox}. Pero \ref{} muestra una ID incorrecta cuando hago referencia a ella y \centering no funciona. ¿Como arreglarlo? ¡Gracias!

ingrese la descripción de la imagen aquí

Este es el entorno utilizado en el archivo tex:

\documentclass{sokendai_thesis} % https://github.com/koikezlemma/phd_thesis_template/blob/master/sokendai_thesis.cls

\usepackage{adjustbox, booktabs}

\begin{document}

\section{AA }


Table \ref{tab:testtable}

% https://tex.stackexchange.com/questions/566793/rotate-two-tables-including-caption-on-the-same-page
\begin{adjustbox}{angle=90, caption={Summary of XXX.}, float=table}\label{tab:testtable}
\centering\small
\begin{tabular}{llll}
\toprule
& A       &  B    & C \\
\midrule
& 1       &  2   & 3 \\
& 1       &  2    &3  \\
\bottomrule
\end{tabular}
\end{adjustbox}


\end{document}

Respuesta1

Debe incluir \labelcomo parte de la captionopción clave-valor:

\begin{adjustbox}{..., caption={Summary of XXX.\label{tab:testtable}}, ...}
  %...
\end{adjustbox}

información relacionada