I am working on a book project with Springer. I finished a draft with their style file and it complies well.
Now, I hope to put this on ArXiv after stripping out all the proprietary material including springer logo and their style files. I already made a amsbook version also, by changing (for example)
Springer: \abstract{foo bar}
amsbook: \begin{abstract}foo bar\end{abstract}
There are several other points as well. (\spnewtheorem vs \newtheorem etc) It took me quite some effort.
In such a case, is it possible to maintain a single TeX file, or at least two files with minimal changes, so that simultaneous editing is not so hard? It sounds painful to edit the two files synchronously whenever I find typos in the future.
One brute force way would be I make lots of source files abstract-chapter1.tex abstract-chapter2.tex etc..
and make
springer.tex
\abstract{\include{abstract-chapter1}}
amsbook-source.tex
\begin{abstract}\include{abstract-chapter1}\end{abstract}
and so forth. But this method still seems to require too much unnecessary work. Any advice would be appreciated.
\includefor the abstract, but rather\input. – egreg Jun 29 '21 at 12:56