View Single Post
Old 10-30-2011, 08:03 AM   #1
Iznogood
Guru
Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.
 
Iznogood's Avatar
 
Posts: 932
Karma: 15752887
Join Date: Mar 2011
Location: Norway
Device: Ipad, kindle paperwhite
Controlling wraps in epubs

Hi

I'm currently working on converting some of my old books by Quentin Patrick to epub, and have run into a situation where I need to control where wrapping of words will happen. One of the characters in the book is spelling a name, and this is indicated with a dash (-) between each letter in the name, like this: S-a-n-t-a-i-s. However, readers will interprit the dash as a good place to add a line-break, whilst I, on the other hand, does not want that word to wrap to a new line in the middle of the name.

I have tried "white-space:nowrap;", which seems promising, but gives me one problem: if the screen is too small or the font is too big to fit the entire name on one line, I obviously want the word to break to a new line. Not because it is correct to break there, but because it is neccessary to view the entire name. With the white-space CSS property, the part of the name that does not fit the screen vanishes.

I have also experimented with "display:inline-block", which was suggested by Liz Castro in one of her blogs. This option gives me problems with the various readers adding various margins to the left and right of the block, and I can't find a way to make that word look the same on all readers I have access to (an calibre, sigil and an ipad with ibooks, stanza and bluefire).

Anyone "out there" who have found a solution to this? I know that no reader will render css the same way, and I realize that there are no guarantee of achieving correct result on all readers, but I would like to try.
Iznogood is offline   Reply With Quote