I am submitting to a conference that allows limited number of pages. I have seen some people include the entire document in the appendix and take few important section to the main body. This way, people can choose if they want to read the full version, or the short version (rather than jumping to appendix and comming back to the main body). So, let's say I have three sections: Section A, Section B, and Section C. I want to include Abstract, Sections A, and C in the main body and put all the document (Abstract, Sections A, B, and C) in the appendix. Now, let's say there's a theorem in section A. Since section A is in the main body too, the first time it is mentioned it will be labled "Theorem 1" and in the appendix it will be labeled "Theorem 2".
\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{amsmath, amsthm, amssymb}
\usepackage[english]{babel}
\newtheorem{theorem}{Theorem}
\title{Test}
\author{M}
\date{April 2023}
\begin{document}
\maketitle
\begin{abstract}
This is abstract. I want this to be both in the main body and in the appendix.
\end{abstract}
\section{Section A}\label{sec:1}
This is Section A. The whole document should be in the appendix. This section should be in the main body.
\begin{theorem} This is theorem 1.
\end{theorem}
\section{Section B}
This section needs to only be included in the appendix.
\section{Section C}
Treat this section just like Section~\ref{sec:1}.
\end{document}
This produces the following document:
However what I want to produce is the following:
I found a way to approach this issue but it is very ugly and very complicated. Is there any clean way to achieve this?

