[Tex/LaTex] achemso package: referencing multiple figures

achemsocross-referencing

I am using the achemso package to submit a paper to Environmental Science and Technology. When I include a reference to a figure (\ref{Fig1}), the figure number appears preceded by the word "Figure." I would like to reference "Figures 1-2", but using \ref{Fig1,Fig2} gives an error and \ref{Fig1}-\ref{Fig2} gives "Figure 1-Figure 2."

Best Answer

Use the cleveref package and the \cref command. It automatically sorts and compress the references. For instance, typesetting \cref{Fig1, Fig5, Fig2, Fig3} will print figures 1-3 and 5 (if they're labelled so). If later your figures become another structure (say a table), the names will change accordingly. It has a multilingual support.

For the current versions of achemso and cleveref (7/2015), this looks like the following. You might want to read the cleveref manual on how to get a hyphen instead of the word "to".

% arara: pdflatex

\documentclass{achemso}
\title{title}
\usepackage{cleveref}

\begin{document}    
\begin{figure}
    \rule{1cm}{1cm}
    \caption{captioneins}\label{fig:labeleins}
\end{figure}
\begin{figure}
    \rule{1cm}{1cm}
    \caption{captionzwei}\label{fig:labelzwei}
\end{figure}
\begin{figure}
    \rule{1cm}{1cm}
    \caption{captiondrei}\label{fig:labeldrei}
\end{figure}

\Cref{fig:labeleins}, \cref{fig:labeleins,fig:labelzwei}, \cref{fig:labeleins,fig:labeldrei}, and \cref{fig:labeleins,fig:labelzwei,fig:labeldrei}
\end{document}

enter image description here

Related Question