Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-02-2017, 05:31 AM   #46
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
@Rubén ---
I really hate to rain on the party. I tried your NoWrap span, and in my usage, it failed.

Click image for larger version

Name:	Emdash Split.png
Views:	302
Size:	19.9 KB
ID:	159766

.
I use "hanging indents" for poetry, and the spanned text slides to the left, superimposed over adjacent text. It seemed to do this both WITH and WITHOUT the text-indent:0 specified in the span.

Code:
Spoiler:

CSS:
Code:
.stanza{
margin-top: 1.0em;
margin-bottom: 1.25em;
margin-right: .5em;
margin-left: 2.5em;
}

.stanza p{
text-align: left;
text-indent: -2.75em; 
padding-left: 2.75em;
margin-top: 0;
margin-bottom: .15em;
hyphens: none;
-webkit-hyphens: none !important;
-moz-hyphens: none;
adobe-hyphenate: none;
}

.nowrap{
/*text-indent: 0 !important;*/
display: inline-block;
}
HTML:
Code:
<div class="stanza">
<p>“And now, when fifteen suns have each</p>
<p class="ins1">Fulfill’d in turn its circling year,</p>
<p>Thrown back again on England’s beach,</p>
<p class="ins1">Our bark paid off—HE drives me <i>Here!</i></p>
<p>I could not die in flood or <span class="nowrap">fight—</span></p>
<p>HE drives me <span class="midfont">HERE</span>!!”—</p>
<p class="aright">“And sarve you right!</p>
</div>


Click image for larger version

Name:	NoWrap Span.png
Views:	307
Size:	15.8 KB
ID:	159767

.
If I do manage to get the viewer window sized just right, so that the spanned word does drop to the next line, it does not indent as specified in the CSS.

Click image for larger version

Name:	Indent Fails.png
Views:	300
Size:	44.5 KB
ID:	159768

.
Also, when I tried it in a normal paragraph (no negative indent), but justified, it gave an extremely wide spacing to the spanned word.

Click image for larger version

Name:	NoWrap Span JUSTIFIED.png
Views:	293
Size:	22.0 KB
ID:	159769


.
I tested in Sigil and Calibre viewer (QT based) and in ADE 2.0.

So this kind of span seems not to work well in paras with negative / hanging indents. The good news is that the Unicode ⁠& # 8 2 8 8 ; appears to be working fine with hanging indent.

Please let me know if I am doing something wrong with the code.

Last edited by GrannyGrump; 11-02-2017 at 07:33 AM.
GrannyGrump is offline   Reply With Quote
Old 11-02-2017, 01:13 PM   #47
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Tried it with the books I last coded, and didn't experience that problem. But I'm too tired to compare our code...


Spoiler:
Code:
div.stanza {margin-top: 1em; margin-bottom:0; margin-left: 3em; }

div.stanza > p	{text-indent: -3em; margin-bottom: 0; margin-top: 0; text-align: left}

div.stanza > p.ind2	{text-indent: -2em; margin-bottom: 0; margin-top: 0; text-align: left}

.nowrap {text-indent: 0;display: inline-block;}

.pl2  {padding-left:2em}
Code:
<div class="stanza pl2">
    <p>Go, let thy fancies range,</p>

    <p class="ind2">And ramble where they may</p>

    <p>View power in every change,</p>

    <p class="ind2">And what is its <span class="nowrap">display?—</span></p>

    <p>The country magistrate,</p>

    <p class="ind2">The lowest shade in power,</p>

    <p>To rulers of the <span class="nowrap">state?—</span></p>

    <p class="ind2">The meteors of an hour.</p>
  </div>
doubleshuffle is offline   Reply With Quote
Advert
Old 11-02-2017, 03:26 PM   #48
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,755
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by GrannyGrump View Post
@Rubén ---
I really hate to rain on the party. I tried your NoWrap span, and in my usage, it failed.
...
Hi Granny;

Sorry, but I could not reproduce your issue. By applying your styles, I got the following output:

Click image for larger version

Name:	Image1.png
Views:	321
Size:	75.3 KB
ID:	159785

Take in count that I worked WITH text-indent:0 in the "nowrap" class. I can't understand why is not working for you.

Click image for larger version

Name:	Image2.png
Views:	311
Size:	66.2 KB
ID:	159786

Regards
Rubén

Last edited by RbnJrg; 11-02-2017 at 03:31 PM.
RbnJrg is offline   Reply With Quote
Old 11-03-2017, 07:54 AM   #49
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
well, this IS strange.

I wonder if something farther down my stylesheet is causing some conflict. I will do some more experimenting, and see if I can learn why MINE is the only effort that failed.

