Copy link to clipboard
Copied
We currently have 2 authoring tools, one of which is RoboHelp HTML 2017. We create CHM files with both tools and most links open in a new window (Internet Explorer browswer). The CHM files created with RoboHelp look fine when links are opened in a new window. In the other tool, most of the formatting set in the stylesheet is gone in the new window.
Does RoboHelp somehow embed the stylesheet in the CHM so that it remembers the style when links are opened in a new window? I am trying to figure out why it works in RH and not in the other authoring tool, and then hopefully I'll be able to apply it to the other tool as well.
Copy link to clipboard
Copied
Hi there
I'm assuming the other tool is being used for a different project. As such, when the new window opens, where exactly is the topic being presented? For example, is it in a folder? My thought is that perhaps there is some disconnect between where the CSS is in the structure. It's all about the linking and the topic's ability to find the CSS.
So what's the other tool? Why use two tools for this? Since RoboHelp seems to work fine and the other tool doesn't, why not use RoboHelp for both?
Cheers... Rick
Copy link to clipboard
Copied
When the project is published, everything is published to 1 folder on a server. The CHM is then distributed to colleagues and customers, who of course don't have access to this folder. It's not an option to put everything on a server, so we were hoping to embed the CSS in the other tool (Author-it). I have contacted their helpdesk, and according to them it is not possible to somehow attach the CSS to links that open in a new window. However, we never had problems with RH, so I'm not sure if what they are saying is correct.
JaredHess​ The CSS is not in the Baggage folder. It is part of the root in Project Files.
Copy link to clipboard
Copied
(Irene.Meijer and Peter, you are correct that CSS isn't necessary to put in the Baggage folder. I was quickly looking at one of my projects, and saw a css in there and mistakenly assumed it was necessary. Apologies for spreading false info.)
Irene, you mentioned that links from the .chm files open in IE. From what you wrote, I'm understanding that you are clicking on link from within a .chm file generated from Author-it, but that link opens up an .htm page (on a server? Webserver?) in IE that is not getting styled with the expected .css. Yet, when you click on that same link from within a RH-generated .chm, you do see the .css in the IE page. Am I close?
Copy link to clipboard
Copied
Hi JaredHess​, I think that's correct yes. A link in a chm created with Author-it opens in IE, but does not display according to the css. A link in a chm created with RH also opens in IE, and it does display correctly according to the style sheet.
The chm created with Author-it is published on a server. I have to copy the chm to my local disk in order to display the links in IE.
Copy link to clipboard
Copied
Is the CHM from RoboHelp also on a server?
In 2005 Microsoft made changes meaning the CHMs should not work on a server. See CHM Files Not Working on Network
I am wondering if this is behind the problem.
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
No, the CHM from RH publishes to my local disk.
From the article you provide I mainly read that it is a problem opening CHM files from a server. Although Author-it publishes to a server, the CHM file is always moved to a local disk and opened from there. All our users have the CHM files installed on their local disks as well.
And all files do open, it's just not completely shown according to the CSS. Some of the styles are aligned incorrectly (such as bullets), and we sometimes replace bullets with a NOTE image which is also not shown. Other things are correct though, such as the font and links are green when hovering.
Copy link to clipboard
Copied
OK so both CHMs are being used locally but perform in a different way. I think I would look at the code of the links in RoboHelp topic and an Author-It topic to see if there is an obvious difference. Otherwise unless anyone else can come up with something, I think it's time to ask on an Author-It forum.
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
Okay, I have a suggestion. Open the new window from each CHM file. Once it opens, right-click the page and choose to view source. Likely Windows Notepad will open.
In the head area at the top of the page should be a reference to the CSS file. Make note of the one from RoboHelp that seems to work and compare it to what you see for the one that doesn't. That may provide a clue as to what you might be able to do to make the "broken" CHM behave.
Cheers... Rick
Copy link to clipboard
Copied
I had already checked both HTML files, but couldn't find much difference.
This is the code from Author-it:
This is the code from RH (not the same topic):
(code ends here, didn't fit the screenshot)
The first thing I tried was to remove the "../../" before the css file, but that completely removed all CSS styling, also from the CHM itself.
Copy link to clipboard
Copied
And the "onlinehelp.css" looks the same as the "PANmanual.css" file?
Copy link to clipboard
Copied
No, it does not. Our company recently rebranded, so the "onlinehelp.css" has a different look-and-feel. Also, the styles in Author-it have different names. The stylesheets are basically setup the same though. Mostly setting fonts, sizes, colors, etc.
Copy link to clipboard
Copied
So here's the deal. When you see code with ../ or with ../../ what you are seeing is what I know as "HTML Shorthand" that means the actual HTML page is in a folder or possibly two or even more folders away from the "root" of the project.
Now here's where it gets odd. At least for me after looking at what you shared. The RoboHelp code shows a topic that is two folders down. (hence the ../../ preceding the CSS reference. And it actually works! But the Author-It code simply references the CSS as it the topic and CSS are in the same folder.
I say it's odd, because if I were to expect issues, I might expect them the other way around.
I think as Peter suggested earlier, you need to ask about this in the Author-It forum, It may be a well known issue for folks there. And you now are armed with better information you can use when you do.
Cheers... Rick
Copy link to clipboard
Copied
The HTML shorthand (didn't know this had a name, thanks) seems to be correct for both. The CSS in RH is indeed 2 folders down. The CSS in Author-it is in the same folder as the CHM file, so wouldn't expect an HTML shorthand there.
What I don't understand though, when a CHM is moved to another PC, how does the CHM 'know' where to find the CSS when a link is opened in IE? The other PC does not have access to my folder structure.
Copy link to clipboard
Copied
When a CHM file is created, it is what I call "hermetically sealed". It's kind of a "web site in a can" so to speak. Everything needed for operation of the CHM is packaged inside it and goes along for the ride when it is copied to a different PC. Inside the CHM is also the folder structure. Well, it is, as long as the option to package the CHM as a flattened file structure hasn't been enabled. But if memory serves, that's really only an option available within the Microsoft HTML Help Workshop. This is the bare bones development tool offered up by Microsoft. RoboHelp doesn't seem to offer us an option for controlling that. And maybe that's the difference. Maybe Author-it does. I'm not sure. Only someone overly familiar with Author-it would know.
Cheers... Rick
Copy link to clipboard
Copied
Thanks for all the explanations, I really appreciate it! I have asked the same question on the Author-it forums. Hopefully there will be a solution soon!
If anyone here has additional info, it is still very much appreciated.
Copy link to clipboard
Copied
I'm hopeful that when you find the ultimate resolution to this you will return to this thread and update us all to advise what the "fix" was.
Cheers... Rick
Copy link to clipboard
Copied
So the issue isn't with the RH CHM output, it's with the Author-It CHM output, correct? If so, that sounds like something is going wrong in the CSS referenced by the HTML pages that Author-It is compiling into the CHM. Which means that you probably should be checking with the Author-It crowd, right? ;>)
Copy link to clipboard
Copied
I tried the Author-it helpdesk first, but they told me it is never possible to open links in a new window according to the CSS style. But since this is not the case with CHM files created with RH, I just figured I'd ask how RH applies the CSS to links in new windows and hopefully figure out a solution from there.
Copy link to clipboard
Copied
It sounds like the other tool isn't packaging up the .css file like RH does. RoboHelp uses Baggage Files (see that folder in Project Manger pod) to keep the .css with the .htm files in a .chm. I would imagine your other tool probably has a similar option somewhere. Out of curiosity, what is the other tool?
Copy link to clipboard
Copied
I don't know about the other tool but you shouldn't need to add the CSS to Baggage in RoboHelp.
See www.grainge.org for free RoboHelp and Authoring information.