blefloch / latex-morewrites

Always room for a new write
7 stars 0 forks source link

\tableofcontents and .toc, .lof, and .lot files are blank when including morewrites #12

Closed cweedall closed 7 years ago

cweedall commented 7 years ago

No error messages involved with this one. Compilation runs fine. Problem is, with the resolution to #10 and #11 I am getting nothing output to the .toc, .lot, and .lof files if I use \tableofcontents in a document with \usepackage{morewrites} in the preamble. Here is a MWE:

\documentclass{article}

\usepackage{morewrites}

\begin{document}

\tableofcontents
------------------------------------------------
\section{First test}
Test
\section{Second test}
Test2

\end{document}

Yes, I did try compiling twice. If you compile twice with morewrites, nothing. If you compile twice without it, the table of contents data appears following the second compilation.

blefloch commented 7 years ago

Thanks. When files are closed explicitly with \closein I was closing them properly but I didn't use the right list of files to close at the end of the run. You may have ended up with empty files named 4.tex or similar. If they are indeed empty you can delete them.

cweedall commented 7 years ago

Hmm...I didn't notice any empty .tex files. In the .log file, I see

(C:\FOLDERPATH\test.toc)
\openout4 = `test.mw'.

[1

]
(C:\FOLDERPATH\test.mw)
\openout4 = `test.mw'.

\tf@toc=\write19
\openout4 = `test.toc'.

(C:\FOLDERPATH\test.aux
\openout4 = `test.mw'.

\openout4 = `test.mw'.

\openout4 = `test.mw'.

\openout4 = `test.mw'.

\openout4 = `test.mw'.

\openout4 = `test.mw'.

Anyhow, I recompiled your changes and tested in a MWE and my thesis and both documents properly write to .toc files and subsequently typeset the table of contents on the second compilation. Thanks for the help!

blefloch commented 7 years ago

Thank you very much for your reports!