You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something I find myself doing on a lot of projects towards the end of typesetting the rest of a book is working on the TOC design. One way to quickly iterate on this is to truncate the content temporarily to get really fast re-renders of the TOC. The problem then becomes how to get the full TOC content in the next render pass.
One solution is to stash the .toc file and restore it between builds of the truncated content.
Another is to disable writing the TOC file, but this is more complex that one would think because the hook is cached, e.g. in a project package:
functionpackage:_init()
self.class:registerPostinit(function ()
ifself.class.packages.tableofcontentsthenlocalwriteToc=self.class.packages.tableofcontents.writeTocself.class.packages.tableofcontents.writeToc=function () endfori, funcinipairs(self.class.hooks.finish) doiffunc==writeTocthenself.class.hooks.finish[i] =nilendendendend)
end
It should be easier to build a document to a certain page number and then stop having output all the rendering to date without nuking the .toc file or other artifacts from previous builds. This means triggering the hooks to finalize the PDF but not output any other meta data.
The text was updated successfully, but these errors were encountered:
towards the end of typesetting the rest of a book is working on the TOC design.
Funny fact: this is one of the first thing I do (i.e. styling decisions) when it comes to a making new book (before chapters are even known and composed).
But I 'm not using the regular ToC package (read: I'm either using my resilient.tableofcontents or my fancytoc), and my actual short-circuit exists here too (placeholders in my master document system, rather than actual chapters).
Anyhow, I am not sure how it relates to the book class (?)
Something I find myself doing on a lot of projects towards the end of typesetting the rest of a book is working on the TOC design. One way to quickly iterate on this is to truncate the content temporarily to get really fast re-renders of the TOC. The problem then becomes how to get the full TOC content in the next render pass.
One solution is to stash the
.toc
file and restore it between builds of the truncated content.Another is to disable writing the TOC file, but this is more complex that one would think because the hook is cached, e.g. in a project package:
It should be easier to build a document to a certain page number and then stop having output all the rendering to date without nuking the
.toc
file or other artifacts from previous builds. This means triggering the hooks to finalize the PDF but not output any other meta data.The text was updated successfully, but these errors were encountered: