Hi. Preparing a book for a client. I have used separate chapter number (appendix number) and chapter title styles. This is so that I can have the number and title paragraphs styled separately. However, when I run the TOC, I get this:
But I would like to have this (aside from the squished page numbers, which I know how to fix):
I have tried putting the chapter number style in the TOC spec with chapter name set as "run-in" but that doesn't seem to do the trick. Here is my current set up:
Numbered paragraphs are set to Full Paragraph. For what it's worth, here is the numbering specification for chapter number:
Of course, I can add Chapter X and Appendix X manually... but I would really like to find some way of adding them automatically. In worst-case, I could go back and make all the chapter titles into numbered paragraphs... but since the numbered chapter numbers are not showing up, I'm not even sure that would work.
I might be missing the point you already made, but you use the ToC generator to gather strings of text based on style, but then you also have to apply another ToC style to the text it gathers. Two styles are involved. Don't just leave it to style the text with the same style. Make a ToC style that applies the numbering to the original chapter style.
Hi. Thanks much for your reply. Yup -- I'm aware of the two-style issue (one in the chapter and a corresponding one one in the TOC only) and that is not the point. I've done many TOCs... but never had to include a chapter number before, so I have never encountered the problem.
For whatever reason, the content of the auto-numbered paragraph ChapNum located in the chapter (which says, essentially Chapter <num> and nothing else -- not even the chapter name) does not show up in the TOC. Evidently, this is an ongoing problem and has several mentions in the support pages (I saw the complaints after I posted). A section number CAN show up... but not an autonumbered chapter number. I'm sure people in the support group know better and can correct me (please!)... but <shame> I was in a hurry.
I solved the problem left-handed by creating TOC styles that auto-number the TOC title heads and -- wonder of wonders -- those numbers correspond to the Chapter numbers in the chapters. (They're not connected; it's simply a one-to-one correspondence.) I found this solution in a blog post out on the net. I should not have to do this, because it requires a little handwork to change from chapter to appendix. There is no good reason that I can think of that autonumbered section number paragraphs can appear in a TOC, but autonumbered chapter numbers paragraphs cannot. And yet... they don't. They simply do not appear, even when I put ChapNum into the TOC styles specification that reads the paragraph content from the book files.
There also seems to be a work-around where the entire chapter is assigned a section number, and then that is used in the TOC (because... section numbers), but the work-around seemed extremely complicated and was not well explained, while the solution that I found in the blog -- autonumbering the TOC styles themselves -- is simple and direct.
Again, thank you for taking the time to read and aswer. If anyone has a different -- or better -- answer to getting the autonumbered chapter number and the title of the chapter into the TOC, I'd still love to hear it because my solution is kind of a kludge.
You actually did the actual method--auto-numbering the TOC chapter styles.
It does mean that you typically need extra styles in your TOC that correspond with the document, but that would happen even in FrameMaker which can pick up the style numbering from the chapters.
For example, in the book:
In the TOC Style, you would match the chapter styles to the appropriate TOC styles:
PS: Being left handed, I'm not sure how to take "solved the problem left-handed". 😁
The Run-In option isn't going to do what you want. It is used for multiple consecutive styles with same style assigned. For example, instead of:
you will get
subhead 1; subhead 3; subhead 5
So it comes down to how you designed your chapter numbers and titles in the body of the document. If they need to be separate paragraphs for whatever reason, then they will come in to the TOC as separate paragraphs. Combining will be manual.
The two options from here are 1.) add auto-numbers to the TOC styles (you already figured that out and it would have been one of my suggestions) or 2.) edit the chapter numbers and titles in the body of the document so that they are one paragraph with a line break (and perhaps a character style to make the numbers look different—but that can become a different can of worms if you are not using a book file), and then remove the line break in the TOC (it's a checkbox so that it is automatic.)
Really, I think you are good to go.