原稿とその改訂レポートがあります。この原稿のいくつかの文章を抜粋として改訂レポートに挿入する必要があります。抜粋をマクロとして定義したり、抜粋を別のファイルに入れてから挿入したりする代わりに、改訂レポートで原稿のテキストを使用するより良い解決策はありますか?
次のような解決策を期待しています:
の内容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}
これで問題は解決するはずですが、あなたの質問を正しく理解できたかどうかは完全にはわかりません。