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.
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.
Robert
18 Mar 10 at 2:21 pm
Hello Robert,
Please send me a demo, and your log file: joseph.wright@morningstar2.co.uk
Joseph Wright
18 Mar 10 at 2:33 pm
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.
Robert
18 Mar 10 at 2:52 pm
The interaction with hyperref should work with the latest version of achemso: please take a look at the docs for details.
Joseph Wright
18 Mar 10 at 3:18 pm
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.
Jon
16 Apr 10 at 8:20 pm
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
Ted
25 Dec 10 at 8:02 am
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.
Joseph Wright
25 Dec 10 at 10:10 am
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.
Bin
3 Feb 12 at 6:46 pm
As of v3.6, I have removed
clevereffromachemsoas there are some issues with load order. You can also use\plainrefto insert a reference without any additional formatting.Joseph Wright
3 Feb 12 at 8:08 pm
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
Bin
3 Feb 12 at 8:21 pm
\AAis not valid in math mode: there will be a warning in the log. Use it in text mode.Joseph Wright
3 Feb 12 at 8:24 pm
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.
Bin
3 Feb 12 at 8:24 pm
Hm.. I’m pretty sure $\mathrm{\AA}$ actually works fine in a normal “article” class.
Bin
3 Feb 12 at 8:27 pm
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.
Joseph Wright
3 Feb 12 at 8:29 pm