adjustbox の \ref の参照が間違っています

adjustbox の \ref の参照が間違っています

テーブルを回転するには、 を使用しました\begin{adjustbox}。しかし、参照すると \ref{} に間違った ID が表示され、 \centering が機能しません。どうすれば修正できますか? ありがとうございます!

ここに画像の説明を入力してください

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}

答え1

キー値オプション\labelの一部として を含める必要があります:caption

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

関連情報