Edited styles in repository not reproduced in chm file

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Swede
Posts: 123
Joined: Mon Apr 19, 2010 11:01 am

Edited styles in repository not reproduced in chm file

Unread post by Swede »

I've recently started using a style repository for all our H+M projects. The styles strike through in the projects but edited styles are not properly reproduced in the published chm files.
The images below show an edited heading style. The text was originally underlined but after the editing the text has a grey background instead. The edited style looks OK in H+M but the chm file still displays the original (unedited) underlined style. How come?

The heading appears in edited style in H+M:
StylesHM.png
The heading still appears in un-edited form in CHM:
StylesCHM.png
Thanks in advance!
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Edited styles in repository not reproduced in chm file

Unread post by Tim Green »

Hi Swede,

First check the Screen/Print toggle button in the status bar below the editor: If it is set to "Print" you are looking at the PDF/DOCX versions of the styles in the editor. Those will not be applied to CHM, only the Screen version will go there. (You can have two sets of definitions for each style)

The second possibility is that you have created your own skin for CHM and accidentally saved the styles from the project you used to create the skin with in the skin. If you do that, you will never see any style changes for the styles stored in the skin, because the versions there will always overwrite the versions from the project being published with the skin.

You can't delete styles from a skin directly once it contains them. If you want to remove them without re-creating the skin you need to unpack the project file in the skin and delete them there:

1) Change the extension of the .hmskin file to .zip and extract the project.hmxp file.
2) Open it in a code editor and locate the <styleclasses> ...</styleclasses> block of code.
3) Delete both those tags and all the styleclass definitions between them and replace them with the single placeholder tag:

<styleclasses />

You must include the space and the forward slash, otherwise it will be invalid. Then save the file , pack it back into the zip and change the extension back to .hmskin.
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.
Swede
Posts: 123
Joined: Mon Apr 19, 2010 11:01 am

Re: Edited styles in repository not reproduced in chm file

Unread post by Swede »

Thanks Tim, your second suggestion solved it.
A follow-up question: What's the quickest way to load new changes from the style repository to a connected project? So far, the only way I've come up with is to close the H+M instance with the project and open it again.
Thanks again!
Swede
Posts: 123
Joined: Mon Apr 19, 2010 11:01 am

Re: Edited styles in repository not reproduced in chm file

Unread post by Swede »

Just realized I have another question about the same project, skin and style repository described above:
The line spacing in the published CHM file is different from the line spacing in the H+M project (see images below). How come?

The single line spacing in the H+M project...
StylesRowsHM.png
... changes to 1,5 line spacing in the published chm file.
StylesRowsCHM.png
Thanks once again!
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Edited styles in repository not reproduced in chm file

Unread post by Tim Green »

Hi Swede,

To check whether it is something in your skin, try publishing the CHM without a skin or with a different skin.
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.
Swede
Posts: 123
Joined: Mon Apr 19, 2010 11:01 am

Re: Edited styles in repository not reproduced in chm file

Unread post by Swede »

Hi Tim,
The result is the same without the skin too.
However, the project was recently updated from H+M 5.6 to version 7 and the line spacing looked OK when published in CHM format from H+M 5.6.
The skin used in version 7 was created in version 7.
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Edited styles in repository not reproduced in chm file

Unread post by Tim Green »

Hi Swede,

Please mail a small demo project illustrating this issue to support AT ec-software.com (replace the AT with @) and we will check this.
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.
Swede
Posts: 123
Joined: Mon Apr 19, 2010 11:01 am

Re: Edited styles in repository not reproduced in chm file

Unread post by Swede »

Hi Tim,
I just mailed you a demo project including style repository and skin.
Thanks!
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Edited styles in repository not reproduced in chm file

Unread post by Tim Green »

Hi Mattias,

Thanks for the files: The problem was simple, but a little tricky: The affected paragraphs were inside a table, and the table was inserted in a paragraph that had manually applied 1.5 line height. All the paragraphs in the table didn't have explicitly defined line heights of 1. They just had no explicit line height, because they are based on Normal. Because of the way CSS works, the attributes of a container get transferred to all the elements inside it, unless those elements have a specific other definition for those attributes. As a result, the line height of the paragraph containing the table was getting transferred to everything inside the table in HTML.

You just need to remove the manual line height from the table paragraph and the problem will go away. :)
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.
Swede
Posts: 123
Joined: Mon Apr 19, 2010 11:01 am

Re: Edited styles in repository not reproduced in chm file

Unread post by Swede »

Problem solved! Thanks again, both for your help in this case and for the fact that you're always very quick to reply.
Have a nice weekend!
Post Reply