Tenho um manuscrito e seu relatório de revisão. Preciso colocar algumas frases deste manuscrito no relatório de revisão como trechos. Em vez de definir trechos como macros ou colocar os trechos em outro arquivo e depois incluí-los, existe solução melhor para utilizar o texto do manuscrito no relatório de revisão?
Espero uma solução como:
Conteúdo 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.
...
Conteúdo de revisionReport.tex
:
...
Here we include the following excerpt from the revised manuscript:
\externalizedtext{excerpt1}
...
Responder1
Você pode usarfilecontents
para criar arquivos de trechos dinamicamente:
Conteúdo 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}
Conteúdo de revisionReport.tex
:
\documentclass{article}
\begin{document}
...
Here we include the following excerpt from the revised manuscript:
\input{excerpt1.tex}
...
\end{document}
Isso deve funcionar, embora eu não tenha certeza se entendi sua pergunta corretamente.