ctwill and table of contents ToC
ctwill does not produce a ToC, even with the option +x. According to the man documentation,
• -x: omit indices, section names, table of contents
Running ctwill-twinx attempt.tex > index.tex creates a master index, but there is no table of contents.
Is this by design?
Yes, it is by design. See ctwimac.tex and pdfctwimac.tex for details about \inx, \fin, and \con. If you use ctwill +pdf (and a TeX engine for PDF output), at least you should get "bookmarks" as a table-of-contents.
In fact, the ctwill executable – just like its sibling cweave – does create files jobname.idx, jobname.scn, and jobname.toc (replace jobname appropriately). It's just the TeX macros that are not elaborate enough to process these informations at this time. (Personally, I never came around to even learn the usage of ctwill-twinx to generate a “master index” for ctwill.w and common.w.) Feel free to write extensions and submit a pull request.
Thanks. I got it after looking at the different definitions of those macros. When using ctwill, \con is never defined. It seems to be a strange choice. I can't think of any reason why ctwill should have an harder time building the ToC. I will try to write an extension, as soon as I have time to do that.
You may want to look at CWEB 4.3 dev. The extended pdfctwimac.tex already produces a table-of-contents
- at the end of the PDF
- it does not yet cooperate with
pdfwebtocfront.tex - all page numbers are 0
Hi again. I am trying to get this solved. I looked into the current version ofpdfctwimac.tex, and it seems it still does not produce a ToC. Did you reference the wrong branch on your last comment?
The current state of affairs is CWEB 4.9 dev and CWEBbin 4.9 dev. Table-of-Contents in CTWILL was not on the top of the list.