한 문서의 발췌문을 다른 문서에 포함

한 문서의 발췌문을 다른 문서에 포함

나는 원고와 개정 보고서를 가지고 있습니다. 이 원고의 일부 문장을 개정 보고서에 발췌하여 넣어야 합니다. 발췌문을 매크로로 정의하거나 발췌문을 다른 파일에 넣어서 포함시키는 대신, 수정 보고서에서 원고의 텍스트를 사용하는 더 나은 솔루션이 있을까요?

나는 다음과 같은 해결책을 기대합니다.

내용 manuscript.tex:

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

내용 revisionReport.tex:

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

\externalizedtext{excerpt1}
...

답변1

당신이 사용할 수있는filecontents즉석에서 발췌 파일을 생성하려면:

내용 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}

내용 revisionReport.tex:

\documentclass{article}

\begin{document}
...

Here we include the following excerpt from the revised manuscript:

\input{excerpt1.tex}

...

\end{document}

귀하의 질문을 올바르게 이해했는지 완전히 확신할 수는 없지만 이것이 트릭을 수행해야 합니다.

관련 정보