[XeTeX] Book template with ToC

Herbert Schulz herbs at wideopenwest.com
Sun Jan 31 17:15:32 CET 2016


> On Jan 31, 2016, at 10:00 AM, Shakthi Kannan <shakthimaan at gmail.com> wrote:
> 
> Hi,
> 
> Can anyone share their book template that they use with XeTeX that can
> generate table of contents?
> 
> I have a foo.tex [1] input file which produces a foo.pdf [2] without
> the table of contents. Any idea what I could be missing?
> 
> Thanks!
> 
> SK
> 
> [1] foo.tex. http://shakthimaan.com/dump/foo.tex
> 
> [2] foo.pdf. http://shakthimaan.com/dump/foo.pdf

Howdy,

You do know that you need to run xelatex on the file at least three times? The first time it picks up information on thee Chapters and Sections, etc., and puts it in the aux file. The second run inserts a preliminary TOC as well as picking up the changed pages by inserting the TOC. The third time includes any changed page numbers in the TOC that may have occurred by inserting the TOC. Depending upon what else you are doing you may even have to run xelatex even more times.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)









More information about the XeTeX mailing list