LaTeX ファイルを前処理します (latex -E と同等)

LaTeX ファイルを前処理します (latex -E と同等)

重複の可能性あり:
\input{fileX}をfileXの内容で自動的に置き換えます

私は LaTeX プロジェクトの依存関係を管理するためのフレームワークを開発していますが、前処理済みの LaTeX ファイルを取得する簡単な方法があるかどうかわかりません。

たとえば、私のがmain.tex次のようになっている場合:

\documentclass{article}
...
\newcommand{\specialpath}[0]{../foo/}
\input{\specialpath extracommands}
...
\begin{document}
    \input{introduction}
    ...
\end{document}

私が欲しいのは:

\documentclass{article}
...
% Content of ../foo/extracommands.tex
\usepackage{minted}
\newcommand{\whatever}
% end
...
\begin{document}
    % Content of introduction.tex
    \section{Introduction}
    \lipsum[1-4] % Or even the developpement of the command
    % end
    ...
\end{document}

言い換えれば、 LaTeX のgccフラグに相当するもの-E(またはそれを実行できるユーティリティ) はあるのでしょうか?

答え1

使いたいのだと思います\リストファイル

関連情報