• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Adding a force break line in a header that is ONLY recognized in TOC

Explorer ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Hi,

I am running FrameMaker 2020. There are instances where a header is quite long. When I generate TOC it pushes the page number on a second line. If I enter a line break (SHIFT+Enter) in TOC I notice that the new second line is not linked to the header. So, is there a way I can insert an invisible line break in the main header so that when I generate the TOC the header is set to flow on a second line without breaking the link between the TOC header and the header itself? I am sorry for my unprofessional language. I am attaching a screenshot that might help you understand my question.

In this image, I want to break the line so "des Personals" is moved on the second line

 

Screenshot 2022-08-04 095247.png

Yet, the header is fine in the body text and needs no breaking. However, is there a way I can add in here an invisible line break that TOC will honor?

Screenshot 2022-08-04 095319.png

 

Thank you in advance.

 

Sebastian

TOPICS
Formatting and numbering

Views

132

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
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

Hi Sebastian,

 

Thank you very much for your description. I think it's clearly understandable.

I do not have this issue. Therefore there must be something going on.

FrameMaker ends a hyperlink area, when the formatting changes. Could it be that with your line break text has a different format than the first line? Even only a single character!

An additional suggestion: When you change the minimum/maximum values of the word spacing in your paragraph, the automatic line breaks are further to the left, so that text does not touch the area of page numbers.

It's not intuitive. In the TOC open the paragraph designer and go to the Advanced tab. Change the minimum value to 200 % and the maximum value to 125 % and leave the optimum at 100 %. Then update the style. This should fix almost all of your problem paragraphs.

 

Best regards

 

Winfried

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
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

I won't have time to test it for a bit, but I'm wondering if this common form of List wrapping could be controlled at the source Heading by using non-breaking spaces where TOC line breaks are not desired.

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
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

Hi Bob,

 

Yes, of course you can also enter non-breaking spaces in your source heading. However, that's a manual step. And often a non-breaking space would mess up your source text as you need a line wrap in the source text and in the TOC it's the other way round.

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
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

sebdea: If I enter a line break (SHIFT+Enter) in TOC I notice that the new second line is not linked to the header.

In addition to the effect on the link, any manual edits to a TOC will be lost the next time it is re-generated. So you really want a fix that is persistent and preserves links.

 

Winfried: FrameMaker ends a hyperlink area, when the formatting changes.

For TOC, the usual dead-link-region suspect is a Character Format in part of the source Heading, for which there is an unobvious work-around, but that scenario doesn't seem to be the problem here.

 

Winfried: It's not intuitive.

Hey, if there was only one obvious way to do it, it wouldn't be FM.

Sub-optimal line wraps in generated lists is a long-standing challenge in FM. I seem to recall that there are other approaches as well. If the book has a lot of instances, a bulk solution like yours is clearly optimal.

 

Winfried: However, that's [NbSp hack] a manual step.

Thanks for confirming that the NbSp hack works. On that:

  1. If there is only one (or few instances), and inserting NbSp at the source doesn't cause problems there or elsewhere (e.g. Xrefs), then it might be the thing to do. It's not an override, so it is robust across format updates & book re-gens.
  2. If resorted to, it's important to use FM's internal NbSp (Ctrl+Space, \x11, \ ) and not a Unicode \u00A0, as I don't think FM honors U+00A0 semantics — and if HTML/XML is an output format, whether either generates an   HTML Entity is another question I haven't tested.

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
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

One more way to enter a nonbreaking space is to press (in sequence, not all together) Esc + spacebar + h.

 

(Case matters.)

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 ,
Aug 11, 2022 Aug 11, 2022

Copy link to clipboard

Copied

Thank you all for your replies. Unfortunately, NbSp is not what I was looking for. NbSp keeps two words together. In my case, I need to insert and "invisible" breaking line command that will be honored when generating TOC. I need it because when I am generating TOC the entire heading enters in one line.

 

Screenshot 2022-08-12 074239.pngScreenshot 2022-08-12 074313.png

 

So, if I add a line break in the heading, that will be honored when generating TOC.

heading-line-break.pngTOC-Line-break.png

So, I guess I will have to use this method and hopping that will not mess up my layout/formatting.

 

Thank you very much for all your effort. I much appreciate it.

 

Sebastian

 

 

 

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
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

I've often used the NbSp to "correct" the TOC, without suffering issues in the body text.

If you absolutely need to manage the line break in the body copy, you could always use an override (wouldn't, but you  are welcome to!) or create another Heading para tag that has different right margins and add it to the TOC.

Mostly though, the NbSp hack works well, or you can rewrite your heading text.

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 ,
Aug 12, 2022 Aug 12, 2022

Copy link to clipboard

Copied

LATEST

Hi Sebastian,

 

This is strange. I tested your user scenario and break a TOC line after generation with a hard linebreak, then do the pdf. In my test the second line keep its hyperlink to the source. I'm using FM 16.0.4.1062.

 

Best regards,

Mats B.

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