5

I am in the process of writing two documents, one is the main file and one is a supplementary file. Both use the article class. I can refer to the second from the first quite happily using the xr package.

What I would ideally like is for the sections, figures and tables in the supplementary document to be S1, S1.1, Fig. S1, Table S1 etc., and for my references to the supplementary document from the main one to reflect that so I can say "(See Fig. S12)".

Is there a package or a class which will allow me to do this in a straightforward fashion?

Many thanks, Kris.

1 Answer 1

3

Turns out that the answer was very simple. Just add the following code to the start of the supplementary document:

\makeatletter
\renewcommand \thesection{S\@arabic\c@section}
\renewcommand\thetable{S\@arabic\c@table}
\renewcommand \thefigure{S\@arabic\c@figure}
\makeatother

If there are other things you want prefixed (e.g., equations) you can just add in the extra \renewcommand 's.

The xr refs work as I wanted too.

Best wishes, Kris.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .