I was wondering if there is a way in which I can reuse the code, for example one figure, that is written in one file into another file.
I want to use something similar to
xr package that allows you to reuse the labels references from one file into another. But I want to use it in the figures code or in entire paragraphs.
To illustrate what I need to do lets assume I have a file A.tex in which I already define a figure. And I have another file B.tex. And now I want to use the same definition of the figure in B. However, I want to "link" to the figure code in A; because if I do some change in A, I don't have to copy and paste everything in B again. Also, I want to do this with paragraphs. It is kind of quoting the previous file.
Is it possible using LaTeX? What do you suggest me to do?
I need to do this "copy & paste" to include text and figures from the main document, into a second one. This references should have the same number of figures, and same bibliography reference, etc. That's why I say that I need something similar to
I tried using
\input to see if it was readable. However, I run into another problem. The number of figures and references are not maintained in the second document. The
\include creates new numbers for each document. But I need to maintain the same as the original document.
Is there a way to do this "copy & paste" automatically?