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

Ordered list issues in Responsive HTML5 output

Participant ,
Jun 06, 2024 Jun 06, 2024

I'm trying (with my very limited HTML abilities) to create a custom .css for my Responsive HTML5 output but at the moment, numbered lists are defeating me. If I select Convert to Text for my list style 1.pngexpand image then I get this in the HTML output. 2.pngexpand image. If I select Convert to List3.pngexpand image then I get this in the HTML output 4.pngexpand image. Essentially the same, except a bigger gap after the number in the list. My .css looks like this 5.pngexpand image. If I change p.List1 to li.List1 then FM can no longer see the List1 style here 6.pngexpand image. I'm hoping someone can tell me what I need to change in either my .css or the selections on the FM Publish Settings to sort this out. 

1.8K
Translate
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 1 Correct answer

Participant , Sep 05, 2024 Sep 05, 2024

In late breaking news, I've managed to get the latest version of FM and this issue is sorted now. Hooray!

Translate
Community Expert ,
Jun 06, 2024 Jun 06, 2024

Hi,

As far as I remember, FrameMaker/HTML5 uses spaces to create the gap between the number and the text. Can you check this?

You might get better results, when you change your numbering in your FrameMaker file from e.g. <n+>\t to <n+> and a single space. Then the conversion will not replace the tab with several spaces, but only one.

Best regards, Winfried

Translate
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
Participant ,
Jun 08, 2024 Jun 08, 2024

8.pngexpand imageUsing a space instead of a tab then causes the same issue in the PDF output and didn't fix the HTML unfortunately

Translate
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 ,
Jun 10, 2024 Jun 10, 2024

You can ignore the PDF output here. You would use formats either for PDF or HTML5 and when you want to export to the other, import those format into your FrameMaker files.

The goal here is to get a fix for your HTML5 output.

Translate
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 ,
Jun 07, 2024 Jun 07, 2024

Have you tried using the option to map to an HTML element? I would go mapping my FM lists to an ol tag in the HTML. Then you can concentrate on the styling of them in the CSS.

Translate
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
Participant ,
Jun 08, 2024 Jun 08, 2024

"I would go mapping my FM lists to an ol tag in the HTML." Yes, this is what I'd like to do. Are you able to provide detailed advice on how to do that? I've been creating and importing a .css to do just that but I'm having the issue detailed in my question.

Translate
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 ,
Jun 10, 2024 Jun 10, 2024

I think you'd do that by selecting the "Map to HTML Tag" option in that screenshot you posted.

Translate
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
Participant ,
Jun 10, 2024 Jun 10, 2024

That dropdown only displays one option titled "Pre" and I don't think that's it.

Translate
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 ,
Jun 11, 2024 Jun 11, 2024

I suspect that's the case when you have the Automap Paragraph Styles selected - if you're mapping to HTML elements, you don't want to automap - I think that just gives you a bunch of FM_xxxx styles. 

Translate
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 ,
Jun 07, 2024 Jun 07, 2024

I believe it is because you are not using tabs. This is a screen dump from the Extra Anejo template:

StudioSm_0-1717763699811.pngexpand image

... and this is from the corresponding FM file. I am using tabs after the autonumbers.

StudioSm_1-1717763805894.pngexpand image

 


Bjørn Smalbro - FrameMaker.dk
Translate
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
Participant ,
Jun 08, 2024 Jun 08, 2024

7.pngexpand image I am using tabs for that style.

Translate
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
Participant ,
Jun 08, 2024 Jun 08, 2024

9.pngexpand image My tab stops are 1cm left. Does that sound right?

Translate
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 ,
Jun 10, 2024 Jun 10, 2024

Yes. 1 cm left alignment is fine.

