EBW Knowledge Base

Spaces

Spaces are tricky little things. We’ve found some problems with spaces in exporting from InDesign CS3 especially.

Span-related spaces

When exporting to epub, InDesign CS3 changes a character style into a span. This is fine in principle, but in doing so InDesign CS3 starts a new line for the span in the XHTML code it creates. It also indents this line with spaces. This effectively puts a space between the character preceding the span and the first letter in the span.

For example, when a non-italic quotation mark is followed by a word in italics, in the ereader a space then appears between that quote mark and the word. This space has to be manually removed in each case in the XHTML file. The same applies at the end of the span. Fixing this can be very time consuming. Search for span and </span> to find these instances.

Also, look for empty spans and delete them. For example:

<span></span>

They can mess up spacing too.

Non-breaking spaces

The InDesign CS3 export to epub does not recognise non-breaking spaces. It will simply ignore them, resulting in no space between words separated in InDesign with a non-breaking space. This is a huge hassle. At the moment, the only fix we know is to search for each non-breaking space in the InDesign document, and then manually replace with (or insert) a space (or HTML non-breaking space code: &nbsp;) in the XHTML.

Leave a Reply