I am aware that this question seems a bit strange, but is there a way to compile and insert a document from within another document?
Let me explain exactly what I mean by this: I want to insert pages from another document into a document to show and comment on them. However, it would be important to me that this "embedded document" is compiled at the same time as the main document and does not have to already exist. I am aware that otherwise I could simply use the \includepdf command from pdfpages.
\immediate\write18to execute a command, e.g compile another document, see: https://tex.stackexchange.com/questions/20444/what-are-immediate-write18-and-how-does-one-use-them – DG' Jun 04 '20 at 21:03\inputor\includeto include child parts and packages to use complete documents as this child parts (i.e., docmute or standalone)? – Fran Jun 05 '20 at 07:21\inputto include a.texfile. I always use this to keep my code rather clean. So for example one.texfile for each section of the document. And in the "main".texfile I would input them all and compile. But I wasn't aware that you could also include real documents with their own class and\begin{document}. This is great! – Sam Jun 06 '20 at 09:00articleclass or is it astandalonething only? – Sam Jun 06 '20 at 09:02