Incluir extractos de un documento en otro documento

Incluir extractos de un documento en otro documento

Tengo un manuscrito y su informe de revisión. Necesito incluir algunas frases de este manuscrito en el informe de revisión como extractos. En lugar de definir extractos como macros o colocar los extractos en otro archivo y luego incluirlos, ¿existe una mejor solución para utilizar el texto del manuscrito en el informe de revisión?

Espero una solución como:

Contenido de manuscript.tex:

...
Pragraph is starting.
\begin{externalize}[excerpt1]
Part that must be both in the manuscript and the revision report.
\end{externalize}
Paragraph ends.
...

Contenido de revisionReport.tex:

...
Here we include the following excerpt from the revised manuscript:

\externalizedtext{excerpt1}
...

Respuesta1

Puedes usarfilecontentspara crear archivos de extractos sobre la marcha:

Contenido de manuscript.tex:

\documentclass{article}
\usepackage{filecontents}

\begin{document}
... 

Pragraph is starting.

\begin{filecontents}{excerpt1.tex}
Part that must be both in the manuscript and the revision report.
\end{filecontents}
\input{excerpt1.tex}

Paragraph ends.

...
\end{document}

Contenido de revisionReport.tex:

\documentclass{article}

\begin{document}
...

Here we include the following excerpt from the revised manuscript:

\input{excerpt1.tex}

...

\end{document}

Esto debería funcionar, aunque no estoy completamente seguro de haber entendido correctamente su pregunta.

información relacionada