Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-25-2023, 07:13 AM   #1
Nirkatze
Junior Member
Nirkatze began at the beginning.
 
Nirkatze's Avatar
 
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: Kobo Aura H2Ov2, iPod Touch
How to prevent line-breaks?

Hi all,

I have a few fantasy books where telepathic dialogue is marked in non-standard ways, for example:

*Hi! How are you?*
<Hello. I'm good.>

And every now and then, when the line-breaks line up just right, they end up like this:

*Hi! How are you?
*
<Hello. I'm good.
>

I've been trying to figure out a way to prevent line-breaks with the beginning and end "quotes" but haven't had any luck. I use Sigil to edit and prefer epub2, and side-load using Calibre. I also prefer justified (over ragged-right), and have my <p> tag set to text-align: justify.

I've been trying this in the stylesheet:
.nowrap {white-space: nowrap;
line-break-inside: avoid;}

Looks like this in the html file:
<p><i><span class="nowrap">*Hi!</span> How are <span class="nowrap">you?*</span></i></p>

But it doesn't seem to be working. I'd appreciate some expert advice!
Nirkatze is offline   Reply With Quote
Old 05-25-2023, 12:12 PM   #2
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,142
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Not tested, (and would have be tested on both epub and kepub).. But here's the technical answer.

https://stackoverflow.com/questions/...breaking-space

Since a nowrap span is not working, I was thinking you could try putting a word-joiner, ⁠ &⁠#8288 ; between your punctuation and the * / >.

Last edited by rashkae; 05-25-2023 at 12:19 PM.
rashkae is offline   Reply With Quote
Old 05-25-2023, 04:12 PM   #3
Nirkatze
Junior Member
Nirkatze began at the beginning.
 
Nirkatze's Avatar
 
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: Kobo Aura H2Ov2, iPod Touch
it worked!

Quote:
Originally Posted by rashkae View Post
Not tested, (and would have be tested on both epub and kepub).. But here's the technical answer.

https://stackoverflow.com/questions/...breaking-space

Since a nowrap span is not working, I was thinking you could try putting a word-joiner, ⁠ &⁠#8288 ; between your punctuation and the * / >.
Wicked! I just made a test file with a few different options, and the word-joiner totally works!!! Thank you so much!

New text:
*Hi! How are you?&#8288 ;*
<Hello. I'm good.&#8288 ;>
(space before ; deleted though)

I had a little bit of a scare when I added it in, then used Sigil's clean-up to prettify the html file and it disappeared... until I remembered to add it to the "Preserve Entities" exclusions in Preferences and they all came back. So it'll be there when I forget it too...

I am now going to open all my book files, and put this little baby everywhere...


Last edited by Nirkatze; 05-25-2023 at 04:15 PM.
Nirkatze is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent breaks within a 'word' AlexBell ePub 15 11-11-2015 12:24 AM
How to prevent page breaks? bgoldnyxnet ePub 9 01-28-2014 09:45 AM
How to prevent calibre add a blank line at every <p> Nick_1964 Conversion 12 11-26-2013 05:44 AM
Line breaks on Kindle, no line breaks on 4 PC Siavahda Kindle Formats 0 10-20-2012 05:50 AM
Prevent Calibre to paragraph each line armkbdotcom Calibre 3 05-29-2010 03:15 PM


All times are GMT -4. The time now is 04:13 PM.


MobileRead.com is a privately owned, operated and funded community.