[texhax] how to copy a file within eTeX?

Uwe Lück uwe.lueck at web.de
Wed Apr 7 12:31:09 CEST 2010


At 00:58 06.04.10, D. R. Evans wrote:
>My problem:
>
>I need to process a single ToC file multiple times within the course of
>compiling a single TeX file. However, since I'm also regenerating the ToC,
>I can't simply put the usual \readtoc at the points where I want the ToC
>processing to occur.
>
>My guess at a reasonable solution:
>
>Actually, I had two approaches:
>
>1. Read the contents of the ToC file into a single variable, then execute
>the variable as if it were a macro at each to the points where I want a ToC.

By accident, I just found ctan.org/pkg/catchfile that seems to do exactly this.

HTH -- Uwe.



More information about the texhax mailing list