I need to submit a paper to a journal which asks a main.tex without the supplemental section, and a separate pdf for the supplemental.
Right now I have main.tex and supp.tex for these two documents.
(1) The issue is that there are "joint" information I need in the documents. For instance in main.tex, I need to reference to labels defined in supp.tex.
(2) I also need to make sure that the theorem/properties numbering between main.tex and supp.tex are consistant. For instance if main.tex ends with theorem 3, supp.tex should start with theorem 4.
(3) The last problem is that some theorems in the supplemental are the same as in the main.tex: hence they should have the same numbering.
For (1): a solution I found is the xr package. For (3): if the same theorem appeared in the same .tex I could use restatable, but my problem here is different as I have two different files.
What is the simplest way to solve my issue? I think it is a quite common one regarding journal submissions but I haven't found a clear answer to these problems combined.
