Create a toc with on one line the text of 2 styles

Explorer ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

In the book I have a style for "Chapter" (for the chapter number) and a style for the "chapter title" (for the title).

I have 2 different style because they come on 2 lines and with different style.

How can I get in the TOC Chapter the content of "chapter" followed on the same line by the contenbt of "chpter title" and the page number.

In fact, I woulmd need a paragraph style with no line feed carriage return at the end.

ex :

in the book :

 Chapter 12

 This is the title of this chapter

and in the TOC:

Chapter 12 Thjis is the title of this chapter ...... 25

Thank for any suggestion

 

Alain Elshocht

(PI removed by moderator. Do not add URLs/websites/email address to your signature or your account will be banned])
TOPICS
Feature request , How to

Views

290

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 6 Correct answers

Adobe Community Professional , Dec 27, 2021 Dec 27, 2021
The really, really simple method is to generate the TOC and then apply a style to "Chapter 1" in each line. I have a number of books where the TOC needs just one or two tweaks after each update and it's not worth finding a completely automated solution. A more advanced method would be to use the GREP style attached to the TOC1 (or whichever) paragraph style. You should be able to define "Chapter nn" as the target and apply a character style automatically. However, I don't think you can combine t...

Likes

Translate

Translate
Adobe Community Professional , Dec 27, 2021 Dec 27, 2021
We do this type of construct very frequently and have a free online tutorial for our students and clients at https://www.pubcom.com/tutorials/toc-2/  It shows how to format both the Section Headings and the TOC entries. Benefits: easy one-click formatting of the section headings. Suitable for reuse in future layouts, templates, and database publishing. And it creates an accessible PDF, if you need that for your project. For the chapter INDD file, we make the entire text one paragraph in on...

Likes

Translate

Translate
Guide , Dec 28, 2021 Dec 28, 2021
You could use only your "Chapter Title" for the TOC, and set the TOC paragraph style with numbered list (for example Chapter ^#)

Likes

Translate

Translate
Guide , Dec 28, 2021 Dec 28, 2021

Likes

Translate

Translate
Adobe Community Professional , Dec 28, 2021 Dec 28, 2021
I would have thought "Chapter nn" should be a Numbering style. (Bullets and Numbering). The easy part is doing this in the TOC, the difficult is the headers, which have to start with a Forced Line Break for them to start right indented under the numbering, but these days Forced Line Break can be ignored in the TOC (Would be nice if that could be an option in the numbering style but ^n doesn't work there)

Likes

Translate

Translate
Adobe Community Professional , Dec 29, 2021 Dec 29, 2021
@Lukas Engqvist  and @vladan saveljic both suggested using the numbered heading method, which can be very helpful when making long technical documents with many chapters. I created a new demonstration of this method (TOC-3) at www.PubCom.com/tutorials/toc-3 Note for those making accessible PDFs: Ensure that the paragraph style's Export Tags are set to <H2> or another heading level. Numbered headings usually are NOT numbered lists.

Likes

Translate

Translate
Adobe Community Professional ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

Which Adobe App or Service are you asking about?

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

oops sorry, I'm using InDesign

 

Alain Elshocht

(PI removed by moderator. Do not add URLs/websites/email address to your signature or your account will be banned])

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

[Moderator moved from Using the Community (forums) to InDesign.]

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

 

InDesign 2021

Alain Elshocht

(PI removed by moderator. Do not add URLs/websites/email address to your signature or your account will be banned])

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

The really, really simple method is to generate the TOC and then apply a style to "Chapter 1" in each line. I have a number of books where the TOC needs just one or two tweaks after each update and it's not worth finding a completely automated solution.

 

A more advanced method would be to use the GREP style attached to the TOC1 (or whichever) paragraph style. You should be able to define "Chapter nn" as the target and apply a character style automatically.

 

However, I don't think you can combine two paragraphs/styles in one TOC line. That would be another job for GREP or a script, to combine two entries into one for each line. It might be worth re-thinking your chapter heading layout if a simple numbering of the TOC lines isn't enough.

