[tex-eplain] multiple contents problem

Stepan Kasal kasal at ucw.cz
Mon May 16 14:48:49 CEST 2005


Hello Gerald,

On Mon, May 16, 2005 at 02:05:33PM +0200, Gérald Tenenbaum wrote:
> Can one help me getting the same on unix as on mac?

(First I have to apologize.  When I looked at your problem this morning,
I wasn't careful enough.  I was happy that the _text_ is there and I
haven't noticed that the problem is with partial toc.)

With your current example:

In the current version of eplain, \readtocfile end with
	\ifrewritetocfile \opentocfile\endif			(1)

So when you call \readtocfile again, it's already truncated.

(To find the definitions, note that \readtocfile is \readcontentsfile{toc}
and \opentocfile is \opencontentsfile{toc}.)

For example, if you run "tex Main" to create mainfile.toc and then add
\rewritetocfilefalse to the top of Main.tex, you'll get the contents
at the top of Second.tex.

Solution:  ?

I think that the line (1) cited above can be deleted.
So redefine \readcontentsfile at the top of Main.tex and I hope things
will work.

To the maintainer:
Why does \readcontentsfile{toc} call \opentocfile?
Given that \opentocfile is called from \writecontentsentry, I see no
need for this.
If a user wishes to include the toc file seven times before the first
\writecontentsentry appears, why not?

Have a nice day,
	Stepan Kasal



More information about the tex-eplain mailing list