But thanks, Ruben, for posting the code. I really want this to work!
GrannyGrump is offline   Reply With Quote
Old 11-03-2017, 10:43 AM   #50
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by GrannyGrump View Post
well, this IS strange.

I wonder if something farther down my stylesheet is causing some conflict. I will do some more experimenting, and see if I can learn why MINE is the only effort that failed.

But thanks, Ruben, for posting the code. I really want this to work!
GrannyGrump, I was able to duplicate your issue exactly, using the same code you provided.

Looks like you accidentally had the text-indent line commented out:

Code:
.nowrap{
/*text-indent: 0 !important;*/
display: inline-block;
}
That line seems to be key when doing the inline-block, so that the negative indent doesn't jam it into the previous text.
Tex2002ans is offline   Reply With Quote
Advert
Old 11-03-2017, 01:05 PM   #51
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
Actually, I tried WITH and WITHOUT the "text-indent:0". I got the same overlaid text either way. But I will play around with it some more. I will start by using a minimal CSS, and see what happens.....
GrannyGrump is offline   Reply With Quote
Old 11-03-2017, 03:42 PM   #52
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,755
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by GrannyGrump View Post
Actually, I tried WITH and WITHOUT the "text-indent:0". I got the same overlaid text either way. But I will play around with it some more. I will start by using a minimal CSS, and see what happens.....
That's the key. Try to see if the epub I attach works for you.
Attached Files
File Type: epub NoWrapGranny.epub (2.3 KB, 203 views)
RbnJrg is offline   Reply With Quote
Old 11-05-2017, 02:49 PM   #53
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,680
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
RbnJrg, have you tried it in ADE 2.0.1? Sigil and Calibre don't count.
JSWolf is offline   Reply With Quote
Old 11-06-2017, 03:55 PM   #54
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,755
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
RbnJrg, have you tried it in ADE 2.0.1? Sigil and Calibre don't count.
I tried in ADE 2.0.67532 and it works fine (also in ADE 3 and upper). I don't have ADE 2.0.1 but Doitsu did the try with ADE 2.0 (post #20 of this thread) and it worked fine too.

Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 11-09-2017, 02:28 AM   #55
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
@Rubén and Tex ---- I am SO embarrassed.

Ruben, your code works fine, I must have had a typo in my first CSS, and must have been asleep at the wheel besides. Thank you once again for this solution!
GrannyGrump is offline   Reply With Quote
Old 11-09-2017, 07:36 AM   #56
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,755
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by GrannyGrump View Post
@Rubén and Tex ---- I am SO embarrassed.

Ruben, your code works fine, I must have had a typo in my first CSS, and must have been asleep at the wheel besides. Thank you once again for this solution!
Glad the code works for you, Granny. And don't worry; all of us are humans, and we make mistakes (I more than others )

Last edited by RbnJrg; 11-09-2017 at 07:40 AM.
RbnJrg is offline   Reply With Quote
Old 11-09-2017, 08:07 AM   #57
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by RbnJrg View Post
Glad the code works for you, Granny. And don't worry; all of us are humans, and we make mistakes (I more than others )
I never make mistakes.
Tex2002ans is offline   Reply With Quote
Old 11-09-2017, 11:42 AM   #58
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,755
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Tex2002ans View Post
I never make mistakes.
Well, I was speaking about humans
RbnJrg is offline   Reply With Quote
Old 11-14-2017, 12:04 PM   #59
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by RbnJrg View Post
Well, I was speaking about humans


MWAHAHAHAHAHAHA.


Hitch
(Who never makes mistakes, either...and I have a bridge in NY, if you believe that...)
Hitch is offline   Reply With Quote
Old 11-14-2017, 09:14 PM   #60
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,680
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by RbnJrg View Post
I tried in ADE 2.0.67532 and it works fine (also in ADE 3 and upper). I don't have ADE 2.0.1 but Doitsu did the try with ADE 2.0 (post #20 of this thread) and it worked fine too.

Regards
Rubén
Link to ADE 2.0.1: http://www.adobe.com/support/digital...downloads.html
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
italic at end of line causes next line to start with a space ebookreadr Sigil 29 03-20-2017 11:25 AM
Preventing chemical symbol from being split by page or line break Nick Payne ePub 8 10-23-2013 03:06 AM
Line breaks on Kindle, no line breaks on 4 PC Siavahda Kindle Formats 0 10-20-2012 05:50 AM
Spurious Line Breaks Halk Workshop 1 05-15-2010 01:22 PM
No line breaks ecpepper Amazon Kindle 3 08-09-2009 06:42 PM


All times are GMT -4. The time now is 05:53 PM.


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