将交叉引用合并到多个图形中

将交叉引用合并到多个图形中

我正在写一篇论文自动化杂志格式。示例和样式文件可以在这里

我想使用交叉引用来引用多个图表,例如Fig.~\ref{fig:aaa,fig:bbb,fig:ccc}并得到Fig. 1-3结果。网上有些人建议使用cleveref包。我的问题是,cleveref当它与此日志的样式一起使用时会崩溃,并出现以下错误:

TeX capacity exceeded, sorry [input stack size=5000]. }{}

Latex 错误

\documentclass[twocolumn]{autart}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{listings}
\usepackage{multicol}
\lstset{tabsize=2}
\usepackage{color}
\usepackage[demo]{graphicx}
\graphicspath{ {images/} }
\usepackage{svg}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{float}
\usepackage{subfig}
\usepackage{tabularx}
\usepackage[hyphens]{url}
\usepackage[T1]{fontenc}
\usepackage{bigfoot}
\usepackage[numbered,framed]{matlab-prettifier}
\usepackage{array}
\usepackage{hhline}
%\usepackage{cleveref}

\begin{document}

\begin{frontmatter}

\title{Title, Title, Title, Title, Title, Title}

\begin{keyword}
aa, bb, cc
\end{keyword}  

\begin{abstract}
abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, abstract, 
\end{abstract}

\end{frontmatter}

\section{Introduction}

Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, Introduction, 

\section{part1}

See Fig.~\ref{aaa,bbb,ccc}

\begin{figure}[H]
    \centering
    \includegraphics[width=\columnwidth]{aaa}
    \caption{aaaaaaaaaaaaaaaa}
    \label{fig:aaa}
\end{figure}


\begin{figure}[H]
    \centering
    \includegraphics[width=\columnwidth]{bbb}
    \caption{bbbbbbbbbbbbbbbbb}
    \label{fig:bbb}
\end{figure}


\begin{figure}[H]
    \centering
    \includegraphics[width=\columnwidth]{ccc}
    \caption{cccccccccccccccccccc}
    \label{fig:ccc}
\end{figure}

\end{document}

答案1

我不确定这是否算作 中的错误。虽然、和被使用,但autart.cls没有\part定义。\@addtoreset{section}{part}\def\partname{Part}\def\lb@part{PART \thepart.\half@em}

我修改了 MWE,使其更加简约。

\documentclass[twocolumn]{autart}
\newcounter{part}
\usepackage{cleveref}

\begin{document}
\begin{frontmatter}
\title{How I Got Away}
\author{C. W. Coop}
\begin{abstract}
Jumping from a 727 is not as easy as it might first appear.
\end{abstract}
\end{frontmatter}

\section{Bring your own parachute}
\end{document}

相关内容