(Edit: I solved it by accident but it is really weird so maybe someone could explain why the checked feature caused the problem - see the bottom of this post)
Scrivener 3 on Windows 10.
I am compiling to paperback and PDF. I have a book with 196 pages (the numbers show up on each page fine in footer using <$p> ) but the manually made ToC using the same <$p> for chapter titles, only goes up to page 38.
If it knows the correct page numbers to put it in the footer, why is it getting it wrong for the Chapter titles in the ToC?
Another weird thing is this ToC page number changes if I make changes to “Document Title Links”, but regardless of what I do it is still wrong in the ToC by hundreds of pages short.
My Chapters are styled with Seperator Pages set to page breaks, but I cant figure out where this problem is coming in.
EDIT: I think I might understand the problem but not how to fix it. From trying to figure out why the ToC is choosing such weird page numbering, it seems to be ignoring the end of the actual end of chapters (my scriv text files) and instead picking the moments I put lines between paragraphs (which I do in the middle of some chapters, as it is a journal log).
Here are some images to explain my issue:
- My ToC compiled to PDF shows “This is Africa” (Chap 1) starts on page 1 - okay so far.
but then “The Grand Taxi” (Chap 2) does not start on page 4 but page 17.
- So, I went looking to see what caused ToC to think Chap 2 started on page 4…
The below image shows the only possible cause, and it seems that every time I have a line break the ToC is calling it a new chapter. This tallys with the other wrong numbers in the ToC.
- So what is going on in my Scriv doc, you may ask? This is what I am doing …
As can be seen below, Page 3 is just a line break between paragraphs.
- But at the end of my chapters I never put line breaks, and this has never been a problem, but I never did a ToC before today with Scriv 3. (The lack of line break can be seen below at the end of my chapter).
- Here is my compile section layout, all my chapters use the page break section you see in the image…
So based on all that, I am pretty sure my method of line breaks between paragraphs+ lack of line breaks at end of chapters is the problem. If so, what is the best solution?
SOLUTION:
By total accident I solved this problem while trying to address a different issue.
Here is how - by going into Compile, Opening the Style Editor, Selecting Text Layout, and unchecking the “Empty Lines Across Page Breaks” - “replace empty line seperators that fall across pages” as per the image below.
now my ToC uses correct page numbers for the chapters.