Format to Bold

Community Beginner ,
Jul 09, 2019 Jul 09, 2019

Copy link to clipboard

Copied

Hi again,

This time, I selected a word in a paragraph (Polycom). I applied the Bold format by clicking the "B" button. The word was formatted, but a space was added at the left of the word. This space can't be selected. Also, by clicking the "Bold" icon, an underline appeared under the word. Both formats can't be remove by clicking the "B" or "U" icons. Have the delete the Span codes.

Why the extra undeletable space and why the unrequested underline?

RH-Bold 2.jpg

RH-Bold 1.jpg

Cheers!

Views

746

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 ,
Jul 09, 2019 Jul 09, 2019

Copy link to clipboard

Copied

I mean no offence when I say there is a feel of something seriously hawked about either this project or your machine. With no code to cause underlining and another issue that I have not experienced or heard of, I get that feeling.

Can you try this project on another machine to see if these issues occur there?

Are you having issues with other programs?

I think my next trick would be to import that topic into a new project and see if you can force the issue there. If you can, then see the Contact page on my site and send the new project as instructed there. Do make sure you include a link to this thread and please do not email the project direct.

Do you have all the updates applied? You should be on Update 7.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Please use the Blue reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

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 Beginner ,
Jul 10, 2019 Jul 10, 2019

Copy link to clipboard

Copied

Hi,

Nope! No issues with other software.

It's not the first time this happened. Already tried it on an other computer, the one I had a few weeks ago. This is a new laptop with a new installation of RoboHelp 2019. So, one issue on two computers.

One thing I forgot to mention, this happened in a drop down text box.

Cheers!

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 ,
Jul 10, 2019 Jul 10, 2019

Copy link to clipboard

Copied

I just tested your steps and cannot replicate the problem.

Have you tried it in another project?


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Please use the Blue reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

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 Employee ,
Aug 10, 2019 Aug 10, 2019

Copy link to clipboard

Copied

I cannot reproduce this as well. I neither get the additional space nor the underline if I just apply bold through Properties > Font > B.

Also, if I look at your source code, there is seems to be just one space. Looks to me like the both the "space" and the underlining are coming from your CSS, and that the "space" is actually a "margin-left" property, and so is the underlining.

If I just use your source code and apply bold as a span style property through Properties > Font > B, I do not get your result and it looks exactly as expected:

Can you check in your CSS file(s), if there is a span defined? If there is one, you should find it under "Character Styles", maybe "Other Styles.":

Also, what happens, if you just apply bold through [CTRL] + shortcut? This wraps the selected text into a <strong> element which would better from a semantic perspective anyway.

One more recommendation: Looks like you have formatted each and every paragraph manually. You can make your life much easier if you separate content and formatting by defining a bunch of paragraph styles that contain all needed definitions so that you can apply them with just one click.

The result would be much cleaner and much more lightweight code, smaller files that load faster for your customer, much better maintainable, and much better reusable code. Also, you can apply formatting changes on a global level with just a few clicks for all your files in your project.

Sample CSS for your problematic paragraph:

p.body-text {

   font-size 14pt;

   margin-top: 3pt;

   margin-left: 14pt

   margin-bottom: 12pt;

}

Your current code:

<p style="font-size 14pt;margin-top: 3pt;margin-bottom: 12pt;margin-left: 14pt">(Content)<p>

Code based on the style defined in the CSS:

<p class="body-text">(Content)<p>

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 Beginner ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

Hi,

See attached image at bottom for my CSS Character Styles.

Thanks for the CTRL + B. It works fine. I use this command in every other application I use. For those applications, there is no difference if I use CTRL+B or if I click the B format button. Why is it different in RoboHelp? Why don't you have the Bold format button changed to a Strong format (<strong>)? Why not do the same for Italic (<em>) and underscore (<u>)?

For the Styles. I tried it in RoboHelp 2017. I created lots of documents that I styled manually. Then, because I use my own styles in Word, I created a style (text, paragraph, list,...) for my procedures. Worked good in the new procedure I was writing. When I opened the published site, all my procedures were modified because they all adopted the new Style sheet. So yes, I manually format my documents. I might create a new project, create a style sheet and rewrite my procedures with it.

CSS.jpg

Thanks

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 Employee ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

I guess we are getting closer to the problem …

In your "default.css" in "Character Styles", you have "span". This is not there by default. I bet, when you look at the style definition for "span" there is underline + some margin-left defined!

Let us know 🙂

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 Beginner ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

Hi,

Yes, I do have Span under Character Styles.