When you export to HTML5, how is the distance between number and text achieved? With a number of spaces (that's my experience a few years back)? or with tabs?

When 1 cm left inserts always e.g. 4 spaces for the numbers 0 to 9, then you will always have this number, regardless of how many spaces you would need for numbers 10 and above.

I do not know, how to configure CSS to get a left alignment for all paragraphs with numbers from 0 to 9 and numbers 10 and above.

Translate
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
New Here ,
Jun 10, 2024 Jun 10, 2024

Using tabs or spaces in the FM styles made no difference to the HTML output. My understanding is that the specific browser you're using determines the space between number and text in an OL. I don't know how to get the left alignment either. That's exactly the answer I'm looking for.

Translate
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 ,
Jun 10, 2024 Jun 10, 2024

What I mean is: How are the distances between number and text in the HTML code achieved, not in the FrameMaker file.

Translate
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
New Here ,
Jun 10, 2024 Jun 10, 2024

Yes, I understood what you were asking. My understanding is that the browser determines this. It is not a setting you can input.

Translate
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 ,
Jun 10, 2024 Jun 10, 2024

I just did a test and converted a copy of one of my files to HTML5.

I applied an "instruction" paragraph format to about 40 paragraphs. And it looks great without customizing anything.

The CSS code for this instruction paragraphs is:

p.instruction {
margin-left:14.17pt;
margin-right:0.00pt;
margin-top:4.00pt;
margin-bottom:4.00pt;
text-align:left;
text-indent:-14.17pt;
line-height:12.00pt;
word-spacing:0.25em;
hyphens:auto;
direction:inherit;
color:#000000;
font-family:"Open Sans Light";
font-size:10.00pt;
font-weight:300;
font-style:normal;
background-color:transparent;
text-decoration:none;
letter-spacing:0.00em;
font-stretch:normal;
text-transform:none;
font-kerning:none;
counter-increment:I_1;
}

The HTML code of one of the paragraphs is e.g.:

<p class="instruction" id="12868654"><span class="numbering">14<span style="padding-right:4pt ;">&#8203</span></span>Status monitor&#x3A; with LED</p>

The indentation is not interrupted as in your screenshot.

Therefore, can you go back and start with a new sts file and see, what FrameMaker does with your list.

Then you can start customizing.

Translate
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
Participant ,
Jun 10, 2024 Jun 10, 2024

Thanks Winfried, I appreciate you spending the time. The thing I'm not seeing in the HTML code is this: <span class="numbering">. I think perhaps that might be where the problem is. I'm not sure how to change that. I'm using FM version 16. Perhaps the issue lies there.

Translate
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
Participant ,
Jun 10, 2024 Jun 10, 2024

Winfried, can I ask if you have this selected? 12.pngexpand image and which option you have selected here? 11.pngexpand image. I'm starting to think this is actually a FM bug because the numbers should automatically be right aligned, but they're not.

Translate
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 ,
Jun 11, 2024 Jun 11, 2024

Yes. Convert to Text is selected.

Translate
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 ,
Jun 11, 2024 Jun 11, 2024

And Automap Paragraph Styles is not selected.

Translate
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
Participant ,
Jun 12, 2024 Jun 12, 2024

I'm still in struggletown with this. Can I ask which browser you're looking at the results in? I'm using Microsoft Edge and I don't have access to using Chrome.

Translate
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 ,
Jun 13, 2024 Jun 13, 2024

I use Firefox, but the numbered list looks the same in Edge and Chrome.

Translate
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 ,
Jun 13, 2024 Jun 13, 2024

@ArmadilloC if you are interested I shall be glad to take a look at your project off list. No guarantees given, though, but for free 🙂

Best regards

Bjørn Smalbro


Bjørn Smalbro - FrameMaker.dk
Translate
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
Participant ,
Jun 13, 2024 Jun 13, 2024

That is extremely kind of you Bjørn! I've emailed the FM template I'm using and my current .css that I'm mapping to to your company email. When I tried to attach it here it was saying that my .FM file is not really a .FM file. I'm happy with the PDF output but the lists and I are not friends in HTML. You can see there's two versions of nested ordered lists in the template (one for bullets and one for instructions).

One other issue that I haven't tackled yet is that I'm decreasing the font size when I output to HTML and the table row height is not changing to suit. I don't know if you have any ideas about that?

I'd like to output it to the charcoal grey default Responsive HTML template. Oh, and I'm using Version 16.0.2.916. I'm not able to get the latest version unfortunately.

Translate
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