我尝试在自定义标题/浮点环境中使用子浮点数。但是出现了编译错误。
梅威瑟:
\documentclass[a4paper]{report}
\usepackage[margin=10pt,font=small,labelfont=bf,justification=centering,belowskip=0pt]{caption}
\usepackage[nameinlink,noabbrev]{cleveref}
%%Charts
\DeclareCaptionType[fileext=loc,placement=b,within=chapter]{chart}[Chart][List of Charts] %list of charts is generated by \listofcharts
\crefname{chart}{chart}{charts}
\begin{document}
\begin{chart}[!h]
\centering%
\subfloat[Test 1]{\includegraphics[width=0.4\textwidth]{Test1.pdf}\label{chrt:Tests:1}}%
\quad%
\subfloat[Test2]{\includegraphics[width=0.4\textwidth]{Test2.pdf}\label{chrt:Tests:2}}%
\caption{Tests}%
\label{chrt:Tests}%
\end{chart}
\end{document}
如果我改为\begin{chart}
并且\begin{table}
这\end{chart}
突然\end{table}
就起作用了......