Chemistry chokes on extended-ISO entity

bloodnok
Posts: 36
Joined: Mon Jun 27, 2011 10:51 pm

Chemistry chokes on extended-ISO entity

Post by bloodnok » Thu Sep 06, 2018 12:40 am

I use the rightarrow glyph in my files. Defined as

Code: Select all

<dlentry>
<!--&#8594; is right-pointing arrow-->
<dt>rightArrow</dt>
<dd><ph id="rightArrow" outputclass="rightarrow">&#8594;</ph></dd>
</dlentry>
The open toolkit converts this to "→" (which is poor form but whatever). Further processing through Chemistry results in a "#" being used. Tried to converting it to the HTML entity "&rarr;". No dice. Tried converting it back to "&#8594;". That also didn't work. Converting it to "-&gt;" which works but looks awful.

Does Chemistry really not support extended-ISO characters?

Dan
Posts: 416
Joined: Mon Feb 03, 2003 10:56 am

Re: Chemistry chokes on extended-ISO entity

Post by Dan » Thu Sep 06, 2018 9:56 am

To fix this you will need to use a fallback font. If you are using Times New Roman for the entire publication, you may consider adding Symbol as a fallback. In your customization CSS add:

Code: Select all


*[class ~= "topic/dlentry"] {
font-family: "Times New Roman", Symbol;
}
Or other font that can render the character better.

Many regards,
Dan

Dan
Posts: 416
Joined: Mon Feb 03, 2003 10:56 am

Re: Chemistry chokes on extended-ISO entity

Post by Dan » Thu Sep 06, 2018 4:27 pm

I checked with Arial Unicode MS font and it works better.
The correct version (the above selector works only for the DITA and CSS direct transformation, not the one that uses HTML as intermediate format):

Code: Select all


*[class ~= "topic/dl"], .dl {
font-family: "Times New Roman", "Arial Unicode MS";
}
Regards,
Dan

bloodnok
Posts: 36
Joined: Mon Jun 27, 2011 10:51 pm

Re: Chemistry chokes on extended-ISO entity

Post by bloodnok » Thu Sep 06, 2018 9:51 pm

This fix works for me. As I tag the rightarrow character, I was able to make your fix more specific so I don't get a font change applied to the rest of my text.

Many thanks

Post Reply