У меня есть рукопись и отчет о ее доработке. Мне нужно добавить некоторые предложения из этой рукописи в отчет о доработке в качестве отрывков. Вместо того, чтобы определять отрывки как макросы или помещать отрывки в другой файл, а затем включать их, есть ли лучшее решение использовать текст рукописи в отчете о доработке?
Я ожидаю решения вроде:
Содержание 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}
Это должно сработать, хотя я не совсем уверен, что правильно понял ваш вопрос.