Copy link to clipboard
Copied
Every time I try to generate Word doc output in RoboHelp 2019 this is what I receive. All other outputs generate successfully so I'm certain that default.css is working totally fine.
Unhandled
CssParser error: line 1 col 20: "'" expected. CSS => p{font-size: 12pt'}
I would really appreciate your help in fixing this error. I've the latest patch update of RoboHelp too.
Copy link to clipboard
Copied
Although your problem is similar in that it relates to not being able to generate a Word output, the error is different. For that reason I think it best to put it in a separate thread which I have done.
You have ruled out default.css saying it is working fine in other outputs but that does not necessarily mean it will work with the Word output.
First thing to try is to create a new project and close it. It's just to get a clean default.css rather than the one you are using. Copy it into your project with a change to the name such as default_word.css.
Create a new master page and do nothing with that other than link it to default_word.css.
In the Word preset select that master page and generate.
Post back with whether or not it generate a document and we can take it from there.
Copy link to clipboard
Copied
I followed your instructions and tried to generate again, but I still get the same error.
Copy link to clipboard
Copied
That tends to rule out it being a CSS issue notwithstanding the error message. I am suspecting an issue with one or more topics but the problem is which one?
If one or generates OK and the other does not or both have the problem post back.
If both generate OK, add a few more topics to the TOC and try again until you reach a point where one or both fail. The problem will be with the last batch of topics you added. Make a note of those and just post back that you have identified the batch.
It's late here but I will look for the results in the morning.
Copy link to clipboard
Copied
Somewhere in your project you have a font-size css property with an apostrophe at the end. But, it's not easy to just search for font-size: 12pt' because the apostrophe will have been converted to an entity code if it's in a topic.
I replicated the error in the Salesbuilder project by opening a topic and clicking in a paragraph, then in the General tab of the Properties Panel, I typed an apostrophe after my font size. This inserts an inline style in that particular paragraph. (It doesn't show up once you've saved and closed the topic, but you do get a scary and unhelpful error if you click inside that paragraph, but clicking randomly in topics is hardly productive. 🙂 )
You can search for all instances in RH2019.0.9. For earlier version of 2019 New, you'll need to use a third party tool, such as Notepad++, but the principles will be the same.
If there's only a few occurences, you can just click on each result and manually change them. Assuming you don't need the inline style, I'd delete the whole style part of the p tag. However, it depends on how your project is set up, so I can't offer definitive advice.
If there are a lot, you can do a fresh find and replace, but what you need to do may depend on how your project is set up.
Try running the search, and see what you find. You can always post back if you're unsure.
Copy link to clipboard
Copied
Taking my hat off to Amber for finding that one.
I followed the idea of adding an apostrophe to the font size and then looked at the topic in source view. It seems to convert the apostrophe to the entity code below.
'
I'm thinking you should be able to do a find and replace on that.
Copy link to clipboard
Copied
... and back up the project first. Find and replace operations can wreck a project quicker than they fix it.
Copy link to clipboard
Copied
Thanks Peter, my test also showed the same number code (').
I didn't suggest searching and replacing that specific entity code, because there might be places where you want to use it in your content; or there might be other entity codes that need to be replaced, for example ' or '. (It's hard to know what codes might have gotten in there and how.) Doing the search I suggested would find all of those options and you can decide what text you need to find and replace from there.
Copy link to clipboard
Copied
Hi Amebr
Thank you so much for your response! I did not understand the following sentences:
". Replace the ' with &. We need to do this because in topics, the ' has been translated into entity codes behind the scenes. Leave Replace with blank."
Can you please explain? So I undertood that in the Find field, I paste the error that you mentioned. What should I enter in Replace with field? just leave it blank or '?
Copy link to clipboard
Copied
While the error in the log displays an apostrophe character, behind the scenes the apostrophe will have been changed to a special code like '
So if you search on the text displayed in the log, you won't get any results. You need to enter part or all of the behind-the-scenes code.
So instead of searching for:
font-size: 12pt'
You need to search for:
font-size: 12pt&
I hope that makes sense.
Copy link to clipboard
Copied
Hats off to you Amebr! 🙂 This formula worked and I found one file with the issue. I can now compile in Word output.
Thanks for your help.