Updating Styles

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Ga Bowen
Posts: 324
Joined: Mon Jun 27, 2016 5:05 pm

Updating Styles

Unread post by Ga Bowen »

When I review a topic some of the Styles are partially incorrect.

This is often because I've imported an rtf or pasted a little segment from somewhere else. H&M helpfully shows this by changing the Style name to bold and adding a + symbol. Clicking the Text style drop down menu and pressing enter corrects the style to how it should be.

Is there away of applying this change to a whole topic or multiple topics? Effectively updating all Styles with the + suffix. I can't seem to get it to work using Replace styles... either.
User avatar
Tim Green
Site Admin
Posts: 23178
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Updating Styles

Unread post by Tim Green »

Hi Gareth,

The bold+ display means that the text at the cursor includes additional formatting that is not included in the definition of the style attached to that text or paragraph. Effectively, this means "manual formatting". And that always has priority over style attributes. If it didn't it wouldn't be possible to add manual formatting to anything formatted with a style.

When you import an RTF file what happens with text with a style depends on whether that style already exists in your project. If it doesn't, the style is added to your project stylesheet and if the text in the RTF doesn't include manual formatting as well that should be the end of it. If the style does exist and the formatting of the imported version is different then the style name remains attached, but the conflicting formatting is treated as manual formatting, resulting in the bold+ display.
Ga Bowen wrote: Mon May 18, 2020 9:05 am Is there away of applying this change to a whole topic or multiple topics? Effectively updating all Styles with the + suffix. I can't seem to get it to work using Replace styles... either.
This is an issue with a long tail. :? You can achieve it with Replace Styles, but it's tricky and non-intuitive, and because of the way it works it's difficult and sometimes impossible to target specific styles by their attributes only. This is because you can only perform the Replace Styles search and replace in separate operations for the paragraph and text attributes.

If the paragraphs you are targeting already have a style name attached to them you can manage it, because then you can use that and leave all the attribute fields set to (any). You still have to do two passes to rest both the text and the paragraph, but it's doable. If they don't have a style name you may not be able to manage it, because the paragraph or text attributes on their own are frequently not enough to uniquely identify the text you want to target.

The Toolbox power tools utility in the Premium Pack has a "Normalize Styles" tool that helps with this. You can use it to remove manual formatting globally in an entire project and reset your styles so that the style names of your text and paragraph tags match. This can also radically reduce the amount of redundant XML code, particularly in combination with HM's Tidy XML feature, which makes life a lot easier for translators using XML-based tools. It has two modes, for managing individual styles or doing a clean sweep on an entire project:

http://www.it-authoring.com/info/pp4hel ... tyles.html
http://www.it-authoring.com/info/pp4hel ... oject.html
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply