
내가 이해한 바에 따르면, 제대로 사용하려면 \@writefile
다음과 같이 쓰기 스트림을 차단해야 합니다.
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\makeatletter
\newwrite\tf@foo
\openout\tf@foo=\jobname.foo
\newcommand\foo[1]{%
Writing ``#1'' to \texttt{\jobname.foo}!%
\protected@write\@auxout{}{\string\@writefile{foo}{#1}}%
}
\makeatother
\foo{Bar}
\end{document}
(실제로는 .을 .foo
포함하는 한 줄의 파일을 생성합니다 Bar
.)
쓰기 스트림을 차단하는 방법이 있나요?