Copy link to clipboard
Copied
(I am using RoboHelp 9, but have also tried RoboHelp 11 with exactly the same results.)
Our application requires the WebBrowser control to run in IE9 compatibility mode. This means that when launching help (chm) the help viewer will also use IE9 compatibility mode as it is running in the same process. As Chm files are meant to be viewed in IE7 compatibility mode, this causes various issues with the layout of the help topics. We have found that to fix this problem each topic needs the following meta tag in the head element:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
As our help system consists of several thousand htm/topic files, we can obviously not do this manually. So in order to have this automatically inserted, I need to edit the mother file that generates the topic files. I have tried to find this file, but no luck. Does anybody know how to do this?
Willam may not be available right now but I can suggest another method. Find a tag that is in all your topics, maybe </head> and use that as a Find.
Replace with your tag followed by </head>
Backup first.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Create a Master Page, add the meta tag to its HTML code and apply the Master Page to your topics before compiling.
Copy link to clipboard
Copied
Thank you for your quick answer. I actually tried this yesterday, but it did not work. It seems to me that everything outside the Body tag in the master page is stripped away when the chm files are generated. I tried it again just now, just to double check. (I also entered the meta tag manually in one of the topics, and this came out fine.) So I still think the best way would be to edit the mother file that generates the head element in the HTM files. Is there a way to do this?
Copy link to clipboard
Copied
Hi there
Unfortunately, there is no "mother file" as you are thinking. With RoboHelp, you simply create as many topic files as you want. As you create them, they remain as created.
You might want to contact Willam VanWeelden and see if you could contract with him to create a script in RoboHelp that would do what you need. I believe you can contact him via his web site.
Cheers... Rick
Copy link to clipboard
Copied
Willam may not be available right now but I can suggest another method. Find a tag that is in all your topics, maybe </head> and use that as a Find.
Replace with your tag followed by </head>
Backup first.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Good one!
For some reason that didn't come to mind!
Rick
Copy link to clipboard
Copied
Yes! I tried Peter's method, and it worked. (Thank you!) The only problem is that I generate my help files from Framemaker files, and every time I update my project the changes I made will be lost. And as I'm working with about 30 projects, it's not ideal to have to to this manual step every time I generate a help file. So I will still be looking for a way to include the meta tag in the initial head element.
Copy link to clipboard
Copied
The best solution would be to use a master page, as RoboColum suggested originally. Then the problem would be solved once and for all, by using this master page for all projects. Does anybody understand why this didn't work, or if there is a way to make it work? (As I said, to me it looks like the HTML code outside the body tag gets stripped away when the chm file is generated.)
Peter's solution is a very good workaround, but I'm not marking it as the correct answer just yet..
Copy link to clipboard
Copied
The purpose of master pages is to provide headers and footers to all associated topics and to provide default text to new topics. What you want them to do is not part of that so I am guessing the everything else in the master page is deliberately stripped out.
The find and replace suggested is an additional step but it should only take a very short time.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Yes, of course you're right. So I guess I'll have to leave the master page route. But I'm still hoping there is a way of changing the default HTML code that is written into the HTM topics. It must surely come from somewhere?
(And you're right that the extra step takes short time. But it kind of ruins the single source concept, which I finally felt I had in place...)
Copy link to clipboard
Copied
The basic HTML code is hard coded inside the application so can't be changed.
Copy link to clipboard
Copied
Hmm...I was afraid of that. I guess that just leaves me with the search/replace option. But I can't imagine I'm the only one who has this problem, so I think it would be a good idea for Adobe to include an IE compatibility option in future versions (maybe under Tools/Options/General/Generation?) It should be a fairly easy fix. I think I will wait a couple of days and then submit a Feature Request about this.
Copy link to clipboard
Copied
As far as I can recall, I haven't seen anyone else post this question and I am sure you have searched as well. That begs the question as to why you need this step.
What goes wrong if you don't include the meta-tag?
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Yes, that's a good point. Maybe it's just me after all In my first post I called it "various issues with the layout of the help topics". To be more specific, what I've noticed is that the bullet paragraphs lose their formatting (change bullet size and get indented). Also, the edges around the topic text disappear (especially noticeable on top), giving it a bleak, unprofessional look. In addition, the font size/line spacing seems to be slightly different. I haven't found anything else yet, but I expect I would have found more while working. Here is a screenshot of the two help windows side by side, with the "faulty" one to the left:
Copy link to clipboard
Copied
In that case the issue is with lists. See Lists on my site. I am guessing the bullets went wrong back when you upgraded to Rh8 or above from an earlier version.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Yes, that's probably true. But the lists are only part of the problem, as you can see from my screenshots. In addition, the edges around the main text area have disappeared, and the line spacing is narrower (making the text look kind of condensed). All these issues are fixed by adding the "IE=EmulateIE7" meta tag.
Copy link to clipboard
Copied
Other CSS changes are likely needed. Your call as to whether to fix all the issues or use the meta-tag.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Yes, you're right. The best thing would have to been to avoid the meta tag. I suppose I could start with fixing the lists, and then look into the other things one by one when I get the time.