Need help for style not displaying correctly in chm
Copy link to clipboard
Copied
I’m using RoboHelp HTML version 8. RH8 is dropping a style from my stylesheet. The style appears to be applied correctly when I view a topic (the HTML file) directly with either IE or Firefox browser, and it appears correctly when I view the topic with the “Item View” feature in RH8 (the eyeglasses icon). However, in the compiled HTML help output from RH, the style is not correct. The style in question is a class of style (“desc” for descriptions) for a subset of table data. The “desc” class should have the data in the cell left justified, and the cell width should be 50%. The main parent style for table data (centered text, cell width varies) seems to be applied instead, and the child style for descriptions is not applied. Below I've included a screen shot of a table page as it looks in Item Viewer, then the same page as it appears in the CHM, and finally the style sheet in its original state before being added to RH.
Here are things I’ve checked for:
· The project is large, with over 6300 topics and a compiled chm of 5560 KB. RH crashes when I try to apply style sheets or master pages to multiple topics from the Topic List. However, I created a much smaller test project with 122 topics and still get the dropped style.
· The style sheets were created outside of RH, and are also used for presenting the same content over the web outside of RH. The styles display fine in the other context through a browser. I have not modified the style sheet in RH, but I have opened it in RH. I’ve also tried deleting and re-copying the style sheet into the project.
· There is another set of styles applying to the tables, for table rows. There is a “tr” class for the heading and classes for rotating background colors. These child styles appear correct with no problems. Every row in a table belongs to a child class of row styles. In the case of table data styles, most cells require the parent “td” style and only a subclass require the child “desc” style. It’s the “desc” style that isn’t showing up in the chm. Is this a clue?
· Multiple style sheets per topic. Apparently only one style sheet can be used per topic. In my project, I have two types of topics, called schema pages and table pages, with a style sheet for each. The same master page is used for both types. The master page uses the tables style sheet. Therefore, the tables topics (the ones with the dropped style) use only one style sheet, but it is specified in both the master page and the topic itself. Is this a problem?
· Reviewing the style sheet in RH. When I inspect the style sheet through RH’s Project Manager, the table data and table row styles appear under “Other” and not under “Table.” Is this a clue?
The special formatting of the description cells in our table-heavy project is essential. I’ve spend days trying to troubleshoot this problem and would appreciate any help anyone can offer.
Copy link to clipboard
Copied
Unless Willam has a better idea (quite likely) why not create a paragraph class such as p.desc and apply that to the content of the cells?
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Hi,
I don't see any problems with your css. Can you try to unpack the CHM and open the topic with Internet Explorer? Does that give you the same result as when you view it in the CHM? Also, check that the style is available in your CHM style sheet. You can unpack a CHM file with the Microsoft HTML workshop.
The reason I ask is this: When outputting to WebHelp, the topics are created in XHTML format. This format sets IE to run in standards mode, thus correctly displaying your table. In a CHM, topics are saved in HTML 4.01 frameset, thus setting IE to render in quircks mode. As CHM uses (some part of) IE to render the contents, the problem might arise from this.
Greet,
Willam
Copy link to clipboard
Copied
Hi jenesei,
Small comfort, but I think I'm seeing a similar issue. In the following screenshot, both sets of table cells have font = Tahoma 10pt applied to all cells.
It looks fine in the RH Design window + Topic viewer, but as soon as I compile and view the CHM, some cells randomly aquire a bigger font:
In the first table (table style = SimpleGridBlack), cells 1-3 and 7-9 are as expected, but cells 4-6 have acquired a font change.
In the second table (table style = default), all cells have acquired a font change.
I tried forcing them all to Tahoma 10pt, but something always overrides this in the CHM viewer.
Any light-shedding gratefully received.
Copy link to clipboard
Copied
I see this problem frequently, Have you tried viewing your tables in HTML view instead of Design view? When I do this and compare the tags on the rows with and without the correct font displaying, I usually find that a style has not been applied to the bad rows. For some mysterious reason (see posting above this one for a possible explanation of the mystery) the missing style doesn't have visible results except in the compiled .chm. So, verify that styles are applied to all rows of your table.
Good luck.
Jenesei
Copy link to clipboard
Copied
Hi jensei,
Thanks for that. When I took that screenshot - bizarrely those cells all had exactly the same html. I can't easily prove that now as I have tinkered with that test page quite a lot since. I started thinking maybe I could do something "clever" with table styles to save me the joyless task of manually editing all tables in my project. In the end I gave up and decided to devote a couple of hours to going through and reformatting all tables with a font that was the same size and of a similar type face to the rest of the page. Obviously not an option in your monster project, but it worked for me.
I've seen so many random results here that I can't get my head around what exactly is going wrong - for me the issue seems connected with style = none in a table.
Anywhere else on the page, style = none yields text with font = Tahoma 10pt.
But in the table cells that text sometimes rendered ok in CHM, but often it would randomly appear far larger.
So for me the cure was to format all tables with font = arial 10pt (rendered result is similar, but somehow different enough to stop the erroneous size rendering).
That's as far as I got - as usual with time being very precious, I've had to curb my geekiness and crack on.
Cheers,
Andy

