Here I give a workable solution, but not a clever one. In whatever case, we have to make a third separate file for arXiv submission (say, with at least one line to include Supp.) unless they support supplementary directly.
Basically, the method is to append the supplementary material at the end of main text. Then add the commands to reset all counters and append the "S" for equations, figures, table and references. The resulting file would look like
The \pagebreak will put supplementary materials in the new page, but I don't know why it doesn't work here. The template codes are given below. Note the important codes is in the middle part. Also, please don't use same reference citation name, otherwise, there will be wrong numbering for citation.
\documentclass[twocolumn,superscriptaddress,floatfix,preprintnumbers]{revtex4}
\usepackage{graphics,amssymb,amsmath,epsfig,color}
\usepackage{graphicx}
\begin{document}
\title{Title for main text}
\author{You name here}
\affiliation{Somewhere}
\date{\today}
\begin{abstract}
Abstract...
\end{abstract}
\pacs{}
\maketitle
Paragraph 1. Main text here \cite{RefA}:
\begin{equation}
E=mc^2
\end{equation}
Paragraph 2.
Paragraph 3 \cite{RefB}:
\begin{equation}
S=k_B \ln(\Omega)
\end{equation}
\begin{thebibliography}{11}
\bibitem{RefA} A. Someone, C. Someone, D. Someone, Phys. Rev. Lett. {\bf 11}, 1111 (1911).
\bibitem{RefB} B. Someone, {\it et. al.}, Phys. Rev. Lett. {\bf 22}, 2222 (1922).
\end{thebibliography}
%%%%%%%%%% Merge with supplemental materials %%%%%%%%%%
\pagebreak
\widetext
\begin{center}
\textbf{\large Supplemental Materials: Title for main text}
\end{center}
%%%%%%%%%% Merge with supplemental materials %%%%%%%%%%
%%%%%%%%%% Prefix a "S" to all equations, figures, tables and reset the counter %%%%%%%%%%
\setcounter{equation}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\setcounter{page}{1}
\makeatletter
\renewcommand{\theequation}{S\arabic{equation}}
\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\bibnumfmt}[1]{[S#1]}
\renewcommand{\citenumfont}[1]{S#1}
%%%%%%%%%% Prefix a "S" to all equations, figures, tables and reset the counter %%%%%%%%%%
\section{Section 1}
Copy and paste your Supplemental Materials text here \cite{S_RefA}, blah, blah, blah, blah, blah, blah, ...
\begin{equation}
i\hbar\frac{\partial}{\partial t}\psi(x,t) = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\psi(x,t) + V(x,t) \psi(x,t)
\end{equation}
\begin{thebibliography}{11}
\bibitem{S_RefA} A. Someone, C. Someone, D. Someone, Phys. Rev. Lett. {\bf 11}, 1111 (1911).
\end{thebibliography}
\end{document}
I did it not in a perfect way, but it will probably work:
\def\bibsection{}
% This will remove the section title, so the line will be removed
\centerline{ \textbf{\large Supplementary References } }
% Add the reference section title as: Supplementary References
% You can put it in another style you need
\bigbreak
% create some space
Best Answer
Hyperref does cunning things behind the scenes with counters when it adds links, which is why resetting the counter will cause confusion with the corresponding hyperlinks. To get around this you either need to fool hyperref or to fool latex into doing what you want.
I think that fooling latex is probably easier so I suggest redefining the figure counter. Rather than resetting the counter to
0
you can "remember" the number of figures in the main document, say in a macro\presupfigures
, and then redefine\thefigure
so that it prints anS
together with the "adjusted" figure number obtained by subtracting\presupfigures
:Here
\fpeval
, from the xfp package, is a convenient way to do the subtraction but of course there are other ways to do this.The following MWE gives the full details. For completeness, I have also adjusted the section number in the same way.
Here is the output:
You can't check that the hyperlinks work from this image but you will find that they work if you compile your own version of the MWE.
BTW, it is better if you provide a minimal working example when asking questions. I am not completely sure that I have solved your problem because the question does not contain enough information to reproduce it.