The phrases used for the example are:

The quick brown fox jumps over the lazy dog

     The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

I see one Underline in a paragraph style I made (p. PL-H4Ch...), and there are multiple margins as well.

Under one of the Span styles, there is one Margin-Left: 8pt (in image Span Code 6), no underline.

(Image Span format.jpg)

Span format.jpg

(Image Span format 1.jpg)

Span code 1.jpg

(Image Span format 2.jpg)

Span code 2.jpg

(Image Span format 3.jpg)

Span code 3.jpg

(Image Span format 4.jpg)

Span code 4.jpg

(Image Span format 5.jpg)

Span code 5.jpg

(Image Span format 6.jpg)

Span code 6.jpg

Waiting your comments.

Thanks

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 Employee ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

LATEST

Awesome, that was helpful. So, my hunch was right 🙂

 

The important one for this specific problem is your screenshot “(Image Span format 6.jpg)”: The for span the margin-left is defined as “8pt” and text-decoration as “underline” (lines 202 and 203 in your CSS). This creates the underline and space on the left in your example shown at the beginning of this thread. Delete those two lines and this problem will be solved.

 

However, considering the whole thing: be careful. Make a backup of the CSS first. There might be other instances wrapped into a span where you might the lose intended underlining or space on the left. Check for that.

 

From a general perspective, I tend to say: Delete the whole span definition in the CSS (lines 201 to 206). There should be no formatting assigned to span. span is just a placeholder element (“something spans from here to there”). You will run into many other problems with this. E.g. imagine you want to make a word red. You mark up the word, assign red in the properties panel, but it will automatically also inherit the margin-left, the bold, and the underlining. The text-align property is probably quite “undangerous here, but …)

 

I can see that the CSS has quite a history (seems to go back to RoboHelp 10 times). And in your code samples, it becomes clear that pretty much everything is with local formatting. You make your life really uncomfortable with all that and the whole thing really difficult to maintain.

 

Therefore my suggestion is: Look at the “inherent structure” of your content (what kind of information types you have, like headings, lists, warnings, etc.). Write them down and then create a new CSS from the scratch defining the formatting for these information types through. Then you open a topic, remove the default.css, add the new one, click into each paragraph / “information unit”, and assign the style with the styles panel to it. Then you remove all the local formatting. That will give you a super clean topic with content and formatting separated. Easy to author, easy to maintain. Once you have done this for one topic, you can apply the same for all other topics. And don’t worry about effort … first, it’s a one-time effort, second, once done for one exemplary topic you can apply it to all other topics within a few minutes with some simple find and replace actions. We can help you with that.

 

Trust me, once you have done that, you will be many, many times more productive and will have much less headache 🙂

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 Employee ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

Regarding your other question:

metaconcert1965  wrote

(...)

Thanks for the CTRL + B. It works fine. I use this command in every other application I use. For those applications, there is no difference if I use CTRL+B or if I click the B format button. Why is it different in RoboHelp? Why don't you have the Bold format button changed to a Strong format (<strong>)? Why not do the same for Italic (<em>) and underscore (<u>)?

(...)

In a nutshell: Because it's CSS and HTML. If you just want to make a word bold, you can press CTRL+B, and RoboHelp will wrap the word into the "strong" element (<strong>foo</strong>) which is by default rendered as bold by all browsers. From an HTML5 and semantical point of view, this is the preferred option:

foo <strong>foo</strong> foo

Same with italic and underline by the way:

CTRL+i → foo <em>foo</em> foo

I through properties panel → foo <span style="color:red">foo</span> foo

CTRL+u → foo <u>foo</u> foo

U through properties panel → foo <span style="text-decoration:underline;">foo</span> foo

The logic is this:

If you apply bold, italic, or underline through shortcuts, RoboHelp will wrap the word into the semantic elements for this.

If you apply bold, italic, or underline through the Properties panel, it is only ONE possible formatting option of many others that you can define as well: E.g. font size, color, spacing, etc..

Assumed, you want to make a word "bold" AND red (foo). Now, RoboHelp COULD do it in one of these two ways (and it would be still valid HTML5):

foo <strong><span style="font-style:italic;">foo</span></strong> foo

or

foo <strong style="font-style:italic;">foo</strong> foo

But it would be not a good HTML5, the second option might be even prone to rendering errors in some browsers. Therefore, what RoboHelp will do, is putting both the font-weight and the font color information into the style attribute of a span tag:

foo <span style="font-weight:bold; color:red">foo</span> foo

This is the cleanest approach.

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