Page 1 of 1

Chemistry chokes on extended-ISO entity

Posted: Thu Sep 06, 2018 12:40 am
by bloodnok
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?

Re: Chemistry chokes on extended-ISO entity

Posted: Thu Sep 06, 2018 9:56 am
by Dan
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

Re: Chemistry chokes on extended-ISO entity

Posted: Thu Sep 06, 2018 4:27 pm
by Dan
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

Re: Chemistry chokes on extended-ISO entity

Posted: Thu Sep 06, 2018 9:51 pm
by bloodnok
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