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

Extending and customizing the table of contents


Recommended Posts

Hi dear Community,

We have managed to display the headings and pages in the table of contents. But now we have the problem: we want to add two details to each tour heading. The distance and the length of the tour. And we want a red line on the left side. See screenshot. Is that possible? If so, what is the best way to do this?

Attention: the table of contents is automatically generated after the headings. The details should also be generated automatically. 

 

Thanks so much for your help!!

Screenshot_1.png

Link to comment
Share on other sites

Welcome to the Serif Affinity forums, SamuelS.

The red line you could have automatically generated, by updating the appropriate Paragraph Text Style (e.g., TOC 1 Heading 1: Entry) to include a paragraph decoration.

However, I don't think there's any way to get extra text (your distances) added automatically; they would have to be part of the headings in the actual text. That is, if your heading was:
image.png.1575b4f3caa2a7f59ff3181abd8f0ad6.png

then you could get all of that into the TOC. The leader dots (......) would be on the second line, though.

-- 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

Thank you very much for your help. I have a few questions, though.

1. " updating the appropriate Paragraph Text Style (e.g., TOC 1 Heading 1: Entry)"

How can I change paragraphs and text styles in this way? I can't find the styles.

2. "they would have to be part of the headings in the actual text"

Is it possible to insert but hide these details in the headings in the actual text? Or could I change the text there in the same color as the background so it won't be seen, but it appears in the table of contents?

Thank you

Link to comment
Share on other sites

Interesting questions, Samuel:

For 1: The styles will be visible in the Text Styles studio panel (View > Studio > Text Styles) but only after you have created the TOC initially, and (I think) only while you have the TOC selected in the document.

For 2: Yes, you can hide the 2nd line in the actual text, leaving it visible only in the TOC.

Unfortunately, however, I've realized that I don't know of a way to shade the background of the 2nd line (the distance measurements) in the TOC itself. There's no way to apply a separate character styling to that part of the entry in the TOC that I know of.

Anyway, here's a screenshot showing what I think you can do:
image.png.1ff2550c48daf8e83231b74b8ceec9f3.png

And here's the .afpub file that's I created to do that:  two-line-TOC.afpub

 

-- 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

Hi SamuelS,
it is partly possible to generate something what you desire, but not exactely.
You have to insert the kilometer as own style (in this example Head 3) and not assign a color.
For text corrections you can temporarily set the color to black.
In the TOC the red side line is created in paragraph style Ihv 1: Head_ 2, the background for the kilometer in Ihv 1: Head_ 3.
You can see this in the attached example.
Unfortunately, I haven't found a way to make the points before the page number in roman and to set the color to black without changing back to the original version with every update of the TOC.
The TOC function seem to be somewhat buggy yet for me.
Maybe there are better options.

TOC_example.png

TOC_example.afpub

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.