# achemso: Cross-referencing to floats

I’ve had a a few questions about the achemso bundle concerning creating references such as “Figures 1 to 3” automatically. The problem has been that I’ve been using the varioref package to turn \ref{some-fig} in “Figure 1” automatically, rather than having to put Figure~\ref{some-fig}. Unfortunately, varioref does not handle multiple references in an automated fashion.

For version 3.4 of achemso (which I’ve just sent to CTAN), I’ve switched to the cleveref package. This means that you can now write something like \ref{fig-1,fig-2,fig-3} and get “Figures 1 to 3” without further effort. I hope that this makes life much easier for users, although it does mean that there is another package required to use achemso. I think that this is the right balance: I’m sure users will let me know if I’ve got it wrong.

### 14 thoughts on “achemso: Cross-referencing to floats”

1. Robert

I am having a problem with my cross-references. The table references appear as

[table][1][]1

and the figures as

[figure][1][]1

It also does not pick up my references to equations claiming undefined reference. All this works as expected without achemso.

2. Robert

Error fixed when I was setting up the demo. I noticed I was including hyperref. Once it is removed from the packages everything works fine.

3. Joseph Wright

The interaction with hyperref should work with the latest version of achemso: please take a look at the docs for details.

4. Is it possible to default chemstyle to use cleveref instead of varioref? As mentioned in this post, being able to use “scheme 1 to 3” is a useful feature.

5. Ted

I have a problem with the reference of equations in achemso.

I use the following:

begin{eqnarray}
dot{y} & = & m, z nonumber \
&   &     label{eq1} \
dot{z} & = & - m, y nonumber
end{eqnarray}


and when in the document insert (ref{eq1}) the result is: (?? 1).

Can someone help?

Thanks

6. Joseph Wright

The eqnarray environment is defective: this is well-documented in LaTeX guides. As a result, it is not supported by cleveref (which achemso loads). Load the amsmath package and use an AMS environment such as aligned.

7. Bin

Is there anyway to turn off this “clever” ref and go back to the normal one? It bothers me because now I have no way of generating things like Figures 2A and 2B.

8. As of v3.6, I have removed cleveref from achemso as there are some issues with load order. You can also use plainref to insert a reference without any additional formatting.

9. Bin

Hi, Joseph:

Thanks for your response. I just found another problem with the template. Somehow when I use $mathrm{AA}$ in the tex, the angstrom sign does not show up in the final pdf. Do you have any idea how this would happen?

Thanks,
Bin

10. AA is not valid in math mode: there will be a warning in the log. Use it in text mode.

11. Bin

Also, is there anyway to rescale the fontsize for the entire document? I tried something like “fontsize{10pt}{10pt}selectfont”, but it only does the job for the main text, not for figure captions and so on.

12. Bin

Hm.. I’m pretty sure $mathrm{AA}$ actually works fine in a normal “article” class.

13. It works, but with a warning: you should not do it! On the font size, why are you trying to do this? The class is intended for submitting manuscripts, which you are not really supposed to mess about with. BTW, comments here are not the best way to ask detailed questions: please e-mail me directly.