カスタムコンパイルメッセージ

カスタムコンパイルメッセージ

カスタムコンパイルメッセージを作成する方法はありますか?例えば

\msg{Compiling Chapter 1}
\input{chapter1.tex}
\msg{Finished chapter compilation}

答え1

コメントでログを使いたくないと言っているのであれば、プリアンブルで新しいファイルを開いてそこに書き込んでください

\documentclass{article}

\makeatletter
\newwrite\mylog
\immediate\openout\mylog=\jobname.mylog

\newcommand\writelog[1]{%
  \protected@write
   \mylog
   {\let\tmp\write\def\write{\immediate\tmp}}%
   {#1}}
\makeatother


\begin{document}


\writelog{one}

\writelog{two}



\end{document}

1と2をファイルに書き込みます.mylog/

関連情報