I would guess that this is possible but I have not been able to find information about it and must have looked in all the wrong places.
How can I write HTML code in InDesign, in particular some character code, and preserve that character when I export to EPUB? In other words, how can I write "▭" in InDesign and keep it that way in the exported EPUB, instead of turning it into "&rect;" ? By preserve HTML code, I mean that the HTML code written in InDesign should then be interpreted as HTML in the epub file.
This is for CS4.
Just use the actual character, I would have thought. In generated HTML it's InDesign's job to get the correct representation (which might be ▭ or ▭ or ▭ or probably other things) Be sure to select a font that contains this Unicode point, just you would if you design for paper. In other words you must see the character on screen in InDesign if you want to see it in HTML.
Hi Test Screen Name.
Actually, I don't want to see the character on screen in InDesign. What I want to see in InDesign is the text for the character, like ▭ , and that it is converted as is to EPUB, so that it stays as ▭ and is interpreted as such in HTML. But what I see in the EPUB is that the conversion has turned it into &rect; . I don't want it to convert & to the corresponding HTML character code & !
That may not be what you want, but I think it's what InDesign must do. What would happen to the layout? ▭ uses up a different amount of space in the line from a little box so the flow of all the text and pages could be wrong. You may be using the wrong tool if what you want to do is write HTML code in a free format and ignore text flow.
I don't mean for InDesign to do that in general and I concur that what you describe is what should be expected in general. Is there a way to escape this character or some part of the text to indicate to InDesign that that part must be exported verbatim, according to the description I made?
CS4? That software is more than 10 years and had very, very archaic HTML capabilities.
If this is what type of work you're doing you need to upgrade.
The HTML feature I am referring to is also very archaic! 😉