How do I title chapters in ToC?

When I compile to an epub, the epub creates a ToC, and literally every entry in it is named the title of the entire work. Identical names. If the work is named ‘Test’, every entry in the generated ToC is named ‘Test’. If I rename the project to Test2, now every link is named ‘Test2’. It’s that in both the internal ToC, and the HTML ToC if I generate that.

The only way I can make it use the actual names is assigning those sections ‘as-is’, which is obviously rather stupid to have to do. I’ve looked a dozen times in the in the ‘Edit Format’ screen to try to figure this out (It doesn’t help ‘as-is’ is not a real format so can’t be copied or looked at), but I recently realized the default formats shouldn’t be doing this absurdity, so this isn’t me screwing something up.

And as far as I can imagine, for this to be something I did, I’d have to have put in the $projectname substitution somewhere, because the name does change when the project name does, so I didn’t just absent-mindedly written the project name somewhere. I cannot find anywhere that I could have possibly done so, especially when I use the built-in formats and so my configuration options are limited to the six config ‘tabs’ in the right side of the main compile window.

So what is going on?

How is your project structured in the binder?

To replicate what is going on, create an empty project, named ‘Project Name’. Create a folder in it, name it ‘This is what this folder is named’ and create a document in that folder named anything and type something in it.

Compile it, as ‘Novel’, to epub. Open it up,and look at the ToC. (Either the HTML document generated as the ToC, or the internal epub ToC.) You will see one entry, saying ‘This is what this folder is named’. This is 100% correct. It compiled correctly, because that folder used the ‘as-is’ section layout.

Go back to compile, and assign the ‘Heading’ section from ‘as-is’ to ‘Section Title’. (Or any other) Compile it, open up the epub, and look at the ToC. The ToC’s entry is now, very idiotically, named ‘Project Name’.

If you copy that folder structure, making multiple entries in the ToC, you will realize it is naming all of them ‘Project Name’!

This cannot possibly be expected behavior.

There’s more complicated wrong behaviors (Files do the same sort of thing if you make them show up in the ToC via page breaks and they’re not ‘as-is’, so you can get weird mixes and matches of right and wrong behavior), but that shows the basics of the problem.

Take a look at Chapter 23.8 and Appendix D in the manual.

You assign the chapter titles using the ‘Section Layout’ button/pane in the ‘Formatting’ tab of the Compiler. Click on the Folder level hierarchy (usually Level 1+) to highlight it, then click on the "Section Layout’ button to get to the setup pane.

See attached screencap - note that the checkbox for ‘Title’ is unchecked because the ‘Section Layout’ settings are replacing it. Note also that even though I typed ‘Chapter’ it is showing ‘CHAPTER’ because of the setting in the ‘Case’ tab of the ‘Section Layout’ pane.

What does the chapter prefix have to do with the name in the TOC?

I will repeat, again, as I’ve tried to make very very clear, because I know every single person would misunderstand: I am not trying to do anything in the generated text.

Literally nothing. Prefix and suffix mean nothing here. My chapters have the correct text at the top of them. I know how to put whatever header I want at the top of them. And bottom.

What they do not have is correctly named links to them in the generated epub ToC. Those links, completely inexplicably, are the name of the entire project, unless the type of the thing-linked-to is type as-is, at which point they gain the correct names.

This is on the newest beta of Windows, although the problem’s actually existed for previous versions.

Here is what it looked likes. The title showing up in the chapter is ‘Here is the title prefix - This is the name of the folder -Here is the title suffix’, because I put in a title prefix and title suffix.

The actual link to the damn thing is named ‘Test2’, which is the title of the entire project.

And here it is when I change the folder to ‘as-is’. Suddenly, the compiler figures out what the name of the folder was, and correctly names the link that instead of ‘Test2’!

It would be better if you posted this in the Beta forum, which is more closely monitored by L&L staff.