我的部分代码如下:
\documentclass[letterpaper,12pt]{article}
\pagestyle{myheadings}
\markright{}
\usepackage{setspace}
\doublespacing
\usepackage{graphicx}
\graphicspath{ {pictures/} }
\usepackage[space]{grffile}
\usepackage{cite}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[mathscr]{euscript}
\usepackage{eufrak}
\usepackage{fixmath}
\usepackage{bm}
\usepackage{caption}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{subcaption}
%\usepackage{lscape}
\usepackage{booktabs}
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
\date{}
\pagenumbering{roman}
\begin{document}
\thispagestyle{empty}
\newpage
The TPR and TNR are summarized in Table and plotted in Figures (\Cref{figboxUsensi, figboxUspeci}).
\begin{figure}
\centering
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Usensi nw15.png}
\caption{Boxplot of TPR on $\mathbf{u}$ dimension for nw15} \label{fig:boxUsensinw15}
\end{subfigure}
\caption{Boxplot of TPR on $\mathbf{u}$ dimension for nw1, nw10 and nw15.}
\label{figboxUsensi}
\end{figure}
\begin{figure}
\centering
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Uspeci nw15.png}
\caption{Boxplot of TNR on $\mathbf{u}$ dimension for nw15} \label{fig:boxUspecinw15}
\end{subfigure}
\caption{Boxplot of TNR on $\mathbf{u}$ dimension for nw1, nw10 and nw15.}
\label{figboxUspeci}
\end{figure}
\end{document}
但我得到了这个:
TPR 和 TNR 总结在表中,并绘制在图中(图 1 和??)。
这是包裹订购的问题吗?谢谢!!
答案1
\ref
使用带有或的标签名称时的“常见”错误或拼写错误\cref
是空格字符实际上很重要(或者更好的是,将其删除很重要)
\Cref{figboxUsensi, figboxUspeci}
将照看名为(但不带引号)的标签
“无花果盒Uspeci”
并不是
“figboxUspeci”
不要在标签名称之前或之后使用空格字符\ref
或\cref
等命令。
\documentclass[letterpaper,12pt]{article}
\pagestyle{myheadings}
\markright{}
\usepackage{setspace}
\doublespacing
\usepackage[demo]{graphicx}
\graphicspath{ {pictures/} }
\usepackage[space]{grffile}
\usepackage{cite}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[mathscr]{euscript}
\usepackage{eufrak}
\usepackage{fixmath}
\usepackage{bm}
\usepackage{caption}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{subcaption}
%\usepackage{lscape}
\usepackage{booktabs}
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
\date{}
\pagenumbering{roman}
\begin{document}
\thispagestyle{empty}
\newpage
The TPR and TNR are summarized in Table and plotted in Figures (\Cref{figboxUsensi, figboxUspeci}).
\begin{figure}
\centering
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Usensi nw1.png}
\caption{Boxplot of TPR on $\mathbf{u}$ dimension for nw1} \label{fig:boxUsensinw1}
\end{subfigure}
\vspace{3 ex}
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Usensi nw10.png}
\caption{Boxplot of TPR on $\mathbf{u}$ dimension for nw10} \label{fig:boxUsensinw10}
\end{subfigure}
\vspace{3 ex}
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Usensi nw15.png}
\caption{Boxplot of TPR on $\mathbf{u}$ dimension for nw15} \label{fig:boxUsensinw15}
\end{subfigure}
\caption{Boxplot of TPR on $\mathbf{u}$ dimension for nw1, nw10 and nw15.}
\label{figboxUsensi}
\end{figure}
\begin{figure}
\centering
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Uspeci nw1.png}
\caption{Boxplot of TNR on $\mathbf{u}$ dimension for nw1} \label{fig:boxUspecinw1}
\end{subfigure}
\vspace{3 ex}
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Uspeci nw10.png}
\caption{Boxplot of TNR on $\mathbf{u}$ dimension for nw10} \label{fig:boxUspecinw10}
\end{subfigure}
\vspace{3 ex}
\begin{subfigure}{\textwidth}
\includegraphics[height=0.3\textheight]{boxplot Uspeci nw15.png}
\caption{Boxplot of TNR on $\mathbf{u}$ dimension for nw15} \label{fig:boxUspecinw15}
\end{subfigure}
\caption{Boxplot of TNR on $\mathbf{u}$ dimension for nw1, nw10 and nw15.}
\label{figboxUspeci}
\end{figure}
\end{document}