|| Word & InDesign to Kindle (& EPUB): a Professional Guide (Amazon)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

Of course, I just needed to ask the question to find a solution

I Have "Chapter # This is the chapter Title"

I put the text in two boxes, a small one for "Chapter" and a larger for "This is the Chapter Title" with a style for each box.

I then create the TOC which comes with text attributes from the boxes.
I then use  the script "ClearStyleOverrides.jsx"

Done .... 🙂

I needed to have a 90% automatic way because the documnet will be translated into 27 languages using tools ...

 

Thank for the time spent to answer my question

 

Alain Elshocht

(PI removed by moderator. Do not add URLs/websites/email address to your signature or your account will be banned])

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

One way to do this is to create a non-printing "tag" frame to hold the text you will use in the TOC and give it a unique style name that you can include instead of using the two styles you have defined for chapter heads and titles, so for example, this tag would say "Chapter 12 This is the title of the chapter" (without the quotation marks). I usually do these tags in a big red character style so I can find them easily. In the TOC itself you can use any paragraph style you like and include nested or GREP styles to format parts of the listing differently.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

Another solution could be: 1 style for chapter in the toc, but make a baseline shift to the next line and and another style for the next level with an inset of the space the text for chapter 1 would need.

 

Another solution would be, to make chapter and text part of the same paragraph, use inline style and nested style to get the difference and supress the forced return in the toc creation.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

We do this type of construct very frequently and have a free online tutorial for our students and clients at https://www.pubcom.com/tutorials/toc-2/  It shows how to format both the Section Headings and the TOC entries.

 

Benefits: easy one-click formatting of the section headings. Suitable for reuse in future layouts, templates, and database publishing. And it creates an accessible PDF, if you need that for your project.

 

  1. For the chapter INDD file, we make the entire text one paragraph in one text frame, but we add a shift+enter after Chapter 1 (space) to force a line break to the next line.
     
  2. One paragraph style formats the entire paragraph of text but uses a nested character style to format the "Chapter 1" in a different font and have it apply to the text up through the first forced line break.
     
  3. Then, when building the TOC style, check the option to remove manual line breaks.  The TOC will now pick up the entire paragraph as one unit along with its corresponding page number.

 

Hope this helps!

 

 

Bevi Chagnon | PubCom | Designer & Technologist for Accessible Documents
| Books & Classes | Accessible InDesign | Accessible PDFs | Accessible MS Office |

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 28, 2021 Dec 28, 2021

Copy link to clipboard

Copied

You could use only your "Chapter Title" for the TOC,

and set the TOC paragraph style with numbered list (for example Chapter ^#)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 28, 2021 Dec 28, 2021

Copy link to clipboard

Copied

Schermata 2021-12-28 alle 09.15.01.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 28, 2021 Dec 28, 2021

Copy link to clipboard

Copied

Schermata 2021-12-28 alle 09.14.37.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 28, 2021 Dec 28, 2021

Copy link to clipboard

Copied

I would have thought "Chapter nn" should be a Numbering style. (Bullets and Numbering). The easy part is doing this in the TOC, the difficult is the headers, which have to start with a Forced Line Break for them to start right indented under the numbering, but these days Forced Line Break can be ignored in the TOC (Would be nice if that could be an option in the numbering style but ^n doesn't work there)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 29, 2021 Dec 29, 2021

Copy link to clipboard

Copied

LATEST

@Lukas Engqvist  and @vladan saveljic both suggested using the numbered heading method, which can be very helpful when making long technical documents with many chapters.

 

I created a new demonstration of this method (TOC-3) at www.PubCom.com/tutorials/toc-3

 

Note for those making accessible PDFs:
Ensure that the paragraph style's Export Tags are set to <H2> or another heading level. Numbered headings usually are NOT numbered lists.

 

Bevi Chagnon | PubCom | Designer & Technologist for Accessible Documents
| Books & Classes | Accessible InDesign | Accessible PDFs | Accessible MS Office |

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines