Jump to content
You must now use your email address to sign in [click for more info] ×

Table of Contents, using Sections and Styles


Recommended Posts

The book I'm working on has many sections, whose titles are displayed in the heading of the pages.

I start a new section with each chapter with the Chapter number (i.e. Chapter 5) and then every page after it has a section title that is displayed in the header, sometimes for one page, sometimes for more. The Chapter title is displayed with a unique text style, as are the section titles in the heading.

I'd like to generate a Table of Contents that draws the Chapter titles, then shows the sections titles within each chapter indented under each chapter title. Right now I can select the two styles and generate a table of contents with all the chapters and sections, however, there are two problems:

1) Everything is on the same level. How do I indent the section titles under each Chapter?

2) The section titles repeat if they repeat on multiple pages in the book. How do I get it to only show only the page where the section starts?

Lastly, with the above setup, if I only select the style used for Chapter Titles, oddly there are a few Section Titles that also show up in the ToC. This should be impossible, since the text fields for these items are only found in master pages, and the text only in the section titles. Not sure what is going on there.

Link to comment
Share on other sites

  • 2 weeks later...
On 6/5/2023 at 4:39 PM, philipt18 said:

1) Everything is on the same level. How do I indent the section titles under each Chapter?

If you want:

Chapter 1
   Section 1
   Section 2
Chapter 2

Then you need to use two different paragraph styles, one for the chapter headings and one for the section headings. Publisher will create matching TOC styles for them automatically when you can edit if you find the indenting and other formatting is not to your liking.

On 6/5/2023 at 4:39 PM, philipt18 said:

2) The section titles repeat if they repeat on multiple pages in the book. How do I get it to only show only the page where the section starts?

Don't format the repeating section titles with the same paragraph style used for the first use of the section. For example, I might use Chapter Title for the one I want included in the TOC and Chapter Name for the running header I use on every other page. Then I'd just include Chapter Title in the TOC using the checkboxes in the TOC panel.

On 6/5/2023 at 4:39 PM, philipt18 said:

Lastly, with the above setup, if I only select the style used for Chapter Titles, oddly there are a few Section Titles that also show up in the ToC. This should be impossible, since the text fields for these items are only found in master pages, and the text only in the section titles. Not sure what is going on there.

Check those section titles because they're probably formatted with the wrong style.

Good luck.

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

I don't understand why the sections are being repeated if they show up on multiple pages. A table of contents shows where sections start, not every page they're on. This seems like a bug to me. If there's a good reason for this, there should at least be an option to remove repeated entries.

Link to comment
Share on other sites

Also, it should be impossible for these random sections to show up as Chapters. The styles are set in the master pages, so there should be no difference between any sections. And when I check those section titles they indeed have the correct styles, not including the style used for chapter titles, so they shouldn't be showing up. This seems like a bug.

Link to comment
Share on other sites

7 hours ago, philipt18 said:

Also, it should be impossible for these random sections to show up as Chapters. The styles are set in the master pages, so there should be no difference between any sections. And when I check those section titles they indeed have the correct styles, not including the style used for chapter titles, so they shouldn't be showing up. This seems like a bug.

If you can provide a sample .afpub file here that demonstrates this, we users can do some analysis and see if we can tell why it's happening. Otherwise, Serif can do so using the one you uploaded when @Lee_T responds.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

10 hours ago, philipt18 said:

I don't understand why the sections are being repeated if they show up on multiple pages. A table of contents shows where sections start, not every page they're on. This seems like a bug to me. If there's a good reason for this, there should at least be an option to remove repeated entries.

The TOC isn't based on the text but the paragraph style. If you type Chapter 1 on ten pages and format all of them with Heading 1 and Heading 1 is included in the TOC then you'll have ten instances of Chapter 1 in your TOC. This isn't a bug.

But as Walt suggested it would be helpful to see your document.

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

I can't upload the whole document publically (I can upload it to Serif if they want), but here's a screenshot. A few things to note. The Chapter title (Chapter 1, etc.) and the sections are all drawn from the Section Titles. When I start a new chapter, I add a Section named 'Chapter x' and then at various points in the chapter I add named sections. The title for the Chapter is pulled from the section name, as are the headers on subsequent pages. The text fields for the Chapter Title and the Header are all in the Master Pages, so there shouldn't be any variation in styles between pages.

In the image note that the first empty entry is there because I added a section to the ToC page, but can't delete it. So I made it blank, but it still shows up in the ToC. This is because it's a blank text field in the header, but I can fix that by changing the master page to one without a header. It would be useful to be able to specify the exact range of pages for the ToC.

Next note there should be two sections in Chapter 1, but they're both repeated four times. I get why it's happening, but would appreciate a way to stop that.

Lastly, note that Chapter 3 is repeated. That doesn't make any sense as it's only there once in the document.

On a mildly related note, is there documentation or a video showing how to style the ToC? Is it just changing the paragraph style? Is there a way to add the old-style ... between entries and the page number? Thanks.

tableofcontents.jpg

Link to comment
Share on other sites

27 minutes ago, philipt18 said:

I can't upload the whole document publically (I can upload it to Serif if they want)

Understandable.

Would you be willing to produce a sample .afpub file, just a few pages, that we could look at?

For example, pages 5-7 and 21-22, with the body text replaced by Filler. You could make a copy of your actual file, then delete pages 1-4, and 8-20, and everything after page 22.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

To add to what Walt suggested, you may want to include pages 1-4 in the file you provide so we can more easily address the issue you’re having with the TOC page being included in the TOC.

I’m guessing the TOC page has the same Master Page applied to it that’s used for the body of your document. You may need to create a unique Master Page for the TOC — or simply remove the Master Page from the TOC page — so that the Text Style applied to the TOC heading can be changed to one that’s not included in the TOC.

Windows 10 22H2, 32GB RAM | Affinity Designer/Photo/Publisher 2 (MSI/EXE)

Link to comment
Share on other sites

13 minutes ago, philipt18 said:

How do you replace the text with Filler? Is there an automatic way to do that?

You can Select the existing text, and then use Insert Filler Text, which will replace the selected text with Filler. You can then Expand it to be real text.

You'll need to avoid selecting/replacing your Headings, of course.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Interesting. Of course that removes my footnotes. Not important for testing this, but it means that for creating a test file with footnotes, this wouldn't work. Odd that some of the filler text is all caps, and some is not. I had to fill more than once because some of the chapters were connected, and some not (I didn't figure out to consistently not connect them until later). I had already deleted the text field from the header, so it fixed the empty ToC entry, but I'd still like to figure out how to remove that section altogether.

toctest.zip

Link to comment
Share on other sites

I am guessing you only want the Section Names to be in the ToC once, at their first occurrence.

To do this make a new Paragraph Style (name it after the Section Name and append Invisible to it, Q Top Line Invisible) Make the colour of the text fill transparent and put a new text frame on the appropriate page. Put into the new text frame the name of the section as you would like it to appear in the ToC. Use your Chapter Title and the new Q Top Line Invisible Paragraph Styles to make the ToC.

Now you will have your Page headers (Q Top Line) and your ToC Q Top Line Invisible as separate items.

To the best of my knowledge there is no way to automate this, the placing and moving about of the Q Top Line Invisible Text Frames and content will need to be done manually.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

11 minutes ago, philipt18 said:

Any idea why Chapter 3 is repeating,

I have to think that it's something to do with you having two Master Pages applied to that page, both "Text and Chapter Start" and "No Text and Chapter Start". But I haven't figured out why.

17 minutes ago, philipt18 said:

and the last section shows up as a Chapter at the end? I assume it's the same reason.

No idea, and I'm not sure it's the same reason.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

14 minutes ago, philipt18 said:

Any idea why Chapter 3 is repeating, and the last section shows up as a Chapter at the end? I assume it's the same reason.

I think it is a result of the plethora of Master Pages. You have in essence two designs for the Pages. The bulk of the text is two pages of text, then there are the Chapter Starts. 

I would do a set like this. Note that I have named the Text frames on the Master Pages, this is one of my "Best Practice" ways of working. I also have "none" for the Actual Page that will have the ToC and have place a Frame Text text frame on it, also named.

real basic.afpub

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

@philipt18 Here's another example file for you to check out.

To avoid duplicates in the TOC, I added actual section headings within the main content. The Running Headers (top of pages above the main content) are created with the Running Header feature: Text > Insert > Fields > Running Header.

Here's info about the Running Header feature:
Page headers and footers — https://affinity.help/publisher2/en-US.lproj/pages/Pages/numberingPages.html
Running Headers (Affinity Publisher) — https://youtu.be/Amb1dIIU2ig

A few additional things to note:

  • There are only two Master Pages — one is for the beginning of each chapter, the other one is for all other main content pages.
  • The cover and TOC pages do not have a Master Page applied to them.
  • The running headers don't have to include the page number... that's just my personal preference, page numbers can remain on the bottom of the pages.
  • A single text frame is used on each page. Text flows from one page to the next on all main content pages.
  • Chapters start on right-side pages. This is accomplished in the Heading 1 Chapter Text Style — Flow > Start: On Next Odd Page.
  • Baseline Grid is enabled, which I recommend using for certain types of documents, like books.
  • All Paragraph Text Styles are based on the 'Base' Text Style. This makes it easier to edit and manage Text Styles. Another benefit is that it's much easier to see which attributes are unique to each Text Style, because only unique settings for each style are listed in the Style settings section at the bottom of the Edit Text Style dialog.

Example Document with TOC.afpub

Windows 10 22H2, 32GB RAM | Affinity Designer/Photo/Publisher 2 (MSI/EXE)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.