Adjustbox tem uma referência errada em \ref

Adjustbox tem uma referência errada em \ref

Para girar uma tabela, usei \begin{adjustbox}. Mas \ref{} mostra um ID errado quando me refiro a ele e \centering não funciona. Como corrigi-lo? Obrigado!

insira a descrição da imagem aqui

Aqui estão os ambientes usados ​​no arquivo 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}

Responder1

Você deve incluir \labelcomo parte da captionopção de valor-chave:

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

informação relacionada