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

<ol> restart numbering problem

Explorer ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

The restart numbering of an ordered list did not work. The Author view, Preview, HTML5 and PDF output show the intended number but the HTML Help and Word outputs don't. The numbering starts at 1 for these.

I tested this with a new project (click New Project in the welcome dialog) to simulate.

In the 'First topic', I added:

1 First with ol style

2 Second with ol style

Intermediate text

20 Twentieth with ol style and restart numbering

21 and so on

The HTML output shows line 20 with the correct number. Note that the code shows <li value="20">.

I know that I have made some changes to the li style, so I assumed that these changes caused the problem, so I tried to figure out at what point the problem occurred. I edited the list style ol in default.css with the RH style editor.

I checked Advanced formatting (nothing happens), and then changed Indent from 40px to 36px (by pressing the down caret). This causes the author view to show:

1 Twentieth with ol style and restart numbering

2 and so on

The code is still  <li value="20">.

Then I click the up and down caret of Restart numbering and get the right numbers in author view.

20 Twentieth with ol style and restart numbering

21 and so on

The code is now <li style="counter-set: item1 19;">

But the HTML Help shows

1 Twentieth with ol style and restart numbering

2 and so on

And that is the problem.

How can I get this right?

Views

541

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

First of all please try with a new project and a new default.css.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

For the test, that was exactly what I did. See the 2nd paragraph of my post:

"I tested this with a new project (click New Project in the welcome dialog) to simulate."

Votes

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

Yes but you said that you had changed the style. I'll run the same test tomorrow. 

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

Oh. I understand your question. With the new project and without changing styles, restarting numbering works good. But with a slight change to the ol style, it goes wrong. Changing the indent is enough. With my normal project, I have changed a lot more than just the indent, but I could reduce the phenomen to changing just the indent. That way, it is easy to reproduce.

Votes

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 ,
Nov 30, 2021 Nov 30, 2021

Copy link to clipboard

Copied

I created a brand new project and created a list with three steps, then a plain paragraph, then a list with two items with restart set to 4. Both Word and CHM generated correctly.

 

Then I went to Advanced Settings in the OL list style in default.css as created in a brand new project. I changed the indent to 36px to exactly replicate what you did. The Word document still generated correctly but the CHM list did not restart.

 

Please check again in a further project before I report this.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

 

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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 ,
Nov 30, 2021 Nov 30, 2021

Copy link to clipboard

Copied

It'll probably be because CHM uses a version of IE that pre-dates counters in CSS so it just ignores those css instructions. I think the workaround will be to manually enter value="n" until there's a convenient way to correctly structure the html using the RH interface. Or manually correct the structure in code, of course. 🙂

Votes

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 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

I think that you are right Amebr. Restart numbering at worked fine in the CHM output with RH10 because RH10 simply did put the list numbers as text in the CHM output. RH20 puts start="20" in the OL tag which is correct CSS coding, but which is indeed probably not supported by the HTML Help Viewer.

I can understand that RoboHelp now uses correct CSS coding instead of 'hacks', so I suppose that I have to avoid numbered lists that do not start with 1 if I need a CHM output.

However, I think it would be better that RoboHelp adds a message to the Restart numbering at field warning for this.

Votes

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 ,
Dec 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

I have reported this issue to Adobe so let's see what they come back with.

 

You are now only mentioning CHMs. Does that mean that in Word you are now seeing the numbering reset correctly?

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

No, it is still a problem in the Word output as well.

Votes

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 ,
Dec 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

Hmm. I'm not seeing that in a virgin default.css. Are you mapping to a template or using a master page?

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

I retested with a virgin new project. Numbering is correctly restarted in Word now. Also after changing the ol style (Indent from 40px to 36px), numbering also starts correctly. Don't know why it didn't the first time.

 

I also retested CHM with a virgin new project and then I created another one in which I changed the ol style. The first one restarts numbering correctly, but the second one doesn't (starts at 1). Then I compared the source of both but I don't see any difference. Very strange. See screenshot.

12562269.PNG

PS: value="20" is added to the li style and not the the ol style as I previously mentioned to Amebr.

Votes

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 ,
Dec 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

Have you compared the two CSS files? I'm thinking there must be a difference there.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

I didn't think about that. Stupid. There are indeed differences.

 

I took the default.css out of both CHM's. Here are the differences. The first 3 lines in bold are common to both. The other lines only appear in the project with the changed OL style.

ol {
margin-top: 0px;
margin-bottom: 0px;
counter-reset: item1;
list-style: none;
padding-left: 40px;
margin-left: -4px;

}

ol>li {
margin-top: 0px;
margin-bottom: 0px;
position: relative;
}
ol>li:before {
counter-increment: item1;
content: counter(item1, decimal);
text-align: right;
position: absolute;
left: -44px;
margin-right: 4px;
width: 40px;
overflow: hidden;
}

 

And these are the differences in the default.css in the contents/assets/css folder of the projects. Bold again is common to both.

ol {
margin-top: 0px;
margin-bottom: 0px;
--prefix-size: 40px;
--prefix-fixed-size: false;
--prefix-gap: 4px;
--list-indent: 36px;
--vertical-spacing: 0px;
counter-reset: item1;
list-style: none;
padding-left: var(--prefix-size);
margin-left: calc(var(--list-indent) - var(--prefix-size));
}

ol>li {
--prefix-size: 40px;
--prefix-fixed-size: false;
--prefix-gap: 4px;
--list-indent: 36px;
--vertical-spacing: 0px;
margin-top: calc(var(--vertical-spacing) / 2);
margin-bottom: calc(var(--vertical-spacing) / 2);
position: relative;
}
ol>li:before {
counter-increment: item1;
content: counter(item1, decimal);
text-align: right;
position: absolute;
left: calc(-1 * var(--prefix-size) - var(--prefix-gap));
margin-right: var(--prefix-gap);
width: var(--prefix-size);
overflow: hidden;
}

Votes

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 ,
Dec 03, 2021 Dec 03, 2021

Copy link to clipboard

Copied

LATEST

It looks like one of the tests wasn't kosher. Unless you are positive which one, I think I would test again only making the specified change.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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
Resources
RoboHelp Documentation
Download Adobe RoboHelp